2 minute read

Three-Arm System Build up for Hardware Notebook

This blog will record some cool stuff that I recently worked on, on how to configure the three robot arm in our lab (UR5e x 1, UR10e x 1 and WAM x 1.) Note that this instruction has lots of changes compared with the instruction in my

. Don’t use that one for this project!

-Last update: 2026.4.17

Step 1: Install anaconda

Anaconda3-2024.06-1-Linux-x86_64.sh (you can install any version later than 2021 based on my tests.)

sudo chmod +x Anaconda3-2024.06-1-Linux-x86_64.sh
./Anaconda3-2024.06-1-Linux-x86_64.sh

Step 2 : install git

sudo apt install git

Step 3 : install the MuJoCo library

  1. Download the MuJoCo library from

    https://mujoco.org/download/mujoco210-linux-x86_64.tar.gz

(Update: now you don’t need to do this, just follow the operations below.)

  1. create a hidden folder :
sudo mkdir /home/agman/.mujoco
sudo chmod a+rwx /home/agman/.mujoco

(Note: if the folder you created without any permission, use “sudo chmod a+rwx /path/to/file” to give the folder permission)

cd /home/agman/.mujoco
git clone https://github.com/gaolongsen/mujoco210.git
  1. include these lines in .bashrc file(terminal command: gedit ~/.bashrc):

    gedit ~/.bashrc
    
  2. Then add the following four lines on the bottom of you .bashrc file:

export LD_LIBRARY_PATH=/home/agman/.mujoco/mujoco210/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nvidia
export PATH="$LD_LIBRARY_PATH:$PATH"
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so

(:point_up_2:Note that don’t forget to replace the wam with your local PC name.)

Note that for ubuntu 22.04, you should also install the following package:

sudo apt install libglew-dev
  1. source ~/.bashrc
    
  2. Test that the library is installed by going into:
cd ~/.mujoco/mujoco210/bin
./simulate ../model/humanoid.xml

If you are successful, you will see like this:

Step 4 Install mujoco-py:

conda create --name mujoco_py python=3.10
conda activate mujoco_py
sudo apt update
sudo apt-get install patchelf
sudo apt-get install python3-dev build-essential libssl-dev libffi-dev libxml2-dev 

Note that below command is different than the instructions for Ubuntu 20.04 with Python 3.8, be care!

sudo apt-get install libxslt1-dev zlib1g-dev libglew2.2 libglew-dev python3-pip
git clone https://github.com/openai/mujoco-py
cd mujoco-py
pip install -r requirements.txt
pip install -r requirements.dev.txt
pip3 install -e . --no-cache

Step 5 reboot your machine

sudo reboot

Step 6 run these commands

conda activate mujoco_py
sudo apt install libosmesa6-dev libgl1-mesa-glx libglfw3
sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.1 
sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so
pip3 install -U 'mujoco-py<2.2,>=2.1'
pip install "cython<3"

(PS: above command you don’t have to do if you run the following example test without any error happened. But based on our test, you probably need to downgrade the cython to avoid any potential problem.)

cd examples
python3 setting_state.py

If you successfully setup your environment, you will see the demo run like this:

If you’re getting a Cython error, try:

pip install "cython<3"

Note: if you use Pycharm as your compiler, don’t forget to add this line on Run -> Edit Configuration -> Environment variables:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/wam/.mujoco/mujoco210/bin:/usr/lib/nvidia;LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so

(:point_up_2:Note that don’t forget to replace the wam with your local PC name.)

Step 7 Install ROS2 Humble

Please follow the official website here: https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html