GithubHelp home page GithubHelp logo

wiplug / mujoco-py Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openai/mujoco-py

0.0 1.0 0.0 4.53 MB

MuJoCo is a physics engine for detailed, efficient rigid body simulations with contacts. mujoco-py allows using MuJoCo from Python 3.

License: Other

Makefile 0.21% Python 84.45% C 15.31% C++ 0.04%

mujoco-py's Introduction

mujoco-py Documentation Build Status Build status

MuJoCo is a physics engine for detailed, efficient rigid body simulations with contacts. mujoco-py allows using MuJoCo from Python 3.

Synopsis

Requirements

The following platforms are currently supported:

  • Linux with Python 3.5.2. See the Dockerfile for the canonical list of system dependencies. Support for Python 3.6 is planned.
  • OS X with Python 3.5.2. Support for Python 3.6 is planned.
  • Windows (experimental) with Python 3.5.2. See the Appveyor file for the canonical list of dependencies.

Python 2 has been desupported since 1.50.1.0. Python 2 users can stay on the 0.5 branch. The latest release there is 0.5.7 which can be installed with pip install mujoco-py==0.5.7.

Install MuJoCo

  1. Obtain a 30-day free trial on the MuJoCo website or free license if you are a student. The license key will arrive in an email with your username and password.
  2. Download the MuJoCo version 1.50 binaries for Linux, OSX, or Windows.
  3. Unzip the downloaded mjpro150 directory into ~/.mujoco/mjpro150, and place your license key (the mjkey.txt file from your email) at ~/.mujoco/mjkey.txt.

Install and use mujoco-py

To include mujoco-py in your own package, add it to your requirements like so:

mujoco-py<1.50.2,>=1.50.1

To play with mujoco-py interactively, follow these steps:

$ pip3 install -U 'mujoco-py<1.50.2,>=1.50.1'
$ python3
import mujoco_py
from os.path import dirname
model = mujoco_py.load_model_from_path(dirname(dirname(mujoco_py.__file__))  +"/xmls/claw.xml")
sim = mujoco_py.MjSim(model)

print(sim.data.qpos)
# [ 0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.  0.]

sim.step()
print(sim.data.qpos)
# [  2.09217903e-06  -1.82329050e-12  -1.16711384e-07  -4.69613872e-11
#   -1.43931860e-05   4.73350204e-10  -3.23749942e-05  -1.19854057e-13
#   -2.39251380e-08  -4.46750545e-07   1.78771599e-09  -1.04232280e-08]

See the full documentation for advanced usage.

Usage Examples

A number of examples demonstrating some advanced features of mujoco-py can be found in examples/. These include:

See the full documentation for advanced usage.

Development

To run the provided unit and integrations tests:

make test

Credits

mujoco-py is maintained by the OpenAI Robotics team. Contributors include:

  • Alex Ray
  • Bob McGrew
  • Jonas Schneider
  • Jonathan Ho
  • Peter Welinder
  • Wojciech Zaremba

mujoco-py's People

Contributors

bmcgrew avatar dementrock avatar gautam1858 avatar gdb avatar jeffkaufman avatar jonasschneider avatar machinaut avatar rfong avatar tlbtlbtlb avatar tylerneylon avatar welinder avatar wojzaremba 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.