# Gazebo Gymnasium : Bringing RL to Gazebo

**URL:** <https://discourse.openrobotics.org/t/gazebo-gymnasium-bringing-rl-to-gazebo/58022>\
**Category:** Gazebo General\
**Tags:** gazebo, package, reinforcement-learn\
**Created:** [September 10, 2026, 11:43pm UTC](https://discourse.openrobotics.org/t/gazebo-gymnasium-bringing-rl-to-gazebo/58022 "2026-09-10T23:43:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CursedRock17](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/cursedrock17/32/17275_2.png) [@CursedRock17](https://discourse.openrobotics.org/u/CursedRock17)\
**Post date:** [September 10, 2026, 11:43pm UTC](https://discourse.openrobotics.org/t/gazebo-gymnasium-bringing-rl-to-gazebo/58022/1 "2026-09-10T23:43:00Z")

</div>

Good Afternoon Gazebo Community,

Over the past half year, I’ve been interested in integrating Reinforcement Learning (RL) within Gazebo in a manner that anybody can extend their RL problems into the Gazebo ecosystem, without having to worry about the fuss of Gazebo+Gymnasium. Since I know there’s been some [interest in making this work](https://github.com/gazebosim/gz-sim/issues/2662), I began working on a package, [gazebo\_gymnasium](https://github.com/CursedRock17/gazebo_gymnasium). It’s an independent package installed via [pixi](https://pixi.prefix.dev/latest/) which fuses the `gz` ecosystem with the all-so-popular [Gymnasium](https://gymnasium.farama.org/) RL library. It’s got the capability to extend into other Gazebo/ROS packages by using the bridge API, to [make your own](https://github.com/CursedRock17/gazebo_gymnasium/blob/main/docs/creating_your_own_agent.md) setup, removing the need to worry about Gazebo libraries.

To prove that this library works in a practical manner, we developed an end-end RL-trained line follower. We started by training in parallel in simulation, which it was then evaluated in simulation on various tracks

 ![gazebo_gymnasium_multi_agent_train](https://us1.discourse-cdn.com/flex022/uploads/ros/original/3X/8/0/808b229acc079edf2467bbacf3d9fbdee61aec69.png)

 ![media_images_test_trajectories_0_deaecd63d51b9e747087](https://us1.discourse-cdn.com/flex022/uploads/ros/original/3X/b/6/b628a11dfb2e93a411a004b7ea4a75392429ac0f.png)

then using techniques like parallelization and [domain randomization](https://github.com/CursedRock17/gazebo_gymnasium/blob/main/docs/domain_randomization.md) we again eval the more robust policy in simulation. Then actually deploy that on a real, custom differential drive rover that [our lab team](https://matrix.umd.edu/) built, which worked ([videos](https://drive.google.com/file/d/1_6eYlDvtKZ6uCskMVHLKSAtQga6Jeyzr/view?usp=drive_link) in the [Google Drive](https://drive.google.com/drive/folders/1T9XVxa9bK1pkQXn31IAVHgXsdCCgsnBK?usp=sharing)) to follow various lines and tracks.

![output_under_10mb](https://us1.discourse-cdn.com/flex022/uploads/ros/original/3X/6/f/6ffa4200d7432a26792069e06d8d2823dfae891d.gif)

Before proceeding, please note that while the ideas, practices, and training was done by human much of the code **was** written with Claude, keep that in mind when using the repo.

There’s integration with popular [RL libraries](https://github.com/CursedRock17/gazebo_gymnasium/blob/main/docs/rl_libraries.md) out of the box: Stable-Baselines3, skrl, rl\_games, and rsl\_rl. Along with [Tensorboard](https://github.com/CursedRock17/gazebo_gymnasium/blob/main/docs/reviewing_data.md#tensorboard), [HuggingFace](https://github.com/CursedRock17/gazebo_gymnasium/blob/main/docs/reviewing_data.md#hugging-face-hub) and Weights & Biases. We have some baselines testing and [examples](https://github.com/CursedRock17/gazebo_gymnasium/tree/main/docs/examples) through the 3D [Gymnasium examples](https://gymnasium.farama.org/environments/mujoco/) which have policies you can test via [Huggingface](https://huggingface.co/CursedRock17/gazebo-gymnasium-policies).

All in all, I know there’s still lots of work to do, more documentation to create, and there’s going to be problems when people go through it. But I’m hoping this is a good start to bridging the RL/Gz gap that currently exists in the modern community. I would very much enjoy questions, recommendations, and criticism if you can test/supply it.

Thanks, Lucas
