Page 1 of 1

How do i make real time communication with my crazyflie?

Posted: Mon Oct 25, 2021 8:15 pm
by JamesClark
I have a motion tracking room that allows me to get the state of the quadcopter. I wanna send the data to the quadcopter so it can regulate itself in real time. I have looked around and found this:
https://www.bitcraze.io/documentation/r ... trp_index/

However I am not sure if I am to use this, And there is no example code of this. How do I do this?

Re: How do i make real time communication with my crazyflie?

Posted: Tue Oct 26, 2021 4:03 am
by jonasdn
Hello JamesClark!

You can use the Crazyflie Python library (https://github.com/bitcraze/crazyflie-lib-python to send positions using the localization module: https://www.bitcraze.io/documentation/r ... alization/

Perhaps you can look at the example we provide for using the Qualisys motion tracking system and the library: https://github.com/bitcraze/crazyflie-l ... mmander.py

Good luck!

Re: How do i make real time communication with my crazyflie?

Posted: Tue Oct 26, 2021 4:19 am
by JamesClark
Thanks:

Would you recommend if I use the ROS package?

This one: https://crazyswarm.readthedocs.io/en/latest/

regarding answer: And this is what I would be using if i wanted to make a control system right?


Also this sends positions, how do I send thrusts, roll pitch yaw?

Re: How do i make real time communication with my crazyflie?

Posted: Wed Oct 27, 2021 7:01 am
by kimberly
Hi!

Yes you would be able to use crazyswarm for this, as they also have a function that sets roll pitch and yaw . Also not that you can do the same as Jonas mentioned without the ROS structure in between but it's up to you want you want to use.

What you do have to realize, is that at the moment you send roll pitch and yaw, it is considered manual control and the crazyflie itself will not control itself based on position. But if the pitch roll and yaw are based on the position of the crazyflie by the MoCap system for an offboard controller that should be fine (just be aware of the delay due to communication)