Skip to content

An gym-compatible environment consists of trifinger robot and a cube

License

Notifications You must be signed in to change notification settings

xuanhien070594/trifinger_mujoco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

trifinger-mujoco

An gym-like environment consists of trifinger robot and a cube

Screenshots of different (Tri)Finger robots in simulation

Installation

Mujuco installation

  • Step 1: Download Mujoco 2.10 from this link
  • Step 2: Unzip and copy folder mujoco210 to under folder ~/.mujoco/ (create this folder if it doesn't exist)
  • Step 3: Add this line export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/{your_user_name}/.mujoco/mujoco210/bin to your ~/.bashrc or ~/.zshrc file
  • Step 4: Source your ~/.bashrc or ~/.zshrc file

Mujoco test

To ensure Mujoco is installed properly, run the following command ./mujoco/mujoco210/bin/simulate {path_to_this_repo}/trifinger_mujoco/models/trifinger_with_cube_torque_ctrl.xml

Trifinger-mujoco installation

To install, under the package's folder, run pip install -e .. It will install all necessary packages.

API

Here's an example using the "Trifinger-v0" environment:

import trifinger_mujoco
import gym
import numpy as np

env = gym.make("Trifinger-v0")
observation = env.reset()
env.render()

for _ in range(1000):
    action = np.random.uniform(low=-0.3, high=0.3, size=9)
    observation, reward, done, info = env.step(action)
    env.render()

    if done:
        break

env.close()

Attribution notes

  • STL files of trifinger are obtained from trifinger_simulation
  • Math utility functions are based on package baldor by Francisco Suárez Ruiz

About

An gym-compatible environment consists of trifinger robot and a cube

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages