Skip to content

Commit

Permalink
broadcaster goTo: allow absolute coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
whoenig committed Dec 2, 2024
1 parent ca2bd07 commit 1b0e21c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/crazyflie_cpp/Crazyflie.h
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,8 @@ class CrazyflieBroadcaster

void stop(uint8_t groupMask = 0);

// This is always in relative coordinates
void goTo(float x, float y, float z, float yaw, float duration, uint8_t groupMask = 0);
// using relative = false only makes sense for rare cases such as formation control
void goTo(float x, float y, float z, float yaw, float duration, bool relative = true, uint8_t groupMask = 0);

// This is always in relative coordinates
void startTrajectory(
Expand Down
5 changes: 2 additions & 3 deletions src/Crazyflie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1246,10 +1246,9 @@ void CrazyflieBroadcaster::stop(uint8_t groupMask)
m_connection.send(req);
}

// This is always in relative coordinates
void CrazyflieBroadcaster::goTo(float x, float y, float z, float yaw, float duration, uint8_t groupMask)
void CrazyflieBroadcaster::goTo(float x, float y, float z, float yaw, float duration, bool relative, uint8_t groupMask)
{
crtpCommanderHighLevelGoToRequest req(groupMask, true, x, y, z, yaw, duration);
crtpCommanderHighLevelGoToRequest req(groupMask, relative, x, y, z, yaw, duration);
m_connection.send(req);
}

Expand Down

0 comments on commit 1b0e21c

Please sign in to comment.