ROS-Industrial universal_robot meta-package. See the ROS wiki page for compatibility information and other more information.
This repository provides ROS support for the universal robots. This repo holds source code for all versions > groovy. For those versions <= groovy see: hg https://kforge.ros.org/ros_industrial/universal_robot
Installation about GAZEBO 9.0:
sudo apt-get install ros-kinetic-gazebo9-ros-pkgs ros-kinetic-gazebo9-ros-control ros-kinetic-gazebo9*
Installation of UR modern control instead of ur_drive:
sudo apt-get install ros-kinetic-industrial-msgs
Usage with real Hardware
There are launch files available to bringup a real robot - either UR5 or UR10.
In the following the commands for the UR5 are given. For the UR10, simply replace the prefix accordingly.
Don't forget to source the correct setup shell files and use a new terminal for each command!
To bring up the real robot, run:
roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=ROBOT_IP_ADDRESS
A simple test script that moves the robot to predefined positions can be executed like this:
rosrun ur_modern_driver test_move.py
Total execution commands(realsense, ur5, gripper):
roslaunch ur_modern_driver total_bringup.launch
roslaunch total_moveit_config total_moveit_planning_execution.launch
CAUTION:
Remember that you should always have your hands on the big red button in case there is something in the way or anything unexpected happens.
MoveIt! with real Hardware
Additionally, you can use MoveIt! to control the robot.
There exist MoveIt! configuration packages for both robots.
For setting up the MoveIt! nodes to allow motion planning run:
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch
For starting up RViz with a configuration including the MoveIt! Motion Planning plugin run:
roslaunch ur5_moveit_config moveit_rviz.launch config:=true
NOTE:
As MoveIt! seems to have difficulties with finding plans for the UR with full joint limits [-2pi, 2pi], there is a joint_limited version using joint limits restricted to [-pi,pi]. In order to use this joint limited version, simply use the launch file arguments 'limited', i.e.:
roslaunch ur_bringup ur5_bringup.launch limited:=true robot_ip:=IP_OF_THE_ROBOT [reverse_port:=REVERSE_PORT]
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch limited:=true
roslaunch ur5_moveit_config moveit_rviz.launch config:=true
Usage with Gazebo Simulation
There are launch files available to bringup a simulated robot - either UR5 or UR10.
In the following the commands for the UR5 are given. For the UR10, simply replace the prefix accordingly.
Don't forget to source the correct setup shell files and use a new terminal for each command!
To bring up the simulated robot in Gazebo, run:
roslaunch ur_gazebo ur5.launch
MoveIt! with a simulated robot
Again, you can use MoveIt! to control the simulated robot.
For setting up the MoveIt! nodes to allow motion planning run:
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true
For starting up RViz with a configuration including the MoveIt! Motion Planning plugin run:
roslaunch ur5_moveit_config moveit_rviz.launch config:=true
NOTE:
As MoveIt! seems to have difficulties with finding plans for the UR with full joint limits [-2pi, 2pi], there is a joint_limited version using joint limits restricted to [-pi,pi]. In order to use this joint limited version, simply use the launch file arguments 'limited', i.e.:
roslaunch ur_gazebo ur5.launch limited:=true
roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true limited:=true
roslaunch ur5_moveit_config moveit_rviz.launch config:=true