An gym-like environment consists of trifinger robot and a cube
- 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
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
To install, under the package's folder, run pip install -e .
. It will install all necessary packages.
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()
- STL files of trifinger are obtained from trifinger_simulation
- Math utility functions are based on package baldor by Francisco Suárez Ruiz