Page 1 of 1

Sending external position data

Posted: Mon Jul 02, 2018 7:12 am
by mlac
Hi,
I am using crazyflie 2.0 without LPS. I am trying to send external data from a python client using a motion capture system (optitrack) in my lab.
Whenever I try to send external position, the quad is restarting. In my python client, I am sending external position as follows: `cf.loc.send_extpos([0, 0, 0])`. If I remove this line of code, the quad does not restart and continues to log data properly.
Also, It seems that the kalman filter is not working properly. I get x = 0 and y = 0. z is always identical the barometer measurement. I wonder if these issues are related. If possible, could you please provide details on how to enable the kalman filter? I have seen in some other posts that I have to set ESTIMATOR=kalman in the config.mk. I don't have a file named "config.mk". Instead, I have "config.mk.example" (in /tools/make).
I am building my project from eclipse ( using the VM ). Could this be a problem?

Any help is appreciated! Please let me know if you need more information.
Regards!

Re: Sending external position data

Posted: Mon Jul 02, 2018 7:36 am
by arnaud
You do not have the kalman filter enabled which explains why you are not getting any positions. You should create tools/make/config.mk or rename config.mk.example into config.mk. Then you can add ESTIMATOR=kalman, then run 'make clean', 'make', 'make cload' in the console and you should have a Crazyflie with Kalman filter enabled. 'make clean' is required each time you modify the config.mk file.

The Crazyflie should never crash (famous last word ...) so this is a bug. I created a ticket for it: https://github.com/bitcraze/crazyflie-f ... issues/342.

Re: Sending external position data

Posted: Mon Jul 02, 2018 8:51 am
by mlac
Thanks for the quick reply. I enabled the kalman filter as you said. I quickly tested it without the motion capture system, and I can now see the position values drift quickly. I think the problem is solved, but I will test it tonight at the lab using the motion capture system; and I will update you with the result.

Again thank you!

Re: Sending external position data

Posted: Fri Aug 10, 2018 8:25 pm
by Amir_94
Hi,

May not be very related to your question but i'm also trying to send external position data to Optitrack. Is there a tutorial on how to approach this method of Localization. On Optitrack website it's recommended to use NatNet SDK . Is this what you did?

Thanks

Re: Sending external position data

Posted: Sun Aug 12, 2018 1:01 am
by whoenig
If you use ROS, you can use crazyflie_ros (https://github.com/whoenig/crazyflie_ros) or the crazyswarm (https://github.com/USC-ACTLab/crazyswarm). Both have been used successfully with OptiTrack and come with some (limited) documentation on how to use it.

If you use python, a good approach might be VRPN - OptiTrack (and VICON) have VRPN servers build-in, and there are VRPN python modules (https://github.com/vrpn/vrpn/wiki).