Connect to multiple cfs via python lib

Firmware/software/electronics
Post Reply
Andy
Beginner
Posts: 7
Joined: Wed Jan 16, 2019 5:17 am

Connect to multiple cfs via python lib

Post by Andy »

Hey guys,

I'm getting started with controlling Crazyflies via the python library. When I switch on one cf and execute the basiclog.py or ramp.py, everything works perfectly. However, when a second cf is switched on nearby, after running one of the scripts the client detects several radios and connects to one of them (as expected), but then either stalls directly after printing "Connecting to radio://..." or prints "Connection to radio://... failed: Too many packets lost" after the previous message and then locks up.

Is that a common issue when operating with several cfs on one crazy dongle? Do I need to add a ROS layer or a second radio dongle to overcome this or is there another way to fix it. In the end I want to operate 5 Crazyflies simultaneously.

Thanks!
Andy
Beginner
Posts: 7
Joined: Wed Jan 16, 2019 5:17 am

Re: Connect to multiple cfs via python lib

Post by Andy »

Small update: My mistake was to assume that the script would scan for available cfs, check for their addresses and connect to them automatically. Once I found out that there were actually two addresses hard-coded in the scripts, it was easy to adapt them to my system and get it working, even with only one antenna.

The question that remains is how many cfs can be controlled via one radio dongle? And does anybody have experience with common problems regarding the communication protocoll when handling multiple units?

Cheers
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Connect to multiple cfs via python lib

Post by tobias »

Good you found the problem!

How many CFs you can connect is more of a bandwidth problem. You can currently send around 1000 packets per second back and forth which you can divide around your swarm. I would say 3-5 CFs works with most use cases but if you need e.g. a lot of logging data maybe only one is possible.
Post Reply