CrazyFlie + OptiTrack

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

CrazyFlie + OptiTrack

Post 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!
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: CrazyFlie + OptiTrack

Post 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
jsalts
Beginner
Posts: 14
Joined: Tue Jan 16, 2018 12:34 pm

Re: CrazyFlie + OptiTrack

Post 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!
Amir_94
Beginner
Posts: 12
Joined: Wed May 23, 2018 10:55 pm

Re: CrazyFlie + OptiTrack

Post 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
Post Reply