NOTICE: This is a work in progress.
This package directly adds onto: https://github.com/mkrizmancic/sphero_formation/tree/0ac14aad3dd1a0af26f191c017e213279eebd52e It additonaly uses:
- open_ai_ros: http://wiki.ros.org/openai_ros
- DDPG-tf2: https://github.com/samuelmat19/DDPG-tf2
- mantis_ddqn_navigation: https://github.com/bhctsntrk/mantis_ddqn_navigation
python 3.6
gym
tensorflow 2.x
xdotool
wmctrol
This package connects Stage simulator with RL algorithms. It contains the following scripts:
- stage_connection.py - class that contains pause, unpause and reset functions for Stage
- robot_stage_env.py - the most basic implementation of the RL environment
- sphero_env.py - ROS-Sphero connection, inherits class from robot_stage_env.py
- sphero_world.py - defines the task of the Sphero robot, inherits class from sphero_env.py
- sphero_qlearn.py, sphero_dqn.py, sphero_ddpg.py - RL algorithms
First of all, go to the package directory:
cd catkin_ws/src/sphero_formation
and initialize the updated stage_ros:
git submodule update --init
Copy updated Stage to /src:
cp -r ~/catkin_ws/src/sphero_formation/stage_ros ~/catkin_ws/src
Everything else is the same as the sphero_formation package. To change the RL algorithm, change to the appropriate script in reynolds_sim.launch. Also, change to the appropriate directories in order to save training results.
Simulation video for flocking using DDPG can be found here and real Sphero robot here.