Is there a drone/UAV simulator for ROS2 gazebo?

Hi,

I’ve been using the PX4 simulator for gazebo with ROS2 Foxy. Is there any support for other simulators that don’t use the PX4 flight software stack? I’m trying to simulate drone’s faster than real time and can’t find any ROS2 support for simulators like rotors_simulator and sjtu_drone. If there are any other vehicle simulation packages for drones please let me know!

Thanks!

1 Like

I haven’t run px4 and gazebo in ros2 yet, but in ros1 it supported faster than real-time operation. That should still work in ros2.

You may also want to check out the gym-pybullet-drones project at GitHub - utiasDSL/gym-pybullet-drones: PyBullet Gym environments for single and multi-agent reinforcement learning of quadcopter control

If you are not limited to Gazebo, you may consider Webots for drone simulations.

Webots supports drone simulations out-of-the-box, with no need for plugins. Also, recently we added an example that demonstrates the usage of the Mavic drone with ROS 2:

2 Likes

That’s is great!. Is there any option for autonomous vehicles?

Thanks! I’m not limited to gazebo, I’m just trying to find the fastest simulation environment for performing drone movements. I’m an undergraduate student right now and I’m working on both a reinforcement learning project with multiple drones and a general swarm autonomy project. My goal is to try and simulate around 6 drones without having a significant draw back in performance.

@victor_sillerico Yes! Here is a short summary of the current status:

@bmchale You can quickly evaluate the performance by yourself by downloading Webots and running the Mavic example (File > Open Sample World... and search for mavic)

1 Like

@lukicdarkoo thanks for the information!

1 Like

For others reference the PX4 project is already using ROS 2 and Gazebo together.

There’s a good user guide here:

https://docs.px4.io/master/en/ros/ros2_comm.html

If you adjust the gazebo world settings it will allow running faster than real time.

2 Likes

Does anyone know of any ROS2 APIs for drone control in Gazebo that aren’t PX4 with RTPS? I’ve been using that for a while, but find it difficult to build and maintain. I tried using mavros, however, it is still in early devleopment for ROS2 and has bugs that make it unusable for me (such as this).

Hi, I created a port of the sjtu_drone for gazebo classic and ROS2, you can find it here: GitHub - NovoG93/sjtu_drone: ROS/ ROS 2 Gazebo quadcopter simulator.

1 Like