Page 1 of 1

CrazyFlie + OptiTrack

Posted: Sun May 06, 2018 11:39 am
by jsalts
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!

Re: CrazyFlie + OptiTrack

Posted: Mon May 07, 2018 2:34 pm
by kristoffer
Hi!

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 config.mk 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 https://github.com/bitcraze/crazyflie-l ... equence.py

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

- Kristoffer

Re: CrazyFlie + OptiTrack

Posted: Thu May 24, 2018 5:33 am
by jsalts
Hi, Kristoffer!

I appreciate you answering for my question, thanks a lot! However, I'm not sure if I understand correctly when you say that I needed to recompile the Crazyflie with "ESTIMATOR=kalman" in config.mk. Can you explain to me a bit more on how to do it? Thanks again!

Re: CrazyFlie + OptiTrack

Posted: Wed Mar 06, 2019 4:40 pm
by Amir_94
I guess the easiest would be to use VM and run run 'make clean', 'make', 'make cload', after you modified the config.mk. Basically you 'make clean' it every time you change the config.mk file. You can either do the process using terminal or through eclipse. You may read more about it here:
https://wiki.bitcraze.io/doc:crazyflie: ... deck:howto