ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Grippers are controlled differently to arms. Options for controlling them include:

  • Control the gripper's joints via a trajectory_msgs/JointTrajectory message. The source for the MoveIt Pick and Place tutorial shows an example of how to do this. Look for the openGripper and closedGripper functions; you will need to send the trajectories to the trajectory controller yourself though.
  • Use the control_msgs/GripperCommand action, which is hopefully provided by a node for your arm. If not, you will need to implement an action server yourself. Here's one that I wrote a couple of years ago to control a simple single-servo two-finger gripper.
  • Control the servo(s) directly through whatever interface their driver node provides to open/close the gripper. Less intuitive for using the gripper than the GripperCommand action because that allows you to specify the width the gripper should open/close.

The downside of all of these approaches is that they lack a nice interface in rviz, as far as I know (@gvdhoorn will soon correct me if I'm wrong). You can either create a new rviz interface plugin (the tutorial for this is unfortunately short), modify the existing MoveIt rviz plugin, or create an interface using rqt. I highly recommend the rqt approach as it is much easier to do. There is a tutorial on writing rqt plugins available.

Grippers Motion planning of the end effector is managed by controlling the arm move group that it is attached to. This move group should be set up so that you can easily place the end effector where you want it. You tell the end of the arm where to go, and this puts your EE where you want it to be. Some people set up their arm move groups to include a final virtual link that ends in the middle of the gripper, making controlling it easier.

To add some supplemental information: End effectors are controlled differently to arms. arms, which is why you don't get the ball-and-arrows. Options for controlling them include:

  • Control the gripper's EE's joints via a trajectory_msgs/JointTrajectory message. The source for the MoveIt Pick and Place tutorial shows an example of how to do this. Look for the openGripper and closedGripper functions; you will need to send the trajectories to the trajectory controller yourself though.
  • Use named poses, as you have already done.
  • Use the control_msgs/GripperCommand action, which is hopefully provided by a node for your arm. If not, you will need to implement an action server yourself. Here's one that I wrote a couple of years ago to control a simple single-servo two-finger gripper.
  • Control the servo(s) directly through whatever interface their driver node provides to open/close the gripper. EE. Less intuitive for using the gripper than the GripperCommand action because that allows you to specify the width the gripper should open/close.

The downside of all of these approaches except for named poses is that they lack a nice interface in rviz, as far as I know (@gvdhoorn will soon correct me if I'm wrong). You can either create a new rviz interface plugin (the tutorial for this is unfortunately short), modify the existing MoveIt rviz plugin, or create an interface using rqt. I highly recommend the rqt approach as it is much easier to do. There is a tutorial on writing rqt plugins available.