Following a Trajectory with a Swarm

Discussions about autonomous flight in general, regardless of positioning method
Post Reply
Posts: 6
Joined: Tue Dec 01, 2020 5:03 pm

Following a Trajectory with a Swarm

Post by crazyfordrones »


I'm trying to create a script that uses the Figure8 trajectory used in crazyflie-lib-python/examples/ and allows this trajectory to run on a Swarm. I want two drones to run the Figure8 trajectory at the same time next to each other. I'm new to coding, so could use some guidance on what is wrong with my code. I'm currently using the lighthouse deck and positioning system on both crazyflies.
(8.07 KiB) Downloaded 30 times
I believe my main issue is with understanding how the Swarm class works, and how the swarm.parallel_safe() command is properly used. When I run my script currently, I get the following error:

Traceback (most recent call last):
File "", line 174, in <module>
File "/home/bitcraze/.local/lib/python3.6/site-packages/cflib/crazyflie/", line 183, in parallel_safe
raise Exception('One or more threads raised an exception when '
Exception: One or more threads raised an exception when executing parallel task

Any guidance would be greatly appreciated!
Posts: 477
Joined: Tue Jun 30, 2015 7:47 am

Re: Following a Trajectory with a Swarm

Post by kristoffer »


Yes, the Swarm class is not as easy to use as one would like...

I improved the error reporting a bit, ... issues/179
Pull in the latest version of the lib and run your code again. Hopefully you will get the call stack of the original exception
Post Reply