Demo code for controlling the UR5 and Robotic 2F gripper in BDML with MoveIt!
+ ROS melodic (runs well on Ubuntu 18.04)
+ ROS MoveIt!
+ ROS Gazebo
+ Gazebo Grasp Plugin
+ OpenAI ROS
What's in side the package: This repository contains a whole catkin workspace. Within it there are three ROS packages.
- Robotiq's ROS-industrial package (cloned on 2019)
- Universal Robots's ROS-industrial package (cloned on 2019)
- UR5 rospy interface
- gazebo_ros_pkgs
- gazebo-pkgs
cd [project dir/src]
git clone https://github.com/JenniferBuehler/gazebo-pkgs.git
catkin build
*delete "gazebo_state_plugins" and "gazebo_test_tools"
6. openai_ros
```console
cd [project dir/src]
git clone https://bitbucket.org/theconstructcore/openai_ros.git
cd ..
catkin build
source ./devel/setup.bash
rosdep install openai_ros
pip install empty
catkin build
- Make Virtual Env in python2
cd [project dir]
virtualenv venv
- Activate/Deactivate
source venv/bin/activate
([newenvname])$ deactivate
- numpy==(1.16.6)
- matplotlib==(2.2.5)
- sklearn-utils==(0.0.15)
- tensorflow==1.14.0 *the version is important
- tensorflow-gpu==1.14.0 *the version is important
- pyyaml==(5.3.1)
- rospkg==(1.2.8)
- gym==(0.16.0)
- First time compiling this ROS workspace do:
source /opt/ros/melodic/setup.bash
cd [path/to/demo/project/root]
catkin build
- source env
source [path/to/demo/project/root]/devel/setup.bash
- Launch ur5 connection and Gazebo
roslaunch ur5_demo openai_ur_robotiq_gazebo.launch
This will (i) launch the ur5_bringup to open the TCP bridge to UR5, and (ii) launch the Gazebo simulator.
- Run RL script
python ppo_gae_main.py
This will try to move the UR5 and the robotiq gripper to open the door.
- source env
source [path/to/demo/project/root]/devel/setup.bash
- Launch ur5 connection, MoveIt!, RVIZ, and Gazebo
roslaunch ur5_demo demo_ur_robotiq_gazebo.launch
This will (i) launch the ur5_bringup to open the TCP bridge to UR5, (ii) launch the moveit ros node that will take in your joint or Cartesian commands and perform the motion planning, (iii) run RVIZ so you can visualize motions of the UR5 before you execute them, and (iv) launch the Gazebo simulator.
- Run demo script
rosrun ur5_demo ur5_demo_gazebo.py
This will try to move the UR5 to its home position. It will first plan the path without executing it and it will wait for user to press Enter to proceed with execution. At this time you can look at the RVIZ interface to see what the path will be. Tip: To re-play to path in case you missed it, uncheck the motion planning item on the left pane and check it again.