tayalmanan28 / MuJoCo-Tutorial

Tutorial on how to get started with MuJoCo Simulation Platform. MuJoCo stands for Multi-Joint dynamics with Contact. It was acquired and made freely available by DeepMind in October 2021, and open sourced in May 2022. Feel free to contribute. Show your support by ✨this repository.
MIT License
149 stars 27 forks source link
deepmind hacktoberfest hacktoberfest-accepted hacktoberfest2022 mujoco mujoco-environments python robotics simulation

All Contributors

logo

MuJoCo Tutorial

Mujoco Tutorial πŸ‘“

Tutorial on how to get started with MuJoCo simulations.

Installation and Getting started: πŸš€

Conda Environment Setup 🐍

To install Anaconda follow the instructions in this webpage (Ubuntu 20.04)

Create a conda environment for MuJoCo setup:

conda create --name mujoco-tut  

Switch to the newly create environment (you will notice the name of the environment on the command line in the extreme left):

conda activate mujoco-tut  

Then, clone the repository on your system:

git clone https://github.com/tayalmanan28/Mujoco-Tutorial.git

Install the following required packages:

pip install -r requirements.txt

Jupyter notebook

conda install nb_conda_kernels  

rendering ffmpeg

sudo apt install -y ffmpeg

Running example πŸ‘‰

python3 run.py

Contents

The main purpose of this repo is providing the starter code required to run a MuJoCo simulation with keyboard and mouse callbacks using its Python bindings. The base class is in mujoco_base.py. To create your own MuJoCo simulation, you can create a new class that inherits mujoco_base.MuJoCoBase. An example of this usage is provided in example_projectile.py, the new class should implement the functions

- reset()       # Initializes the enviroment and control callback
- controller()  # Adds control actions
- simulate()    # Copy the simulate() function from 
                # mujoco_base.MuJoCoBase and add your own twist

MuJoCo Examples πŸ‘‰

- Projectile with drag
- Control a simple pendulum
- Control a double pendulum
- Leg swing
- Manipulator drawing
- Control an underactuated pendulum
- Gymnast swing/release on a bar
- 2D Hopper
- Initial Value Problem
- Inverse Kinematics
- 2D Biped

READMEs in different Languages

espaΓ±ol

Contributing 🀝

So you can contribute to this repository in 2 ways:

  1. By adding new examples of MuJoCo environments
  2. By help in resolving the existing issues

For Contributing a new example to this repo:

For Contributions directly from Issues:

Soon, we will review your request and merge your pull requests to the main branch of project if your pull request is valid. You will also get notification once your pull request is merged with existing code base. After that you will be able to see your details in contributor section on the page below.

LICENSE πŸ“ƒ

The code is licenced under the MIT license and free to use by anyone without any restrictions. πŸ‘


Our Top Contributors

Currently we are also participating in Hacktober Fest 2022 πŸŽƒ so if you want to contribute to this repository please follow the contributing instructions given in the contributing Section below πŸ˜‰ image