Page 1 of 1

Unable to fly multiple drones in another environment

Posted: Mon Oct 25, 2021 10:46 pm
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?

Re: Unable to fly multiple drones in another environment

Posted: Tue Oct 26, 2021 4:12 am
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

Re: Unable to fly multiple drones in another environment

Posted: Tue Oct 26, 2021 2:31 pm
by UNI_Student
What other information do you think would be useful for debugging?
I've attached the imports my program uses

Re: Unable to fly multiple drones in another environment

Posted: Wed Oct 27, 2021 7:39 am
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

Re: Unable to fly multiple drones in another environment

Posted: Tue Nov 02, 2021 5:33 pm
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.

Re: Unable to fly multiple drones in another environment

Posted: Wed Nov 03, 2021 7:31 am
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