A reinforcement-Learning Framework for testing learning agents on a UR5 manipulator. The framework consists of 2 ROS packages which are rl_gazebo_sim, rl_moveit_config. Besides the two ROS packages there is the folder rl-gym with contains an OpenAI Gym environment as well as python scripts for runnin reinforcement learning. The rl-gym folder is an implementation example on how to use the framework with OpenAI Gym
The framework is designed and prepared for screwing tasks meanning the simulated UR5 is fitted with a screw tool and the world is fitted with a block with a screw.
About
Installation
Launch example aplication
This is repository is by as a 6th semester project at Aalborg University.
Install ROS Kinetic following this guide from the ROS wiki.
Install ROS dependencies
sudo apt -get install python -rosinstall python -rosinstall -generator python -wstool build -essential
sudo apt -get install ros -kinetic -moveit
sudo apt -get install ros -kinetic -ros -control ros -kinetic -ros -controllers ros -kinetic -gazebo -ros -controlros -kinetic -gazebo -pkgs ros -kinetic -controller -manager
Install OpenAIGym.
pip install gym ==0.10.5
Install Catkin Tools used to build the packages.
sudo apt-get update
sudo apt-get install python-catkin-tools
Create a catkin workspace and initialise it as a workspace
mkdir ~/catkin_ws/src
cd ~/catkin_ws
catkin init
catkin build
Clone this repository as well as the universal_robot repository containing all the UR robots, into the src folder.
cd ~/catkin_ws/src
git clone https://github.com/ros-industrial/universal_robot.git
git clone https://github.com/hjalte33/rl_unscrew.git
run catkin build to build all the packages, and dont forget to sorce the workspcae.
cd ~/catkin_ws
catkin build
source devel/setup.bash
In order to launch the framework three things must be launched. First the Gazebo simulation.
roslaunch rl_gazebo_sim rl_world.launch
Then launch the controller
roslaunch rl_moveit_config moveit_planning_execution.launch
Now the framework is ready to be used. In order to launch the example aplication run the following python script.
python ~/catkin_ws/src/rl_project/rl_gym/simple_loop.py
You shold now be running a simple Q-learning algorithm