Unable to fly multiple drones in another environment

Post here to get support
Post Reply
UNI_Student
Beginner
Posts: 3
Joined: Mon Oct 25, 2021 10:34 pm

Unable to fly multiple drones in another environment

Post by UNI_Student »

I am using the BitcrazeVM. I wrote a python program that uses the MotionCommander and threads to fly 5 drones using one dongle. The Threads are given different arguments so that the drones all fly a unique course. This program runs fine at my house. However, when I run the same program on campus in my school lab I get this Traceback error (Screenshot attached).

I've tried on several different occasions and get this error when I run 4-5 drones on campus. With 3 or less drones it will run fine.
I took the drones home again and the script runs fine with 5 drones at my house.

What could be causing this?
Does anyone have any suggestions on what I could do to fix this issue?
Attachments
Screen Shot 2021-10-18 at 10.06.57 PM.png
jonasdn
Expert
Posts: 132
Joined: Mon Mar 01, 2021 3:13 pm

Re: Unable to fly multiple drones in another environment

Post by jonasdn »

Hi UNI_Student!

This is hard to debug without knowing more! We do not know of any general thing that could lead to this. By the way, have you tried using the Swarm class to control them instead of spawning your own threads? See reference here: https://www.bitcraze.io/documentation/r ... lie/swarm/

And some examples are located in the python-library: https://github.com/bitcraze/crazyflie-l ... ples/swarm

Regards
Jonas
UNI_Student
Beginner
Posts: 3
Joined: Mon Oct 25, 2021 10:34 pm

Re: Unable to fly multiple drones in another environment

Post by UNI_Student »

What other information do you think would be useful for debugging?
I've attached the imports my program uses
Attachments
Screen Shot 2021-10-26 at 9.29.08 AM.png
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Unable to fly multiple drones in another environment

Post by kimberly »

Hi!

So what I assume that Jonas meant is to share more of the code where it goes wrong and perhaps share an minimal example of where it goes wrong. But it seems to be already clear what your issue is.

From the imports I can see that you are not using the swarm class of the CFLIB, so please try out the swarm examples that Jonas gave in the previous post and take a look at the api
UNI_Student
Beginner
Posts: 3
Joined: Mon Oct 25, 2021 10:34 pm

Re: Unable to fly multiple drones in another environment

Post by UNI_Student »

Do you know of any examples using swarm with individual threads that also use the motion commander instead of hI-commander?
I have attached a chip on top of my drones. When I use swarmSequence.py with the chip attached, the drones do not have a stable takeoff and crash. I want to be able to use mc so that I can determine the direction and speed. It seems they are taking off and switching positions too fast. I don't understand how to change this using swarm sequence, but cannot find any resources.
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: Unable to fly multiple drones in another environment

Post by kristoffer »

I don't think we have such an example. If you run the Motion commander using the Swarm class they will all run in separate threads. The simplest way to get there is probably to start from a script using the Swarm class and High level commander and essentially replace the high level commander with the swarm commander
Post Reply