Threading multiple crazyflies (not using swarm class), erratic flying. How to fix? #1749
Unanswered
john-amadora
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I coded in control of 3 synchronous drones via the python wrapper for the crazyflie and using only the motion commander class for movement. I did this instead of the swarm class because each drone will be having its own command and the swarm class is limited to sending setpoints, synchronous movement, and sequential movement.
I implemented my system using threading in python. That is, the crazyflie and the motion commander is initialized in a function and the thread is enabled three times in main all with its own URI.
When one drone is enabled, hovering is steady, but when 3 drones are enabled, the drones tend to drift by a lot.
How can I fix this? I am thinking that perhaps they are sharing state estimates. Any ideas?
Here's what the function looks like. This is called 3 times in main to thread together. For more context, I want to control each drone based on command submitted by an external controller (handled by another thread). May not be the smartest implementation, I am not a compsci major after all. I just develop as needed.
Beta Was this translation helpful? Give feedback.
All reactions