Simulator for Flocking Algorithm #562
-
Hi! Thanks for your amazing work. I'm pretty new to all this stuff regarding Ros 2, crazyflies etc.., so I'm trying to wrap my head around it. I have to implement a very basic flocking algorithm (let's say around 8-10 robots) for a university project, but I would like to simulate the whole algorithm before using the real robots. Now, ideally a base station would publish a /cmd_hover topic, but as i see from this link, this is not possible with the sim backend. Also, I need to give a different command to every robot, so I guess I have to publish a different topic for every crazyflie. What's the best way to simulate this situation? I've tested this, but just with one robot: it seems easy to use, but I have no idea how to adapt it to multiple robots in simulation using crazyswarm2. I saw there's also this, but I'm not sure what's the difference to using gazebo as done in the first repo. Sorry if the question is a bit generic and somehow stupid. Just a quick insight would be immensely helpful. Thank you in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You could use cmd_full_state (just provide desired pos and vel; you can integrate the position on your flocking controller side). The current simulator in Crazyswarm2 is pretty slow if physics is enabled, so I would first disable the physics backend and just visualize the setpoint, then you can try some of the more sophisticated backends. |
Beta Was this translation helpful? Give feedback.
You could use cmd_full_state (just provide desired pos and vel; you can integrate the position on your flocking controller side).
The current simulator in Crazyswarm2 is pretty slow if physics is enabled, so I would first disable the physics backend and just visualize the setpoint, then you can try some of the more sophisticated backends.