Experimental validation of an Actor-Critic Model Predictive Force Controller for robot-environment interaction tasks
This repository collects the work conducted by a collaboration between UniSa, PoliMi and IDSIA. The repository is thought as a support and demonstration material for the homonymous paper.
This section explains how to setup the environment needed to launch the demos. First, MuJoCo needs to be installed, then some preliminary packages are required for the virtual environment creation.
In order to install MuJoCo you need to:
-
Create a hidden folder:
cd mkdir .mujoco
-
Download MuJoCo library
cd .mujoco wget https://mujoco.org/download/mujoco210-linux-x86_64.tar.gz
-
Extract the MuJoCo downloaded library into the hidden folder
.mujoco
tar -xf mujoco210-linux-x86_64.tar.gz -C . rm mujoco210-linux-x86_64.tar.gz
-
Add these lines to the
.bashrc
file:export LD_LIBRARY_PATH=$HOME/.mujoco/mujoco210/bin #substitute username with your username export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/nvidia #if nvidia graphic export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libGLEW.so export PATH="$LD_LIBRARY_PATH:$PATH"
-
Source the
.bashrc
file:cd source .bashrc
-
Test the installation:
cd ~/.mujoco/mujoco210/bin ./simulate ../model/humanoid.xml
You will need Pip for the virtual environment packages installation, venv for the virtual environment and some other packages as prerequisites for Mujoco-Py. sudo
can be needed for some installations.
-
Pip
apt install pip
-
Packages needed for Mujoco-Py
apt install libosmesa6-dev libgl1-mesa-glx libglfw3 apt install patchelf gcc apt install python3-dev build-essential libssl-dev libffi-dev libxml2-dev apt install libxslt1-dev zlib1g-dev libglew-dev
-
Python-venv
apt install python3.8-venv
Clone environment_identification repository
cd
git clone https://bitbucket.org/unisa-polimi-idsia/environment_identification/
Create a python venv and activate it
python3 -m venv venv --python=python3.8 # Create the venv
source venv/bin/activate # Activate the venv
Install via pip the required packages into the virtual environment
cd environment_identification
python3 -m pip install -r requirements.txt
Substitute the files base_controller.py
and osc.py
in robosuite (substitute USERNAME with your user name in the command lines):
cp dataset_generation_utilities/osc.py /home/USERNAME/venv/lib/python3.8/site-packages/robosuite/controllers # substitute USERNAME with your user name
cp dataset_generation_utilities/base_controller.py /home/USERNAME/venv/lib/python3.8/site-packages/robosuite/controllers # substitute USERNAME with your user name
Refer to the Readme.md in the ACMPFC folder.
- Vincenzo Petrone - UniSa - Automatic Control Group
- Loris Roveda - IDSIA