A new, RTDE based driver for UR10 robot arms from Universal Robots. It is designed to be run as a separate ROS package.
Copy this repository directly to your catkin working directory (e.g. by cloning it or using git subtree)
and make it with catkin make.
This driver consists of two nodes:
nomagic_ur_rtde_driver- exposes FollowJoinTrajectory and MoveUR action serversnomagic_ur_state_publisher- publishes state reported the robot.
For more details see section Interfaces.
In order to start the nodes, run:
rosrun nomagic_ur_driver nomagic_ur_rtde_driver.py
rosrun nomagic_ur_driver nomagic_ur_state_publisher.py _base_frame:=base_link _tool_frame:=tool0_controller
These ROS nodes use the following ROS parameters:
/galaxy/hardware/robot_ip- robot IP
Node nomagic_ur_rtde_driver exposes FollowJointTrajectory action server used by MoveIt (see
documentation). From MoveIt user perspective this is a drop-in replacement
for default implementation. See section Internals for more details.
Node nomagic_ur_rtde_driver exposes MoveUR action server, which allows users to perform operations
such as:
movej()movel()- stop the program
This action server is available under name move_robot and expects MoveURAction message as input.
Calls movej() URscript function.
Parameters:
move_type=MOVE_JOINTtarget_jointsvelocityaccelaration
Calls movel() URscript function.
Parameters:
move_type=MOVE_LINEARtarget_posevelocityaccelaration
Exits URscript program.
Parameters:
move_type=STOP_PROGRAM
Node nomagic_ur_state_publisher publishes information about the robot state using ros topics:
/joint_states- reports current state of robot joints; sendssensor_msgs.msg.JointStatemessages/io_states- reports current state of digital inputs (standardandconfigurable); sendsnomagic_ur_driver.msg.IOStatemessages.
Functionality described above is implemented in two nodes - nomagic_ur_rtde_driver (exposes action servers)
and nomagic_ur_state_publisher (exposes robot state via ROS topics). Both of the use RTDE interface to
communicate with the robot.
All commands are executed by a single URscript. This allows us to avoid constant reloading of programs, which can be very slow.
Note, that this approach implies that only a single command can be executed at a time. If user sends more actions to be execute at once, they will fail with appropriate message.
In order to improve reliability of communication between ROS nodes and URscript, we tried to keep amount
of data sent in both directions minimal. This implied that for FollowJointTrajectory actions,
instead of send each position separately, we only send waypoints (as planned by MoveIt) and perform interpolation
inside URscript. This helps us to perform more smooth movements and avoid protective stops in case communication
problems.
- Driver has some non-generic code for handling optoforce, grippers or succers. It should be generalized and properly documented.
- MoveIt action can timeout, if it has been requested after certain period of inactivity (https://github.com/NoMagicAi/gripper-ros/pull/485 should fix it)