snumrl / MSS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MSS(Musculoskeletal System)

Abstract

This codes implement basic simulation and control of Musculoskeletal system. Skeletal movements are driven by the actuation of the muscles, which are coordinated by their activation levels. Interfacing with python and pytorch, it is available to use Deep Reinforcement Learning(DRL) algorithm such as Proximal Policy Optimization(PPO).

How to install

Install TinyXML, Eigen, OpenGL, assimp, Python3, etc...

sudo apt-get install libtinyxml-dev libeigen3-dev libxi-dev libxmu-dev freeglut3-dev libassimp-dev libpython3-dev python3-tk python3-numpy virtualenv ipython3 cmake-curses-gui

Install boost with python3

We strongly recommand that you install boost libraries from the source code (not apt-get, etc...).

cd /path/to/boost_1_xx/
./bootstrap.sh --with-python=python3
sudo ./b2 --with-python --with-filesystem --with-system --with-regex install
  • Check yourself that the libraries are installed well in your directory /usr/local/. (or /usr/)

If installed successfully, you should have something like

Include

  • /usr/local/include/boost/
  • /usr/local/include/boost/python/
  • /usr/local/include/boost/python/numpy

Lib

  • /usr/local/lib/libboost_filesystem.so
  • /usr/local/lib/libboost_python3.so
  • /usr/local/lib/libboost_numpy3.so

Install DART 7.0

Please refer to http://dartsim.github.io/ (Install version 7.0)

Install PIP things

You should first activate virtualenv.

virtualenv /path/to/venv --python=python3
source /path/to/venv/bin/activate
pip3 install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp35-cp35m-linux_x86_64.whl 
pip3 install torchvision
  • numpy, matplotlib
pip3 install numpy matplotlib ipython

How to compile and run

mkdir build
cd build
cmake ..
make -j8
  • Run PPO
cd ../pymss
source /path/to/virtualenv/
python3 PPO.py
  • Run UI
./render/render
  • Run Trained data
./render/render ../nn/xxx.pt

About

License:Apache License 2.0


Languages

Language:C++ 67.7%Language:CMake 22.7%Language:C 4.0%Language:Python 3.8%Language:Makefile 1.9%