-
Notifications
You must be signed in to change notification settings - Fork 1.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
Modify yaw behaviour of high level commander for take off and landing #532
Comments
One way to do this would be to add two new commands that include yaw in crazyflie-firmware/src/modules/src/crtp_commander_high_level.c Lines 104 to 105 in f574561
|
Agree, we were also discussing adding new commands. I think we should not limit the target yaw to +-pi though. If you have yawed 6pi when flying for instance, and land with yaw=pi, the Crazyflie would unwind 5pi while landing. You probably would like to be able to set it to a value higher than pi. I is maybe better to have a second bool parameter that is "use current yaw" |
This unwinding would actually not work for all controllers. Any SO3 controller (that computes error on quaternion or rotation matrix) would always find the shortest rotation in order to move to the desired yaw. If you want this kind of spinning behavior, I would argue that one should plan a trajectory with that upfront and then use the low-level interface for landing instead. That being said, I don't see any particular downside from having another bool parameter instead of this implicit encoding I suggested. |
When the planner transitions into landing state, it uses the current yaw:
where, under normal conditions, the static variable
and in
so if user has executed high-level trajectories with a yaw polynomial that "winds" up to 6pi, then the planned landing trajectory will have a yaw polynomial that unwinds all the way back to 0. In my opinion, the current design of always landing at We can always use default values, overloads, etc. in the software that is sending high level commands (e.g. |
… new commands support a target yaw or use of current yaw.
main: warn once about USB permissions on scan
When the high level commander performs a take off or landing operation, it goes to yaw=0.
There might be uses cases where the user is interested in taking off to a different yaw or just taking off without changing the yaw.
When landing it also means that it "unwinds" any yawing that has been done during the flight, thus forcing the user to fly trajectories without accumulated yaw. It could be useful to have the option of landing with the current yaw.
The main point of interest seems to be
crazyflie-firmware/src/modules/src/planner.c
Lines 48 to 50 in f574561
One solution could be to add a yaw parameter to takeoff() and land() with the target yaw. Not sure how to handle "use current yaw" though.
@whoenig @jpreiss Do you have any input?
Changing this behaviour is a breaking change of the current behaviour and we need to be a bit careful about what we do.
The text was updated successfully, but these errors were encountered: