Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix planner api change sitl #599

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions crazyflie_sim/crazyflie_sim/crazyflie_sil.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,20 @@ def goTo(self, goal, yaw, duration, relative=False, groupMask=0):
# We need to update to the latest firmware that has go_to_from.
raise ValueError('goTo from low-level modes not yet supported.')
self.mode = CrazyflieSIL.MODE_HIGH_POLY
firm.plan_go_to(
self.planner,
relative,
firm.mkvec(*goal),
yaw, duration, self.time_func())
try:
firm.plan_go_to(
self.planner,
relative,
False,
firm.mkvec(*goal),
yaw, duration, self.time_func())
except TypeError:
print("Warning: Your Crazyflie firmware is outdated. Please update to the latest version.")
firm.plan_go_to(
self.planner,
relative,
firm.mkvec(*goal),
yaw, duration, self.time_func())

def uploadTrajectory(self,
trajectoryId: int,
Expand Down
Loading