Coder Social home page Coder Social logo

trendingtechnology / jiminy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from duburcqa/jiminy

0.0 1.0 0.0 99.39 MB

Jiminy is a fast and light weight Python/C++ simulator of poly-articulated systems with OpenAI Gym interface for reinforcement learning.

Home Page: https://duburcqa.github.io/jiminy

License: MIT License

CMake 2.61% C++ 53.59% Python 39.24% HTML 0.34% JavaScript 2.66% Shell 0.74% PowerShell 0.82%

jiminy's Introduction


Jiminy is a fast and lightweight cross-platform open-source simulator for poly-articulated systems. It was built with two ideas in mind:

  • provide a fast yet physically accurate simulator for robotics research.

Jiminy is built around Pinocchio, an open-source fast and efficient kinematics and dynamics library. Jiminy thus uses minimal coordinates and Lagrangian dynamics to simulate an articulated system: this makes Jiminy as close as numerically possible to an analytical solution, without the risk of joint violation.

  • build an efficient and flexible platform for machine learning in robotics.

Beside a strong focus on performance to answer machine learning's need for running computationally demanding distributed simulations, Jiminy offers convenience tools for learning via a dedicated module Gym-Jiminy. It is fully compliant with gym standard API and provides an highly customizable wrapper to interface any robotics system with state-of-the-art learning frameworks.

Key features

General

  • Simulation of multi-body systems using minimal coordinates and Lagrangian dynamics.
  • Comprehensive API for computing dynamic quantities and their derivatives, exposing and extending Pinocchio.
  • C++ core with full python bindings, providing frontend API parity between both languages.
  • Designed with machine learning in mind, with seemless wrapping of robots as OpenAI Gym environments using one-liners. Jiminy provides both the physical engine and the robot model (including sensors) required for learning.
  • Easy to install: pip is all that is needed to get you started !
  • Dedicated integration in jupyter notebook working out-of-the-box - including 3D rendering using Meshcat. This facilitates working on remote headless environnement such as machine learning clusters.
  • Cross-platform offscreen rendering capability, without requiring X-server, based on Panda3d.
  • Rich simulation log output, easily customizable for recording, introspection and debugging. The simulation log is made available in RAM directly for fast access, and can be exported in raw binary, CSV or HDF5 format.
  • Available for both Linux and Windows platforms.

Physics

  • Provide both classical phenomenological force-level spring-damper contact model and impulse-level LCP based on maximum energy dissipation principle.
  • Support contact and collision with the ground, using either a fixed set of contact points or collision meshes and primitives.
  • Able to simulate multiple articulated systems simultaneously, interacting with each other, to support use cases such as multi-agent reinforcement learning or swarm robotics.
  • Support of compliant joints with force-based spring-damper dynamics, to model joint elasticity, a common phenomenon particularly in legged robotics.
  • Simulate both continuous or discrete-time controller, with possibly different controller and sensor update frequencies.

A more complete list of features, development status, and changelog are available on the wiki.

The documentation is available on Github.io, or locally in docs/html/index.html if built from source.

Gym Jiminy

Gym Jiminy is an interface between Jiminy simulator and reinforcement learning frameworks. It is fully compliant with now standard Open AI Gym API. Additionally, it offers a generic and easily configurable learning environment for learning locomotion tasks, with minimal intervention from the user, who usually only needs to provide the robot's URDF file. Furthermore, Gym Jiminy enables easy modification of many aspects of the simulation to provide richer exploration and ensure robust learning. This ranges from external perturbation forces to sensor noise and bias, including randomization of masses and inertias, ground friction model or even gravity itself. Note that learning can easily be done on any high-level dynamics features, or restricted to mock sensor data for end-to-end learning.

Gym is cross-platform and compatible with most Reinforcement Learning frameworks implementing standard algorithms. 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. A few learning examples relying on those packages are also provided.

Pre-configured environments for some well-known toys models and reference robotics platforms are provided: cartpole, acrobot, pendulum, Ant, ANYmal, and Cassie, and Atlas.

Demo

Getting started

Jiminy and Gym Jiminy are compatible with Linux and Windows, and supports Python3.6+. They are distributed on PyPi for Python 3.6/3.7/3.8/3.9 for both platform, so they can be installed using pip:

# For installing Jiminy
python -m pip install jiminy_py

# For installing Gym Jiminy
python -m pip install gym_jiminy[all]

Detailed installation instructions, including building from source, are available here.

jiminy's People

Contributors

a-roucher avatar duburcqa avatar matthieuvigne avatar stanislas-brossette avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.