Been building a decentralized swarm controller in C++ on ROS 2 Jazzy with Gazebo Harmonic, mostly for fun and to learn the whole stack without relying on an autopilot firmware. Each drone picks its own formation slot based on what its neighbors are doing, and obstacle avoidance is layered on top of that.
The wierd part is the sim behavior. When the group flies toward a cluster of tall pillars, they split around it fine, but every single drone drops to maybe a quarter speed as it passes the obstacle, even when its path is clearly wide open. Once clear of the pillar zone they speed back up and the formation snaps back into place. It looks almost like a choreographed slowdown, which makes me think it is not a coincidence. My guess is the avoidance repulsion term is fighting the formation attraction term and the net force just ends up tiny, so the velocity command barely moves them. But if that were it, would not the ones on the far edge of the group behave differently than the ones hugging the pillar? They all slow down the same amount, which is what is throwing me off.
Has anyone hit somthing like this before? Is it just the obvious tuning issue I think it is, or is there something about how these force terms combine that I am missing? Happy to share config values if that helps.