OpenRAVE Controller Plugin for UR5 (Universal Robots UR5) Robot
Currently we support different models (we only provide controllers for the UR5 and the two-finger gripper in this project):
This controller will listen to ROS topic that publishes the joint values of the
UR5 robot in real time and will visualise the current state of a UR5 robot in OpenRAVE.
Another important functionality of this plugin is that is able to execute trajectories
generated by OpenRAVE planners on the real robot.
There is a test program that demonstrates this functionality underscripts/control_ur5
in which case will load UR5 in
OpenRAVE and then let you control the UR5 robot above a table (move left, right,
forward, backwards and rotate the gripper clockwise and anti-clockwise).
UR5 OpenRAVE controller was developed by the Robot Manipulation Lab in the School of Computing at the University of Leeds.
UR5 OpenRAVE controller is licensed under GNU General Public License v3.0. The full license is available here.
This repository includes the following:
You can either get this controller using a Singularity container or by building the controller as a catkin package on your host machine. The advantage of using a singularity container over building it on your host machine is that you can have a different Ubuntu and ROS version on your host machine and have UR5 Controller within a singularity container that runs Ubuntu 14.04 and ROS Indigo. For example you can have a host machine with Ubuntu 18.04 and run UR5 Controller with the Singularity container.
roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=THE_IP_OF_UR5_ROBOT
.or_urdf
this plugin is available here. I have written a small guide oncd ~/catkin_ws/src
git clone git@github.com:ros-industrial/robotiq.git
cd robotiq
git checkout indigo-devel
rosdep install robotiq_modbus_tcp
sudo apt-get install ros-indigo-soem
cd ~/catkin_ws
catkin_make
cd ~/catkin_ws/src
and clone this repository: git clone git@github.com:roboticsleeds/ur5controller.git
~/.bashrc
file located under your homeecho
'export OPENRAVE_PLUGINS=$OPENRAVE_PLUGINS:~/catkin_ws/devel/share/openrave-0.9/plugins' >> ~/.bashrc
source ~/.bashrc
.cd ~/catkin_ws
and run catkin_make
. You should.bashrc
the Python path to the UR5 class by runningbash
echo 'export PYTHONPATH=$PYTHONPATH:~/catkin_ws/src/ur5controller/pythonsrc/ur5_robot' >> ~/.bashrc`
There is a file called control_ur5.py
under scripts
that you can run and
test the controller on the real robot.
With the Python class in place, creating a UR5 robot in OpenRAVE is super easy:
python
import IPython
from ur5_factory import UR5_Factory
ur5_factory = UR5_Factory()
# If you want to specify all the configuration settings (is_simulation, has_ridgeback etc)
env, robot = ur5_factory.create_ur5_and_env(is_simulation=True,
has_ridgeback=True,
gripper_name="robotiq_two_finger",
has_force_torque_sensor=True,
env_path="test_env.xml",
viewer_name="qtcoin",
urdf_path="package://ur5controller/ur5_description/urdf/",
srdf_path="package://ur5controller/ur5_description/srdf/")
# The above is equivalent to the following (the `create_ur5_and_env` has set to defaults the values used above):
env, robot = ur5_factory.create_ur5_and_env()
IPython.embed()
None
to the gripper_name
argument.python
import IPython
env = Environment()
env.Load('test_env.xml')
env.SetViewer('qtcoin')
urdf_path = "package://ur5controller/ur5_description/ur5.urdf"
srdf_path = "package://ur5controller/ur5_description/ur5.srdf"
module = RaveCreateModule(env, 'urdf')
with env:
name = module.SendCommand('LoadURI {} {}'.format(urdf_path, srdf_path))
robot = env.GetRobot(name)
env.Add(robot, True)
MultiController
.python
multicontroller = RaveCreateMultiController(env, "")
robot.SetController(multicontroller)
robot_controller = RaveCreateController(env,'ur5controller')
hand_controller = RaveCreateController(env, 'robotiqcontroller')
multicontroller.AttachController(robot_controller, [2, 1, 0, 4, 5, 6], 0)
multicontroller.AttachController(hand_controller, [3], 0)
IPython.embed()
CModelRobotInput
and CModelRobotOutput
) if you chose a gripper nameIsDone()
method of the end-effector gripper returning false and blocking thepip install --upgrade sympy==0.7.1
pip install --upgrade sympy==0.7.1
apt-get
the problem appeared. The solution was to install UR modern driver as a catkin package (make sure to checkout the branch kinetic-devel
although is kinetic is also working with indigo).