[go: up one dir, main page]

0% found this document useful (0 votes)
5 views8 pages

Linux Install

This document is an installation guide for Robosuite on Windows 10 using a Linux virtual machine, detailing steps for setting up Mujoco, PyCharm, and Anaconda. It includes commands for terminal input, file organization, and environment configuration necessary for successful installation and operation. The guide also provides troubleshooting tips and configuration settings for the user's system environment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views8 pages

Linux Install

This document is an installation guide for Robosuite on Windows 10 using a Linux virtual machine, detailing steps for setting up Mujoco, PyCharm, and Anaconda. It includes commands for terminal input, file organization, and environment configuration necessary for successful installation and operation. The guide also provides troubleshooting tips and configuration settings for the user's system environment.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

7/10/2021

Installation guide for Robosuite on Windows 10 using Linux configured on Virtual Machine.
Guide can be used to install Robosuite, Mujoco on regular Linux as well

Virtual Machine on Windows 10 (if you run ubuntu skip this part)
1) Install virtual machine by following this great tutorial. (Oracle VM VirtualBox)
https://www.youtube.com/watch?v=x5MhydijWmc&t=1007s
2) After creating the new Linux environment, we open Terminal and all of the below commands
are inputted in the Terminal (in the VM, we do not use Windows anymore)
3) sudo apt update
4) sudo apt upgrade
5) sudo apt install xrdp
6) sudo systemctl enable –now xrdp
7) sudo ufw allow from any to any port 3389 proto tcp
Mujoco
8) Download mujoco200 linux from the official website https://www.roboti.us/index.html

Create .mujoco folder in the following way

9) mkdir ~/.mujoco
10) cd ~/.mujoco
The unzipped mujoco200_linux folder place in home directory and change name to mujoco200.
The created folder .mujoco can be seen by clicking Ctrl+H when in home directory. We place the
downloaded folder mujoco200 into the .mujoco folder.

11) Download the mjkey.txt license key and place it in the home/.mujoco/mujoco200 and in the
home/.mujoco/mujoco200/bin folder

To validate that mujoco try to run the following:

12) On the path /.mujoco/mujoco200/bin enter in terminal ./simulate ../model/humanoid.xml


If a window with 3D model appears it means we are all good to go and mujoco was installed
successfully

PyCharm

13) In the home directory: sudo snap install pycharm-community –classic

Anaconda
We will create folder Linux_setup where the anaconda will be installed (name of folder is arbitrary)

14) cd
15) sudo apt-get update
16) cd

File created by Daniel S. on 7/10/2021 with help from Slava


17) source ~/.bashrc
18) mkdir Linux_setup
19) cd Linux_setup
Enter anaconda website https://www.anaconda.com/products/individual#linux and find the Linux installer
which you then must download. Once download is completed place the installed file in the Linux_setup
folder we created before.

20) We check if installer is in the folder by typing in Terminal: dir and then execute
21) bash Anaconda3-2021.05-Linux-x86_64.sh
The anaconda should be installed now, we then create new environment called “mujoco-gym” (you can
name it however you wish)

22) conda config --set auto_activate_bash false


For the above changes to take place close and reopen the terminal

23) cd Linux_setup
Create new environment using Anaconda in the Linux_setup folder

24) conda create –n mujoco-gym python3=3.8


Check the list of existing environments and make sure our newly create environment is there and then
activate it

25) conda env list


26) conda activate mujoco-gym
Mujoco-py
Now onto the most difficult part which is installation of mujoco-py. What I recommend is to take 5 min
brake and take few deep breathes before proceeding as what is about to come might ruin your day

While still in Linux_setup directory


27) cd
28) sudo apt install git
29) cd
Get back to home directory

30) conda deactivate


31) sudo apt-get update
32) sudo apt-get install patchelf
33) sudo apt-get install python3 python-dev python3-dev build-essential libssl-dev libffi-
dev libxml2-dev libxslt1-dev zlib1g-dev libglew1.5 libglew-dev python3-pip
34) sudo apt-get install python3-pip
35) git clone https://github.com/openai/mujoco-py
36) cd mujoco-py
37) pip3 install -e . --no-cache
38) cd

File created by Daniel S. on 7/10/2021 with help from Slava


You will probably get a bunch of errors. Go to your home directory using by simply clicking on the
needed folders and open .bashrc and add the following into the bottom of it

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/daniel/.mujoco/mujoco200/bin
Make sure to change daniel to your system name. In my example I added it in line 119 see how it should
look like in the Appendix.
VERY IMPORTANT.

After changing bashrc make sure to save it and restart your Ubuntu.
39) Open the terminal and type the following:
40) sudo apt install libosmesa6-dev libgl1-mesa-glx libglfw3
41) sudo ln -s /usr/lib/x86_64-linux-gnu/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so
42) pip3 install -U 'mujoco-py<2.1,>=2.0'
You should have no errors after executing the pip3 command. If you managed to execute the command
without errors – congratulation!
Robosuite
43) Go to official robosuite GitHub repo and obtain their GitHub link
44) in the home directory execute the following:
git clone https://github.com/StanfordVL/robosuite.git
45) cd robosuite
46) pip3 install –r requirements.txt
47) pip3 install –r requirements-extra.txt
For a test if robosuite works well type the following.

48) python3 robosuite/demos/demo_random_action.py


Setting up Pycharm for usage with anaconda,Mujoco and robosuite
49) Open Pycharm and click “open”
50) Navigate to the robosuite folder and confirm your folder choice where new project will be
created
We now set up the interpreter to be the anaconda environment we created. While in Pycharm and in
robosuite folder:
51) Go to file->settings->project robosuite->python interpreter then click on the setting icon (gear
icon) of the new window and click add. Select conda environment and existing environment.
Give it a second and click ok. Then the environment should switch to mujoco-gym i.e. our
custom made environment

File created by Daniel S. on 7/10/2021 with help from Slava


52) Last small changes. Initially you will only have Edit configuration option here so click on it

53) In the lower left corner, you will see option to make new template click on it, select python and
then in the Environment variables we need to add 2 lines (see two pictures below)

File created by Daniel S. on 7/10/2021 with help from Slava


54) The lines we add are (make sure to change daniel to your system name)

55) Right click on the demo example and click run

It might show you errors and might take some time but be patient as it can take more time to run at first
time. As long as program is compiling you should be good ☺

File created by Daniel S. on 7/10/2021 with help from Slava


Appendix (bashrc)
I attach it here so you can see where I added the path to the bashrc.

File created by Daniel S. on 7/10/2021 with help from Slava


File created by Daniel S. on 7/10/2021 with help from Slava
File created by Daniel S. on 7/10/2021 with help from Slava

You might also like