How do i make real time communication with my crazyflie?

Discussions about quadcopters/multi-rotors
Post Reply
JamesClark
Beginner
Posts: 8
Joined: Mon Sep 27, 2021 8:21 am

How do i make real time communication with my crazyflie?

Post 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?
jonasdn
Expert
Posts: 132
Joined: Mon Mar 01, 2021 3:13 pm

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

Post 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!
JamesClark
Beginner
Posts: 8
Joined: Mon Sep 27, 2021 8:21 am

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

Post 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?
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

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

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