CrazyFlie + OptiTrack

Discussions about quadcopters/multi-rotors
Post Reply
Posts: 11
Joined: Tue Jan 16, 2018 12:34 pm

CrazyFlie + OptiTrack

Post by jsalts » Sun May 06, 2018 11:39 am

Pardon me for such novice post but I'm still learning with all this crazyflie thing. My question is, how can I possibly use the OptiTrack MoCap set the boundaries or control the CrazyFlie within a closed environment? Can you direct me to elsewhere or provide me detailed procedure to get this project done? I tried searching everywhere but there's really nothing that I can fully understand. Thanks in advance!

Posts: 79
Joined: Tue Jun 30, 2015 7:47 am

Re: CrazyFlie + OptiTrack

Post by kristoffer » Mon May 07, 2018 2:34 pm


When using an external positioning system such as a mocap system, the most common solution is to continuously send the position from the external system to the Crazyflie to be used by the internal position controller. You can then send setpoints to the Crazyflie to tell it where to go.

In essence you should use the cf.extpos.send_extpos() method in the python lib to send external positions to the Crazyflie. You will need to recompile the Crazyflie with "ESTIMATOR=kalman" in in order to force the kalman filter as the default estimator.

To send setpoints to the crazyflie, check out the sequencing examples in the python lib, for instance ...

You can also search this forum for 'extpos' to get some more inspiration.

- Kristoffer

Post Reply