Skip to main content
QUICK REVIEW

[Paper Review] gym-gazebo2, a toolkit for reinforcement learning using ROS 2 and Gazebo

Nestor Gonzalez Lopez, Yue Leire Erro Nuin|arXiv (Cornell University)|Mar 14, 2019
Reinforcement Learning in RoboticsComputer Science21 references25 citations
TL;DR

This paper introduces gym-gazebo2, a ROS 2 and Gazebo-based reinforcement learning toolkit that extends OpenAI Gym for robotics, enabling training of modular robotic arms like MARA with millimeter-scale accuracy. It demonstrates successful policy transfer using PPO, achieving stable convergence in complex tasks involving position and orientation control with collision avoidance.

ABSTRACT

This paper presents an upgraded, real world application oriented version of gym-gazebo, the Robot Operating System (ROS) and Gazebo based Reinforcement Learning (RL) toolkit, which complies with OpenAI Gym. The content discusses the new ROS 2 based software architecture and summarizes the results obtained using Proximal Policy Optimization (PPO). Ultimately, the output of this work presents a benchmarking system for robotics that allows different techniques and algorithms to be compared using the same virtual conditions. We have evaluated environments with different levels of complexity of the Modular Articulated Robotic Arm (MARA), reaching accuracies in the millimeter scale. The converged results show the feasibility and usefulness of the gym-gazebo 2 toolkit, its potential and applicability in industrial use cases, using modular robots.

Motivation & Objective

  • To develop a scalable, production-ready RL framework for industrial robotics using ROS 2 and Gazebo.
  • To overcome limitations of the original gym-gazebo by redesigning the software architecture for better usability and maintainability.
  • To enable benchmarking of RL algorithms under consistent virtual conditions for modular articulated robotic arms.
  • To support real-world transferability by minimizing the reality gap through accurate simulation and domain randomization potential.
  • To facilitate community-driven development and extension with support for diverse grippers, sensors, and control modalities.

Proposed method

  • The toolkit integrates ROS 2's native Python client library for improved launch and initialization workflows.
  • It decouples from the original gym-gazebo fork, becoming a standalone library that registers environments in OpenAI Gym without structural dependencies.
  • The system uses a modular, robot-specific architecture that simplifies integration of new robotic platforms.
  • Proximal Policy Optimization (PPO) is employed with configurable hyperparameters, including learning rate decay and clipping range.
  • Reward shaping is applied using a weighted combination of position and orientation errors, with beta hyperparameter tuning to balance task objectives.
  • The framework supports domain randomization and RNN integration for enhanced robustness to environmental variations.

Experimental results

Research questions

  • RQ1Can a ROS 2-native RL toolkit be built that supports accurate, repeatable training of modular robotic arms in simulation?
  • RQ2How does the performance of PPO vary across different reward shaping configurations in position and orientation control tasks?
  • RQ3To what extent can the simulated policy be transferred to real-world robotic systems with minimal fine-tuning?
  • RQ4What impact do hyperparameter choices—particularly beta in the reward function—have on convergence speed and final accuracy?
  • RQ5How can the toolkit be architected to support extensibility for diverse robotic components like grippers and force/torque sensors?

Key findings

  • The MARAOrient environment achieved a mean distance error of 3.03±1.89 mm in the x-axis, 8.95±2.54 mm in the y-axis, and 5.85±4.38 mm in the z-axis, with orientation errors of 0.71±0.29°, 1.61±1.25°, and 7.52±2.48°.
  • In the MARACollisionOrient environment, the system achieved a mean distance error of 7.43±3.07 mm (x), 4.69±2.37 mm (y), and 5.18±3.44 mm (z), with orientation errors of 2.62±3.80°, 4.06±2.20°, and 6.43±6.81°.
  • The use of beta = 1.1 in the MARAOrient task improved policy stability and convergence by balancing position and orientation rewards.
  • Training with 1024 steps per episode (vs. 2048) was required for convergence in the MARACollisionOrient task, indicating sensitivity to trajectory length.
  • The toolkit demonstrated stable training and policy transfer feasibility, with entropy and reward curves showing consistent learning dynamics across experiments.
  • The framework supports future extensions with domain randomization and RNN-based policies to enhance robustness in dynamic or uncertain environments.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.