/jiminy

Jiminy is an extremely fast and light weight Python/C++ simulator of poly-articulated systems compatible with openAI Gym.

Primary LanguageC++MIT LicenseMIT

Jiminy simulator

Description

Jiminy is an open-source C++ simulator of poly-articulated systems, under the first restriction that the contact with the ground can be reduced to a dynamic set of points and the second restriction that the collisions between bodies or the environment can be neglected.

It is built upon Pinocchio, which is an open-source implementing highly efficient Rigid Body Algorithms for poly-articulated systems. It is used to handle low-level physics calculations related to the system, while the effect of the environment on it is handled by Jiminy itself. The integration of time is based on the open-source library Boost Odeint.

The visualisation relies on the open-source client Gepetto-Viewer, which is based on CORBA and omniORB at low-level, or alternatively Meshcat, which is a remotely-controllable web-based visualizer especially well suited to Jupyter notebook running on remote servers as one can display directly in a Jupyter cell. It is possible to do real-time visual rendering and to replay a simulation afterward.

The data of the simulation can be exported in CSV, raw binary format, or read directly from the RAM memory to avoid any disk access. The complete list of features, development status, and changelog are available on the wiki.

Python bindings have been written using the open-source library Boost Python. It supports both Python2 and Python3, yet it is recommended to use Python3 over Python2 since support will be dropped in the future.

**The Doxygen documentation is available on Github.io and locally in docs/index.html. **

Thanks to Jan-Lukas Wynen for Doxygen That Style.

Demo


Jiminy learning

Description

The Machine Learning library Open AI Gym is fully supported. Abstract environments and a few for toy models are provided: a cartpole, an acrobot, and a pendulum.

Gym Jiminy is only compatible with Python3. Although Python3 is not required to use openAI Gym strictly speaking, most of the Reinforcement Learning packages implementing standard algorithms does not support Python2. For instance, Stable Baselines 3, RL Coach, Tianshou, or Rllib. RL Coach leverages the open-source Machine Learning framework Tensorflow as backend, Stable Baselines 3 and Tianshou use its counterpart Pytorch, and Rllib supports both. Note that Stable Baselines 3, Tianshou and Rllib are compatible with Linux, Mac OS and Windows.

A few learning examples are provided. Most of them rely on those packages, but one implements the DQN algorithm from scratch using Pytorch.

Demo


Getting started

Jiminy is compatible with Linux and Windows It supports both Python2.7 and Python3.6+. Jiminy is distributed on PyPi for Python 3.6/3.7/3.8 on Linux and Windows, and can be installed using pip. Furthermore, helper scripts to built the dependencies from source on Windows and Linux are available. The complete installation instructions are available here.