Repository navigation
Replies: 4 comments 2 replies
|
I am implementing the APF logic: In order to use cmdVelocityWorld, I had done some changes in crazyflie_server.py: |
|
Hi Qassim, Thanks for reporting this! I will make an issue to investigate this later. Both me and @whoenig are very occupied in the next few weeks so we have limited availability to check this out. So if you are making any other observations in the mean time please update the issue. |
|
Thank you for the feedback. As I'm working on my thesis, I was hoping to know where the issue could be in: Any insight into which of these areas is most likely the bottleneck would be incredibly helpful. |
|
My guess is that this is a bug with the software-in-the-loop. Which controller are you using? Perhaps setting any state-based controller gains to 0 (i.e., I-gains) helps? |
Uh oh!
There was an error while loading. Please reload this page.
I am experiencing a severe flight stability issue when scaling a Crazyswarm2 simulation from 2 to 3 (or 4) drones in RViz. The system uses two custom logic scripts: one monitors the proximity of other drones and boundaries, and the other uses that data to calculate and send velocity commands via cmdVelocityWorld to repel them from collisions and drive them toward random points.
While a 2-drone setup correctly follows this velocity logic and maintains stable flight, adding a third drone causes the swarm to lose stability and sink to the floor immediately after the takeoff phase.
The simulation relies on the following Crazyswarm2 stack:
Behaviour Observed with 2 Drones:
When simulating 2 drones, the simulation behaves properly in RViz. The drones successfully take off, navigate towards random points using cmdVelocityWorld, and properly repel from each other and the boundaries. Notably, with max_dt set to 0.001 for crazyflie_server.py, the CPU usage touches 95–97%, but the drones remain completely stable and execute the velocity logic perfectly.
Behaviour Observed with 3 Drones:
When simulating 3 or more drones, the initial takeoff phase succeeds (drones take off simultaneously and reach the desired altitude). However, the moment they are supposed to start moving toward the Random Point, they fail to follow the velocity logic. Instead, the drones start spinning on their z-axis (yaw instability) and eventually sink to the floor.
Troubleshooting & max_dt Testing:
To determine if the bottleneck was CPU exhaustion or physics backend timing, I tested several max_dt values in crazyflie_server.py (which triggers np.py and the simulation time). Note: omitting max_dt defaults it to 0.0, running as fast as the CPU allows.
I am struggling to identify exactly where the bottleneck lies when scaling to 3 drones, given that 2 drones fly perfectly even under high (97%) CPU load.
My primary suspicion revolves around the PID controller frequency:
would it possible for you to check my repository?
I have attached the video of 2 and 3 drones flying.
2.drones.mp4
3.Drones.mp4
All reactions