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

Open/Close end effector with Moveit Rviz

asked 2019-01-24 05:14:30 -0500

akcast gravatar image

Hi,

Using moveit and Rviz, and using the robot arm move group I can plan motions for the whole arm. But when I choose the hand/gripper/end effector move group, I can see the end effector highlighted, but no arrows to open/close it?

Does moveit in Rviz have this functionality or is there another way?

P.S. While making the moveit package I have created named poses for open/close poses of the end effector which works, my question is only if motion planning for the EE can done in the same way as for the arm ?

edit retag flag offensive close merge delete

Comments

This would appear to be a cross-post of frankaemika/franka_ros#48.

gvdhoorn gravatar image gvdhoorn  ( 2019-01-25 06:46:59 -0500 )edit

Well now we know what robot is being used. ;)

Geoff gravatar image Geoff  ( 2019-01-27 18:35:17 -0500 )edit

True. But this does seem to be a good example of why cross-posting is best avoided: on both threads quite a bit of effort was spent to help the OP :(

gvdhoorn gravatar image gvdhoorn  ( 2019-01-28 02:58:39 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-01-24 18:49:12 -0500

Geoff gravatar image

updated 2019-01-24 18:53:35 -0500

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, which is why you don't get the ball-and-arrows. Options for controlling them include:

  • Control the 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 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.

edit flag offensive delete link more

Comments

1

@gvdhoorn will soon correct me if I'm wrong

this almost makes me feel bad.

You're correct, there is no UI for grippers specifically.

The reason the OP is not seeing any interactive markers is simply because they are only shown for groups with IK solvers configured.

gvdhoorn gravatar image gvdhoorn  ( 2019-01-25 03:01:59 -0500 )edit

Hi, Thanks a lot @Geoff@gvdhoorn !

Do you think using the python moveit interface ( link: http://docs.ros.org/kinetic/api/movei... ) is also a possibility for setting poses, joint angles for the EE move group?

akcast gravatar image akcast  ( 2019-01-25 04:23:49 -0500 )edit

Because of the RViz focus I assumed you were looking for a graphical interface.

Grippers can be controlled using the Python MoveIt interface, as long as they are configured as a group that MoveIt can control. I've written something about that in #q198706, which is similar to what @Geoff wrote.

gvdhoorn gravatar image gvdhoorn  ( 2019-01-25 05:42:18 -0500 )edit

@Geoff The code is in C++, how to use that for python?

Tawfiq Chowdhury gravatar image Tawfiq Chowdhury  ( 2019-06-26 21:02:01 -0500 )edit

I'm not sure which code specifically you are referring to, but if you want to know how to use MoveIt from Python, refer to the Python tutorial.

Geoff gravatar image Geoff  ( 2019-06-27 19:05:58 -0500 )edit

@Geoff, This tutorial shows how to move the arm which I already did in simulation and with the robot, however, once the arm moves, I want to open and close the gripper in order to pick and place, I am looking for a python functionality for opening and closing the gripper.

Tawfiq Chowdhury gravatar image Tawfiq Chowdhury  ( 2019-06-28 17:13:26 -0500 )edit

The Python move_group interface has the same functions for automating pick and place as the C++ interface, including the pick function and the place function. This means that the pick and place tutorial can be converted to Python.

Geoff gravatar image Geoff  ( 2019-06-30 18:22:37 -0500 )edit

@Geoff, thank you but I am not exactly finding the connections, in this document, there are pick and place functions in python. However, here the implementation seems to be different, there are no pick and place functions. I was wondering if there is a code in python in internet from somewhere that could help regarding this.

Tawfiq Chowdhury gravatar image Tawfiq Chowdhury  ( 2019-07-01 17:14:48 -0500 )edit

Question Tools

4 followers

Stats

Asked: 2019-01-24 05:14:30 -0500

Seen: 4,205 times

Last updated: Jan 24 '19