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

Need help to trigger the vacuum gripper?

asked 2016-09-04 14:08:23 -0600

Abdullah gravatar image

How does this plugin gazebo_ros_vacuum_gripper triggers the gripping process?

If you have good understanding of the code, please take a look at the following code, and let me know, how does the gripping is triggered in this code?

http://docs.ros.org/jade/api/gazebo_p...

http://docs.ros.org/jade/api/gazebo_p...

There is an example as below but when I run this plugin, I am not able to trigger the vacuum force required for gripping.

http://docs.ros.org/jade/api/gazebo_p...

I am stuck at this for weeks, I would really appreciate any insight of the code.

edit retag flag offensive close merge delete

Comments

1

You'll have to be a bit more specific: do you not understand how to interact with the plugin, or do you not understand how the plugin internally communicates with Gazebo to set / update the simulation state?

gvdhoorn gravatar image gvdhoorn  ( 2016-09-05 01:46:05 -0600 )edit

Thank you so much gvdhoorn, When I run the simulation, and try to make contact between the left_end_effector and the link I want to attach , the vacuum gripper does not apply force.

Abdullah gravatar image Abdullah  ( 2016-09-05 03:12:20 -0600 )edit
1

But how do you exactly "try to make contact"? Do you call the on service?

gvdhoorn gravatar image gvdhoorn  ( 2016-09-05 03:25:32 -0600 )edit

Again thank you so much gvhoorn, how can I call this "on service"?

Abdullah gravatar image Abdullah  ( 2016-09-05 03:42:30 -0600 )edit

I just load the plugin, as it is in the example it shows that the plugin being loaded and after the simulation starts, I expected it to just apply the force whenever I make contact between left_end_effector and any link, but it doesnt work

Abdullah gravatar image Abdullah  ( 2016-09-05 03:47:06 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-09-11 05:54:36 -0600

wkentaro gravatar image

Hi, I'm the author of the gazebo plugin. @wkentaro on GitHub

As commented by gvdhorn, you can turn on/off the vacuum gripper with on, off ros service with std_srvs/Empty message.

And the crucial thing for this plugin is the distance between the object link and gripper one (currently the plugin does not compute the distance between the collisions of gripper and the object), so in most cases you need to add another link to the robot to use this gripper.

I personally used this plugin for two robots, Baxter and FanucLRMate200id, and in the last use I found below changes are necessary to make the plugin work stably. https://github.com/ros-simulation/gaz... With the PR, you can change the parameter for min/max distance to apply force to the object, and max force. Also, it removes the angular velocity of the grasped object.

edit flag offensive delete link more

Comments

Hi wkentaro,

Thank you so much for the help. I am able to run this plugin and I am able to turn it on, but for some reason, I could not see any force yet. I will try with the modified code you mentioned, and I hope I will be able to run it. Thank you so much for writing this code.

Abdullah gravatar image Abdullah  ( 2016-09-12 06:26:42 -0600 )edit
1

Dear @wkeantro, Could you, please, explain how do I add another link? I am able to add it to .urdf, but it does not appear in gazebo. Do I have to add a special controller for the gripper link?

Dima Mironov gravatar image Dima Mironov  ( 2016-10-12 06:15:17 -0600 )edit
1

Maybe you're using fixed joint, and that won't appear in gazebo. You need to use revolute as shown in the example: https://github.com/ros-simulation/gaz...

wkentaro gravatar image wkentaro  ( 2016-10-13 03:37:47 -0600 )edit

Hi Wada San, Thank you so much for all the help. I have just one more question, when I look at the code it seems like , when the payload is attached finally, it actually changes the position of the payload every gazebo cycle to the position of the left_end_effector.

Abdullah gravatar image Abdullah  ( 2016-11-02 00:36:13 -0600 )edit

My question is that after attaching the payload , does this really act like a joint, I mean the weight of the payload, does it play any role after being attached to the left_end_effector (gripper)?

Abdullah gravatar image Abdullah  ( 2016-11-02 00:37:14 -0600 )edit
1

answered 2016-09-05 04:10:47 -0600

gvdhoorn gravatar image

updated 2016-09-05 04:15:32 -0600

I just load the plugin, as it is in the example .it shows that the plugin being loaded and after the simulation starts, I expected it to just apply the force whenever I make contact between left_end_effector and any link, but it doesnt work

No, that is not how the plugin works.

The C++ source isn't too pretty, but here the plugin creates two std_srvs::Empty services called on and off. You can use those to turn the vacuum on, and to turn it off again. Only in the on state will the 'gripper' exert a force on any other links that are close to it (see these lines that calculate the force).

So the workflow for this plugin is as follows (for a pick-and-place kind of application fi):

  1. put virtual vacuum gripper close to to-be-gripped object (or really: link)
  2. call the on service to "activate suction" (start exerting force on the close-by link)
  3. move the vacuum gripper somewhere else
  4. call the off service to "deactivate suction"

After the last step, the object should no longer be attached to the vacuum gripper link.

Again thank you so much gvhoorn, how can I call this "on service"?

Do a rosservice list to show you where the service is exactly located, then use rosservice call /path/to/service <tab tab> to auto-complete the request. std_srvs::Empty services don't need any input arguments, so the request should be empty.

You can of course also call these services in a regular C++ or Python program using a Service Client (C++ tutorial, Python tutorial, but use a std_srvs::Empty service client).

edit flag offensive delete link more

Comments

Thank you so much gvdhoorn, I was able to find the rosservice and I am able to turn it on and off. Yes, it seems like I have to call that service to enable the vacuum gripper. Yes one problem is solved. Thanks. I will mark this question as answered.

Abdullah gravatar image Abdullah  ( 2016-09-05 05:37:37 -0600 )edit

Thank you so much for the guidance again gvdhoorn, now when I enable the gripper by calling the on-service, it turns it on. Yet when I make the objects to have contact , I do not observe any force, is this because, as you mentioned the c++ source is not too pretty?

Abdullah gravatar image Abdullah  ( 2016-09-05 05:39:22 -0600 )edit
1

I have not used this plugin personally, so I'm not intimately familiar with it. You could perhaps look at fanuc_lrmate200id_gazebo_demo which is a demo setup that uses the same plugin.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-05 05:46:59 -0600 )edit

Thank you so much gvdhoorn. I will update you with as soon as I am able to perform gripping. I am going to follow this demo setup now. Thanks again

Abdullah gravatar image Abdullah  ( 2016-09-05 05:52:38 -0600 )edit
1

No need to keep thanking me. First see if it even works.

gvdhoorn gravatar image gvdhoorn  ( 2016-09-05 05:55:56 -0600 )edit

gvdhoorn, when I looked at the demo setup, I couldn`t find any difference in the way I was doing except some variables. I added them and tried again it didnt work either. So in conclusion, I loaded the plugin, I do a service call and turn it on, and after that I try to push to contact.

Abdullah gravatar image Abdullah  ( 2016-09-05 10:02:57 -0600 )edit

So when I bring them to contact after calling the service on , I was expecting some force, am I missing something here, like may be a force sensor is required? Please kindly tell me via the code, if I still am missing something.

Abdullah gravatar image Abdullah  ( 2016-09-05 10:04:22 -0600 )edit

Hi thank you so much gvdhoorn for all the help. I am finally able to use this plugin. Thanks to kentaro wada san as well.

My question is that now I am trying to do a ros service call from within a code of a node in cpp. For the same case. Existing tutorials talk about srv files and similar things

Abdullah gravatar image Abdullah  ( 2016-10-30 05:26:47 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2016-09-04 14:08:23 -0600

Seen: 3,476 times

Last updated: Sep 11 '16