| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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 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).
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.
Using Singularity containerecho '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.
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 codeimport 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.
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 = 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.
Checking ROS topics for attaching controllersThis 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
RuntimeError: maximum recursion depth exceeded while calling a Python objectIf 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 iterableIf 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 actionsIssue: 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).
| Back | FazBrowse Home | New Git URL |