All Projects → roboticsleeds → ur5controller

roboticsleeds / ur5controller

Licence: GPL-3.0 license
OpenRAVE Controller Plugin for UR5 (Universal Robots UR5) Robot

Programming Languages

python
139335 projects - #7 most used programming language
C++
36643 projects - #6 most used programming language
CMake
9771 projects
Makefile
30231 projects

Projects that are alternatives of or similar to ur5controller

ur5
UR5 Robot with a Robotiq gripper
Stars: ✭ 77 (+266.67%)
Mutual labels:  ur5, ur5-robot
patchwork
Official page of Patchwork (RA-L'21 w/ IROS'21)
Stars: ✭ 174 (+728.57%)
Mutual labels:  ros
Handeye-Calibration-ROS
🤖 Elaborated hand-eye calibration tutorials (ROS-binding)
Stars: ✭ 80 (+280.95%)
Mutual labels:  ros
rclex
Rclex: ROS 2 Client Library for Elixir
Stars: ✭ 77 (+266.67%)
Mutual labels:  ros
Emacs Configuration
Emacs Configuration Using Purcell's Structure
Stars: ✭ 22 (+4.76%)
Mutual labels:  ros
katana driver
This stack contains hardware drivers, Gazebo plugins and other basic functionalities for the Neuronics Katana family of robot arms.
Stars: ✭ 16 (-23.81%)
Mutual labels:  ros
raspimouse book info
「Raspberry Piで学ぶ ROSロボット入門」の情報ポータル
Stars: ✭ 48 (+128.57%)
Mutual labels:  ros
atl
Autonomous Quadrotor Landing
Stars: ✭ 12 (-42.86%)
Mutual labels:  ros
tangobot
Android app to navigate using Tango services as input.
Stars: ✭ 15 (-28.57%)
Mutual labels:  ros
yac
YAC - Yet Another Calibrator
Stars: ✭ 19 (-9.52%)
Mutual labels:  ros
Autoware Toolbox
MATLAB/Simulink sample code suite for Autoware.
Stars: ✭ 53 (+152.38%)
Mutual labels:  ros
PROBOT Anno
ROS Packages for PROBOT Anno.
Stars: ✭ 75 (+257.14%)
Mutual labels:  ros
hatchery
🐣 An IDE for building ROS applications
Stars: ✭ 67 (+219.05%)
Mutual labels:  ros
Robotics-Object-Pose-Estimation
A complete end-to-end demonstration in which we collect training data in Unity and use that data to train a deep neural network to predict the pose of a cube. This model is then deployed in a simulated robotic pick-and-place task.
Stars: ✭ 153 (+628.57%)
Mutual labels:  ros
kr mav control
Code for quadrotor control
Stars: ✭ 31 (+47.62%)
Mutual labels:  ros
ros tensorflow
This repo introduces how to integrate Tensorflow framework into ROS with object detection API.
Stars: ✭ 39 (+85.71%)
Mutual labels:  ros
ros jetson stats
🐢 The ROS jetson-stats wrapper. The status of your NVIDIA jetson in diagnostic messages
Stars: ✭ 55 (+161.9%)
Mutual labels:  ros
aws-robomaker-robotics-curriculum
Introductory robotics curriculum
Stars: ✭ 78 (+271.43%)
Mutual labels:  ros
Turtlebot Navigation
This project was completed on May 15, 2015. The goal of the project was to implement software system for frontier based exploration and navigation for turtlebot-like robots.
Stars: ✭ 28 (+33.33%)
Mutual labels:  ros
phoxi camera
ROS Package for PhoXi Scanner/Camera. If you like us, STAR US! :P
Stars: ✭ 35 (+66.67%)
Mutual labels:  ros

UR5 Controller for OpenRAVE

Currently we support different models (we only provide controllers for the UR5 and the two-finger gripper in this project):

  • Clearpath Ridgeback + UR5 + Force Torque Sensor 150 + RobotiQ Two Finger Gripper
  • Clearpath Ridgeback + UR5 + RobotiQ Two Finger Gripper
  • Clearpath Ridgeback + UR5

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 under scripts/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).

1. Developers and Contributors

UR5 OpenRAVE controller was developed by the Robot Manipulation Lab in the School of Computing at the University of Leeds.

2. License

UR5 OpenRAVE controller is licensed under GNU General Public License v3.0. The full license is available here.

3. Includes

This repository includes the following:

  • The custom written controller for OpenRAVE and UR5 robot.
  • The URDF and SRDF files for UR5 itself, Robotiq Two-Finger Gripper, and Clearpath Ridgeback moving base.

4. Installation

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.

Using Singularity container
The easiest way to get up and running with this controller is to use our Singularity container.
  1. Install Singularity on your machine by following this.
  2. Then, follow the instructions from here.
Built from source on your own machine
If you wish to build this control on your host machine, you can find the instructions below.

Dependencies

  • ur_modern_driver needs to be installed on the computer that controls the robot and you need to run roslaunch ur_modern_driver ur5_bringup.launch robot_ip:=THE_IP_OF_UR5_ROBOT.
  • You need to install the openrave_catkin.
  • You need to install and configure another OpenRAVE plugin called or_urdf this plugin is available here. I have written a small guide on how to install this plugin if you struggle to find a solution, find the tutorial here.
  • (OPTIONAL) Install the Robotiq controller.
    1. cd ~/catkin_ws/src
    2. git clone [email protected]:ros-industrial/robotiq.git
    3. cd robotiq
    4. git checkout indigo-devel
    5. rosdep install robotiq_modbus_tcp
    6. sudo apt-get install ros-indigo-soem
    7. cd ~/catkin_ws
    8. catkin_make

Installation

  • Go to your catkin worksapce e.g cd ~/catkin_ws/src and clone this repository: git clone [email protected]:roboticsleeds/ur5controller.git
  • Add the following line in your ~/.bashrc file located under your home directory by running the following command in the terminal: echo 'export OPENRAVE_PLUGINS=$OPENRAVE_PLUGINS:~/catkin_ws/devel/share/openrave-0.9/plugins' >> ~/.bashrc
  • Run source ~/.bashrc.
  • Go to your catkin workspace cd ~/catkin_ws and run catkin_make. You should see a successful message on build in which case you are ready to go. If you get any errors at this stage, please review what went wrong.
  • Add in your .bashrc the Python path to the UR5 class by running
echo 'export PYTHONPATH=$PYTHONPATH:~/catkin_ws/src/ur5controller/pythonsrc/ur5_robot' >> ~/.bashrc`

This will let Python know where the Python classes for creating UR5 robot instances in OpenRAVE are.

5. Testing the controller

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:

Show code
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()

If you would like to use the model with no gripper, then you need to pass None to the gripper_name argument.

6. Controller explained

  1. Load the robot in OpenRAVE using the URDF plugin:
Show code
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)
  1. You now need to attach the controllers (UR5 and the Robotiq controllers) to the robot using the MultiController.
Show code
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()

You are now set. The OpenRAVE robot should update as you change the configuration of the actual robot, and should also execute trajectories from OpenRAVE to the actual robot.

7. Other Notes

Checking ROS topics for attaching controllers

This package will check (in ur5_factory.py) if certain topics are being published (i.e CModelRobotInput and CModelRobotOutput) if you chose a gripper name equal to "robotiq_two_finger_" and will not attach the corresponding controller if those topics are not being published. This is a defensive mechanism to avoid IsDone() method of the end-effector gripper returning false and blocking the program execution. For more discussion, see here

8. Troubleshooting

RuntimeError: maximum recursion depth exceeded while calling a Python object

If you get this error while the IK are being generated, then you probably have a version of sympy > 0.7.1. Downgrade your sympy version to 0.7.1:

pip install --upgrade sympy==0.7.1

This should fix this issue.

TypeError: argument of type 'Poly' is not iterable

If you get this error while the IK are being generated, then you probably have a version of sympy > 0.7.1. Downgrade your sympy version to 0.7.1:

pip install --upgrade sympy==0.7.1

This should fix this issue.

Executing the trajectory on the real robot causes unintended actions

Issue: While OpenRAVE generates a trajectory that is smooth and valid in simulation during real execution the robot is strangely executing the trajectory.

Possible solution: We came across this issue and the problem is probably down to the UR modern driver. When UR modern driver is installed using 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).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].