distributed control with crazyflie

Firmware/software/electronics/mechanics
Post Reply
liuyuzhen
Beginner
Posts: 14
Joined: Sun Sep 24, 2017 4:07 am

distributed control with crazyflie

Post by liuyuzhen »

Hi,

I aim to achieve the distributed control betwent sveral cazyflies. So I am trying to obtain communication between several crazyflies (Crazyflie 2.0) ,but it is difficult.I have a idea that one crazyflie can send its own data(Attitude angle,position information and so on) to the ground computer,and then the ground computer send the data have received to another crazyflie. The data processing is finished on the crazyflie.
Is the crazyflie can send information to the ground station, ground station and then sent to another crazyflie?If so, please give me a hint.
I do not know if this way is feasible.Could you give me some advice?
Thanking you in advance.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: distributed control with crazyflie

Post by arnaud »

Hi,

Using the ground station as a relay is the easiest way to get two Crazyflie 2 to communicate. How to do it exactly depends of your project and your high-level needs. You can look at the python lib examples, there is examples that shows how to get log values from the Crazyflie, how to set parameter to a crazyflie and how to connect and control multiple Crazyflie. By combining these 3 functionality you will be able to get data from one Crazyflie and write it to another using only existing software.

If you need some more direct mean of communication (the code in one CF2 that sends one data packet to some code in the other CF2), you will need to write some code to send and receive CRTP packet with a custom port, this should also be quite simple.

If you need to take the ground station out of the loop the modification will be more complex: you would then need to modify the radio code in the nRF51 CPU and the communication between the nrf51 and stm32. I would suggest using the ground station as relay at least in a first approach and consider peer-to-peer communication as a later optimisation.

Edit: I moved the topic to crazyflie/developer discussions for better visibility
liuyuzhen
Beginner
Posts: 14
Joined: Sun Sep 24, 2017 4:07 am

Re: distributed control with crazyflie

Post by liuyuzhen »

Thank you for your reply, is the python lib examples which you have assumed also in the VM?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: distributed control with crazyflie

Post by arnaud »

Yes, the crazyflie-lib-python project is clonned in the project folder in the VM already. The examples are in the examples folder.
Post Reply