upload compressed bezier trajectory

Firmware/software/electronics/mechanics
Post Reply
t.yoneda
Beginner
Posts: 27
Joined: Mon May 17, 2021 3:03 am

upload compressed bezier trajectory

Post by t.yoneda »

Hello!

I want to know how to upload compressed bezier trajectory.

I read the "Trajectory formats" page to figure out the format of the compressed bezier trajectory.
However, I don't know how to upload it to Crazyflie.

Also, the compressed bezier trajectory don't seem to have a duration, how do I set that up?
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: upload compressed bezier trajectory

Post by kristoffer »

I don't think there is any support for uploading the bezier format at the moment.
There is an example in https://github.com/bitcraze/crazyflie-l ... h_level.py of how to upload the "normal" format, maybe you can use it as inspiration? You will also have to modify https://github.com/bitcraze/crazyflie-l ... _memory.py to support the bezier format.
The process for bezier data would be very similar, the main difference would be the data format that is uploaded.
When the trajectory is defined you must also tell the CF the type of trajectory that is used and you would have to extend the define_trajectory() method https://github.com/bitcraze/crazyflie-l ... er.py#L180 to use a different type than TRAJECTORY_TYPE_POLY4D.

Please consider contributing your code if you add it!

There is no total duration of the full trajectory, but there is a duration of each segment. The last two bytes of the segment header contains the duration of the segment. To get the trajectory duration, simply add all the segment durations.
Post Reply