Giter Site home page Giter Site logo

Comments (3)

ChristosPeridis avatar ChristosPeridis commented on May 20, 2024 1

Hello dear Dr. Vikash,

Thank you so much for your immediate response. Also thank you very much for your support material. I have tried the first approach and it did not work in the native Ubuntu machine at work. I am still working on it and I will also try the technique in my personal machine with the WSL2 set up. I will report back to you as soon as I have any updates!

Thank you very much for your valuable help!!!

Kind regards,

Christos Peridis

from robohive.

vikashplus avatar vikashplus commented on May 20, 2024

Hi Christos,
Thanks for your interest and efforts on RoboHive.

From the error messages, it seems like mujoco_py installation issues. Can you try something like this to check if you have a healthy mujoco_py installation?

conda activate <env-name>
python -c "import mujoco_py"

Your first step will be to get above to succeed before attempting anything with RoboHive. Here are a few helpful resources to help you with mujoco_py

From the errors, it seems like an library issue. Pay attention to the following suggestions
sudo apt-get install libgl1-mesa-dev libgl1-mesa-glx libglew-dev libosmesa6-dev build-essential libglfw3

Alternatively, you can use RoboHive with MuJoCo's official bindings. Please refer to the RoboHive's installation FAQs for details on how to pick you simulation backend.

from robohive.

ChristosPeridis avatar ChristosPeridis commented on May 20, 2024

Hello dear Dr. Vikash,

How are you doing? I hope you are well! After a thorough research I managed to create two types of conda environments that where able to build and run mujoco-py and thus enabling me to test if RoboHive API is running, by running the example command : python robohive/utils/examine_env.py -e FrankaReachRandom-v0

as well as with the:

python -m robohive.utils.examine_env -e FrankaPickPlaceFixed-v0

which uses the environment that I am more interested in.

The first environment uses Python 3.8.10 build with gcc version 9.4.0, mujoco-py verion 2.0.2.13 and MuJoCo simulator version 200. It is important to note that Python 3.8.10 was required due to the version of gcc compiler being compatible with the abovementioned version of mujoco-py which is the latest version of the Python library which supports MuJoCo 200. In order to make the MuJoCo simulator visible to the environment I had to set the necessary environment varibles by running the "conda env config vars set " command. These where the following:

  1. conda env config vars set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.mujoco/mujoco200/bin

  2. conda env config vars set MUJOCO_PY_MJKEY_PATH=~/.mujoco/mjkey.txt

  3. conda env config vars set MUJOCO_PY_MUJOCO_PATH=~/.mujoco/mujoco200

The second environment uses Python 3.9.17 (which is more compatible with the RL APIs that I want to integrate RooHive API with) mujoco-py version 2.1.14 and MuJoCo simulator version 2.1.0 (210). For configuring this environment I followed step by step the instructions of the first link that you have provided me with. I just had to take one more extra step regarding the cython library which I upgraded to version 0.29.36. For installing the mujoco-py library I cloned the GitHub repository and built it from there, as it was the technique proposed by the PyTorch website. After following the main instructions on the PyTorch website I faced an issue with the GL/osmesa.h library. I overcome the issue by following the instructions that were bellow the main steps of setting up the environment, and were confronting the most frequent and most usual problems regarding the use of mujoco-py. Then I faced also an issue with the patchelf library. To overcome it once more I followed the instructions on the PyTorch website, and it fixed the issue. In this environment I further progressed trying to configuring it with Ray API and to make sure that all the core libraries do not have any conflicts. Due to the fact that I had been using pip, I had to perform many trial and error attempts of installing different versions of the necessary libraries, and sometimes when fixing one library another one was causing issues so I had to uninstall it and reinstall it.

I have exported the configuration of both environments in a .yml file for each and I will attach them to this message. For the python 3.9 environment I am sending you the configuration before and after installing Ray to the system, since the installation of Ray caused some inconsistencies.

The rhRL94_Ubuntu20_PY39_b_environment.yml is the file which contains the configuration of the conda environment with Python 3.9 before installing Ray. I have tested this file and it builds the environment with no pip issues. It only creates the environment for RoboHive with MuJoCo 2.1.0 and mujoco-py 2.1.14, with no Ray API.

The rhRL94_Ubuntu20_Py39_b_Ray220_a_environment.yml includes the dependencies after installing Ray and making the environment to work fine with not library errors due to incompatible versions. However when attempting to create the environment from the file it throughs a pip error. I guess, it is because of the order that the pip commands are executed.

The rhRL03_Ubuntu20_Py38_b_environment.yml crates the Python 3.8.10 environment with MuJoCo200 and mujoco-py=2.0.2.13 along with Ray API version 1.12.1. I have tested the also this .yml file and it builds the environment with no errors. However, before creating the environment one must add the following to the ~/.bashrc file:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH: ~/.mujoco/mujoco200/bin
export MUJOCO_PY_MJKEY_PATH= ~/.mujoco/mujoco200
export MUJOCO_PY_MJPRO_PATH= ~/.mujoco/mujoco200
export MUJOCO_PY_MJKEY_PATH= ~/.mujoco/mjkey.txt

After the installation of the environment from the .yml file one might have to uninstall mujoco-py and reinstall it (version 2.0.2.13) and uninstall the installed version ofprotobuf and install protobuf version 3.20.0.

In all scenarios one must also build the RoboHive package from the cloned GitHub repository, since this is the way I build it and installed it to the environments. This is why the .yml folders do not include the version of RoboHive installed.

These environments where created and tested on Ubuntu 20.04.06 LTS through WSL2 on Windows11.

For any further queries regarding the environments created through the provided .yml files do please let me know. I am always at your disposal!

General comment and recommendation for the RoboHive API is to move away from the mujoco-py library and star using only the mujo library with the newer Python bindings for the newer versions of MuJoCo simulator. This comes out as a result of my experience that I gained during the past few days where I tried to configure these environments. mujoco-py is difficult and time-consuming to setup and its configuration can go wrong very easily. Different version of MuJoCo support different versions of mujoco-py and specific versions of mujoco-py require specific builds of Python done by specific gcc compilers (for example in the case of mujoco-py==2.0.2.13 and python 3.8.10 which is build using gcc==9.4.0).

Thank you very much again for all the valuable help and support!!

Kind regards,

Christos Peridis

rhRL94_Ubuntu20_PY39_b_environment.zip
rhRL94_Ubuntu20_Py39_b_Ray220_a_environment.zip
rhRL03_Ubuntu20_Py38_b_environment.zip

from robohive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.