duburcqa/jiminy
Jiminy: a fast and portable Python/C++ simulator of poly-articulated robots with OpenAI Gym interface for reinforcement learning
What it solves
Jiminy addresses two needs in robotics research: simulating articulated systems with high physical accuracy and speed, and providing a flexible environment for machine learning. It avoids joint violations by using minimal coordinates and Lagrangian dynamics, making it numerically close to analytical solutions. At the same time, it offers a streamlined pipeline for training reinforcement learning agents, including turnkey integration with OpenAI Gym.
How it works
Jiminy is built around the Pinocchio library for efficient kinematics and dynamics. It simulates multi-body systems using minimal coordinates and Lagrangian dynamics, supporting both force-level spring-damper contacts and constraint solvers that obey the maximum energy dissipation principle. The C++ core has full Python bindings, so users can work in either language. For machine learning, Gym Jiminy wraps any robot defined by a URDF file into a standard Gym environment with a one-liner, and allows easy customization of physics, sensors, rewards, and termination conditions. It also logs rich simulation data to RAM or files, and supports offscreen GPU rendering without a graphical server.
Who it’s for
Jiminy is designed for robotics researchers and machine learning practitioners who need a fast, accurate simulator for articulated systems like legged robots, and who want to train reinforcement learning agents in a realistic physics environment. It is cross-platform (Linux, Mac, Windows) and can be installed via pip, making it accessible to hobbyists, students, and industry teams.
Highlights
- Physically accurate: uses minimal coordinates and Lagrangian dynamics to stay close to analytical solutions.
- Fast performance: built on Pinocchio, designed to handle computationally demanding distributed simulations.
- Ready for RL: fully compliant with the OpenAI Gym API; compatible with Stable Baselines 3, Tianshou, and RLlib.
- Modular learning pipeline: plug-and-play controllers, observers, composable rewards, and termination conditions.
- Easy installation: pip-only, no complex build steps.
- Rich logging: simulation logs in RAM, exportable to binary or HDF5.
- Interactive visualization: works in Jupyter, Colab, Binder, and VSCode with Meshcat integration.
- Pre-configured robots: includes cartpole, acrobot, pendulum, Ant, ANYmal, Cassie, and Atlas.
Related
- Project
- Project
- Project
- Project