Ask Your Question

How to plan moves with gripper attached to arm?

asked 2014-12-02 03:28:22 -0500


I've successfully planned and executed various motions using our UR5 robot arm without any tools. Now I want to attach a custom-made gripper to the arm, but I don't know what to do to make ROS/MoveIt! "aware" of the gripper, such that the gripper (and any objects in it) do not collide with anything, and to be able to grab items with the gripper.

I have read many tutorials and examples, but they all seem to cover only a specific part and I still haven't been able to get this to work.

Can anyone please explain the necessary steps? Such as how to define a model of the gripper, how to set the state (open/closed position) of the gripper, how to approach the object I want to grasp. I have the feeling this would already be explained somewhere, but I couldn't find a document explaining all these steps. If no such document is available, maybe an overview of the necessary steps with links to the appropriate documents/tutorials would also be helpful.

NB: I'm using ROS Indigo and preferably writing in Python (C++ is possible if necessary).

Regards, Wouter

edit retag flag offensive close merge delete


Is this an exchangable gripper that you want to model like that in software or will it stay fixed, i.e. it's just the robot's gripper?

dornhege gravatar image dornhege  ( 2014-12-02 06:01:14 -0500 )edit

It's currently a fixed gripper and we expect it to keep it that way for the time being.

wouter_tnl gravatar image wouter_tnl  ( 2014-12-02 06:26:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-12-02 10:04:27 -0500

gvdhoorn gravatar image

updated 2014-12-03 01:32:45 -0500

[..] but I don't know what to do to make ROS/MoveIt! "aware" of the gripper, such that the gripper (and any objects in it) do not collide with anything [..]

For the case you describe (ie: gripper attached and not changing at runtime) I would expect just updating your urdf would be the easiest. After updating the MoveIt configuration package (or creating a new one), the links of the gripper would automatically be considered in collision checking and planning.

If the base model of your UR5 has been created with care, you can probably create a wrapper xacro, in which you only instantiate your arm, the gripper and add a joint (most likely fixed) that connects them together. The MoveIt package would then be created using the result of your wrapper xacro (so manipulator & attached gripper). See industrial_training/../sia20d_workspace.xacro in the ROS-Industrial training exercises for an example, where an SIA20D is instantiated, then a vacuum gripper and finally they are connected using some intermediate links and joints.

Such as how to define a model of the gripper [..]

You could do this similar to how you model(led) the rest of your robot / system / scene: either by using the geometric primitives supported in urdf, using a mix of meshes & hand-crafted urdf or by exporting a CAD model from something like SolidWorks. In my experience, performance is best if you make sure your collision models are low in detail (but still accurately model the outer dimensions of your gripper).

[..] how to set the state (open/closed position) of the gripper, [..]

For actual control I've seen two approaches being taken most of the time:

  1. separate gripper control from arm control: use MoveIt planning to get the EEF to a desired location. Now use your gripper services or action server directly to control it.
  2. define proper end-effector groups in your MoveIt configuration package, complete with associated controllers and have MoveIt plan trajectories for your EEF and arm.

Approach 1 is the least involved and the least integrated. MoveIt will do all motion planning for you, but will not be able to control your EEF through it. For a simple open/close gripper and the UR5 you mention, approach 1 might be as simple as wrapping the set_io service of the ur_driver node with some suitable grip_open, grip_close services and calling them at the appropriate times. If grasping requires coordinated motion between manipulator and EEF though, things may get complicated, as motion and IO may be difficult to synchronise right now.

Approach 2 is harder to implement: MoveIt needs JointStates and controller interfaces to be able to do this. End-effector declaration in MoveIt config pkgs can also be confusing. Advantage is that all planning (motion and gripper) can now be done in MoveIt and you could make use of the pick-and-place pipeline that is part of it. I don't have too much experience with that, but see the Pick and Place using Python and How to use the Grasp message? posts ... (more)

edit flag offensive delete link more


Thanks for your extensive answer (and sorry for my late response). I've successfully updated the URDF with the gripper. Good suggestion to use a wrapper for it :-) For the actual pick-and-place I've still some things to find out, but your response gives a good background on the possible ways to go.

wouter_tnl gravatar image wouter_tnl  ( 2014-12-17 08:41:36 -0500 )edit

Hi gdvhoorn, can you explain a little more in details what should be done in order to open/close the gripper via services? For ex, I am controlling a UR5 with a RG2 gripper on it. I am moving it using ros_control and I would like, if possible, to control the gripper by typing commands on terminal..

enrico gravatar image enrico  ( 2018-10-12 14:22:17 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-12-02 03:28:22 -0500

Seen: 5,508 times

Last updated: Dec 03 '14