Code to train an agent on panda-gym
environments.
Tested on Ubunutu 18.04 LTS.
-
install some dependencies
sudo apt-get update && sudo apt-get install cmake libopenmpi-dev python3-dev zlib1g-dev
-
clone the repository
git clone https://github.com/qgallouedec/drl_grasping
-
create a virtual environment, activate it and upgrade pip
cd drl_grasping python3 -m venv env source env/bin/activate python -m pip install --upgrade pip
-
install dependecies
pip install -r requirements.txt
To train PandaPickAndPlace-v1
with seed 0 for 500000 timesteps, run
mpirun -np 8 python train.py PandaPickAndPlace-v1 0 500000
The learning is distributed over 8 MPI workers. For the moment, this number should not be modified.
To play the learned policy, run
python play.py PandaPickAndPlace-v1
Turn the brut results into .dat
file, containing timesteps, median and quartiles.
python results_to_dat.py
It process all the training done so far.
Quentin GALLOUÉDEC