Page 1 of 1

Control with VICON

Posted: Sun May 01, 2022 11:16 am
by Zafer
I am planning to write my own LQR controller (onboard) from setpoints to motor power distributions. For this I will make changes to the firmware.

I want to do this using position and attitude data from a VICON motion capture system. Can I neglect the gyroscope and observer and only make use of the data from VICON to control one crazyflie? Or is it possible to include the VICON data with the gyroscope and observer?

I read that Crazyswarm supports external motion capture systems as VICON, but the Crazyflie Python API does not? Also is Crazyswarm just a way to control (send commands/setpoints) to one or more crazieflies with external motion capture systems? As in, it is not related to the firmware in which i want to change the controller structure right?

Re: Control with VICON

Posted: Mon May 02, 2022 9:59 am
by kristoffer
Hi!

You can send external position information to the estimator through the localization service, implemented in
https://github.com/bitcraze/crazyflie-f ... _service.c

There are two flavors, you can either push in only the position (extPositionHandler()) or the full pose (extPoseHandler()). Either way the data will be pushed to the estimator to be fused with other sensor information.

The python lib contains implementations to use the functionality mentioned above. Please see the qualisys_hl_commander.py example (https://github.com/bitcraze/crazyflie-l ... #L233-L236), it should show the concepts. It uses the Qualisys but a Vicon implementation should be similar.

The Crazy Swarm uses the same mechanism to push position/pose data to the Crazyflie, but with a different implementation on the PC-side.

There is a library from Crazy Swarm that generalizes access to mocap systems, you can check it out at https://github.com/IMRCLab/libmotioncapture

Re: Control with VICON

Posted: Tue May 03, 2022 8:46 am
by Zafer
Thank you very much!