-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Improved HL commander - spiral & linear segment #1410
base: master
Are you sure you want to change the base?
Improved HL commander - spiral & linear segment #1410
Conversation
@whoenig or @jpreiss. Do you have time to pitch in on this functionality? It goes with the cflib (see this PR bitcraze/crazyflie-lib-python#470) but this would also require a change in the cpp link in crazyswarm2 then as well |
The current build issues is because of the cflib not being up to date, but this is a bit of an API breaking change (or rather crtp). Wonder if it might be better to make this another type of message? Let's wait to see what the others say. |
Generally, CRTP breaking changes are not allowed. We can add a new message and deprecate the old one (and eventually remove the old one). Any (CRTP) API change should also bump up the "protocol version", so that clients can easily know which functionality might be available. Otherwise I do like these additional features, of course! |
Thanks for the quick pre-review! |
So I added a GOTO2 while keeping GOTO in the firmware. Tested on a crazyflie 2.1
Also increased the CRTP protocol version by 1. What is the policy with deprecation/removal, i.e. how long do we keep the deprecated message? |
Our current policy about depreciation would be depreciate messages for at least one version before dropping it. The intent is that if a client is developed for version |
This PR extends the functionality of the HL commander by adding 1) a linear GOTO command and 2) a spiral segment.
To function correctly, it requires this cflib PR: bitcraze/crazyflie-lib-python#470
GOTO command now has an extra 'linear' argument. When set to true, the crazyflie will go to the setpoint with constant velocity, instead of a smooth acceleration and deceleration.
This change will require updates of cfclient, and other apps using the GOTO...Alternatively, we could introduce e.g. a GOTOLINEAR or GOTO2 commands. @whoenig Please share your thoughts on this as this would affect the crazyswarm also.
Edit 2024-09-13:
The new functionality is introduced in a GOTO2 command, former GOTO is kept for now but will be deprecated
SPIRAL command, which allows to fly along an arc or spiral segment approximated by splines. For segments <90 degrees this is a very good approximation of an arc or a spiral. The maneuver has a constant angular velocity, the axis of the spiral is defined relative to the current x,y,z,yaw setpoint (such that all the parameters fit into a single packet). Internally, the
piecewise_plan_7th_order_no_jerk
planner is reused.The parameters are described below: