Skip to content

Framework for developing OpenAI Gym robotics environments simulated with Ignition Gazebo

License

Notifications You must be signed in to change notification settings

traversaro/gym-ignition

 
 

Repository files navigation

gym-ignition

WhatWhyHowDemoSetupCitation


General C++ Standard Size Size
CI/CD Docker Images CI PyPI CD Codacy Badge
gym-ignition


What

Gym-Ignition is a framework to create reproducible robotics environments for reinforcement learning research.

The project is composed of the following components:

Component Description
ScenarI/O Scene Interfaces for Robot Input / Output is a set of C++ interfaces to abstract the interfacing with simulated and real robots.
Gazebo ScenarI/O Ignition Gazebo bindings that expose the ScenarI/O interfaces.
gym-ignition Python package that provides the tooling to create OpenAI Gym environments for robot learning.
gym-ignition-environments Demo environments created with gym-ignition and gym-ignition-models.
Gympp An experimental C++ port of the OpenAI Gym interfaces, used to create pure C++ environments.

Disclaimer: we do not provide support for experimental components.

Why

Refer to the Citation for the extended rationale behind this project.

TL;DR

We designed Gym-Ignition driven by the following reasons:

  • Advances in RL research are pushed by the development of more complex environments, and vice versa.
  • There's no standard framework in the robotics community for creating simulated robotic environments.
  • Environments that can be transferred from simulation to reality with minimal changes are yet to be seen.
  • Alternative solutions are not developed by roboticists for roboticist, and therefore they do not use familiar tools.
  • Existing robotics environments are typically difficult to adapt to run on different physics engines and different robots.
  • Only few solutions offer realistic rendering capabilities.

How

This project interfaces with the new generation of the Gazebo simulator, called Ignition Gazebo. It is part of the new Ignition Robotics suite developed by Open Robotics.

Ignition Robotics is currently under heavy development. Though, it already offers enough functionalities that fit this project's aims:

  • Simulator-as-a-library
  • New modular architecture
  • C++ utilities developed with a robotic mindset
  • New abstractions of physics engines and rendering engines that exploit runtime plugins
  • Full support of DART and coming support of bullet3
  • Support of distributed simulations
  • Well maintained and packaged
  • Ignition Fuel database to download models and worlds

Our Gazebo ScenarI/O component provides Python bindings of the simulator that are comparable to other popular solutions like pybullet and mujoco-py.

Features

At the time of writing, Gym-Ignition offers the following features:

  • Environments compatible with OpenAI Gym
  • Worlds and models are SDF descriptions
  • Reproducibility guarantees
  • Accelerated and multiprocess execution
  • Environments are a combination of three elements:
    • Task: the logic of the decision-making problem. It defines how to process the given action, how to calculate the reward, how to structure the observation, and how to reset the environment. Task objects are robot-independent and runtime-independent.
    • World: unified interface to access world resources.
    • Runtime: implements the actual step of the environment. Simulated runtimes step the simulator, real-time runtimes deal with real-time execution constraints. A Task object can be executed by any runtime without any change.
  • Experimental support to create C++ environments

Demo

We provide a docker image that shows few rollouts executed by a random policy on a cartpole model:

docker pull diegoferigo/gym-ignition:latest
pip3 install rocker

# Intel GPU
rocker --devices /dev/dri --x11 diegoferigo/gym-ignition /github/examples/python/launch_cartpole.py

# Nvidia GPU
rocker --x11 --nvidia diegoferigo/gym-ignition /github/examples/python/launch_cartpole.py

Setup

Visit the Installation section of our website for updated installation instructions. Make sure to select the correct branch since the installation could differ depending on the branch you're interested.

Citation

@INPROCEEDINGS{ferigo2020gymignition,
    title={Gym-Ignition: Reproducible Robotic Simulations for Reinforcement Learning},
    author={D. {Ferigo} and S. {Traversaro} and G. {Metta} and D. {Pucci}},
    booktitle={2020 IEEE/SICE International Symposium on System Integration (SII)},
    year={2020},
    pages={885-890},
    doi={10.1109/SII46433.2020.9025951}
} 

Disclaimer: Gym-Ignition is an independent project and is not related by any means to OpenAI and Open Robotics.

About

Framework for developing OpenAI Gym robotics environments simulated with Ignition Gazebo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 53.9%
  • Python 26.3%
  • CMake 17.6%
  • SWIG 1.2%
  • Dockerfile 0.7%
  • C 0.2%
  • Shell 0.1%