Communication issues for high numbers of Crazyflies

Post here to get support
Post Reply
BjörnLindqvist
Beginner
Posts: 2
Joined: Thu Oct 15, 2020 10:40 am

Communication issues for high numbers of Crazyflies

Post by BjörnLindqvist »

Hello Bitcraze forums,
We have been successfully flying 4-6 Crazyflie 2.0's using the crazyflie-ros package (https://github.com/whoenig/crazyflie_ros) for research and demo purposes the last year. Recently I have been trying to increase the number up to 10+ UAVs, but I am having issues with both general decreased flight performance and random communication drops that lead to instant crashes. Does anyone have experience in using the ROS-package for controlling swarms of Crazyflies and could share some info for a successful radio configuration (channels, UAVs per radio, bandwidths, positioning of the radios, launch files etc.)? We are simply setting up the launch file as

Code: Select all

  
  <arg name="uri1" default="radio://2/80/1M/E7E7E7E703" />
  <arg name="frame" default="crazyflie3/crazyflie3" />
  <arg name="x" default="0" />
  <arg name="y" default="4" />
  <arg name="z" default="0.5" /> 

  <group ns="crazyflie3">
    <include file="$(find crazyflie_driver)/launch/crazyflie_add.launch">
      <arg name="uri" value="$(arg uri1)" />
      <arg name="tf_prefix" value="crazyflie3" />
      <arg name="enable_logging" value="False" />
    </include>
  </group>
and similarly for each agent in the swarm, using one radio per two Crazyflies (one channel per radio) and as such also using external USB hubs for the radios. Note that our set-up is working fine for ~4 Crazyflies, but after that there is a noticeable decrease in performance. Any help is appreciated!
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Communication issues for high numbers of Crazyflies

Post by whoenig »

Have you considered using the Crazyswarm instead? You are running into multiple issues here: 1) crazyflie_ros uses point-to-point communication and throws an exception if a connection is lost; 2) crazyflie_ros uses one thread per CF with the radio being a shared resource.

The Crazyswarm mitigates the issues by mostly relying on broadcast communication during the flight and using a thread per radio. Finally, the Crazyswarm packs data more efficiently, so you can achieve more CFs/radio.

If you want to keep using crazyflie_ros, make sure to use 2M bandwidth with at least a separation of two between channels (e.g., 80, 82, 84, etc.). You should be able to operate 2-4 CFs/radio.
BjörnLindqvist
Beginner
Posts: 2
Joined: Thu Oct 15, 2020 10:40 am

Re: Communication issues for high numbers of Crazyflies

Post by BjörnLindqvist »

Hello, and thank you for the reply. I have considered moving to Crazyswarm, and it will definitely happen in the future, but we have quite a lot of modules running in ROS which makes the crazyflie-ros pack very beneficial. I'm going to try 2M bandwidth and see if there are less communication drops. What does point-to-point communication imply in this context, relating to the drops? Thanks!
whoenig
Expert
Posts: 395
Joined: Mon Oct 27, 2014 2:55 am

Re: Communication issues for high numbers of Crazyflies

Post by whoenig »

Point-to-point communication just means that the ROS package tries to ensure that packets can be exchanged between PC and each CF. If there is a timeout, an (uncaught) exception is thrown (and therefore the crazyflie_driver terminates). This is likely the desired behavior if you are flying 1-5 CFs, but not really for larger teams.
Post Reply