ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

pr2 Keeps Dropping Objects

asked 2012-05-08 13:23:25 -0500

jker gravatar image

updated 2014-11-22 17:05:31 -0500

ngrennan gravatar image

I've been working with the pr2 pick and place example, and it seems that whenever the robot picks up an object (in this case, the mug from gazebo_worlds/objects/coffee_cup.model) and then moves either the base or the arm around around, the object wiggles out of the robot's grasp. I've changed the max force on the grasp from 50 (the default in the pick and place example) to 1000, but it seems to make no difference. Is there some way to prevent the object from falling out of the robot's grasp? It does not seems very realistic, is it some sort of bug in the simulator?

edit retag flag offensive close merge delete

5 Answers

Sort by ยป oldest newest most voted

answered 2012-05-08 13:36:06 -0500

hsiao gravatar image

The object wiggles out of the robot's grasp because ODE's simulation of contacts is not very realistic. You can add John Hsu's grasp hack to the object to make it much harder to drop the object--when both fingertips have contacted the object for some number of seconds, it records the relative pose between the object and the gripper and keeps warping the object back there until the gripper opens and lets go. (Sometimes the object still falls if you move around too fast or hit the world with it, but that's actually more realistic than otherwise.)

Look at cup.urdf in manipulation_worlds/urdf, in stack pr2_object_manipulation, for an example of how to add the grasp hack to an object.

edit flag offensive delete link more

answered 2012-06-20 10:25:36 -0500

Nan Jiang gravatar image

Thanks for jker's question and hsiao's answer. I was facing the same problem, and tried to find manipulation_worlds package for hints as hsiao suggested... but it is no longer in pr2_object_manipulation stack. Also there are some problems with ros wiki these days so the page for manipulation worlds cannot be opened. Finally I find the code here. Note that it is a really short piece of code that loads the grasp-hack plugin, which is contained in gazebo package. Just share this information for anyone who is confused about this.

edit flag offensive delete link more


Actually this piece of code generates some weird dynamics... For my case, I just reduce the mass of my object and everything works well without the grasp hack code.

Nan Jiang gravatar image Nan Jiang  ( 2012-08-03 09:52:48 -0500 )edit

answered 2012-08-03 13:00:28 -0500

hsu gravatar image

In the new fuerte release, pr2's gripper xml contains a new <gripper> plugin that implements a slightly better version of grasp_hack directly in gazebo, so the grasp_hack plugin is no longer needed. For more information, see:

edit flag offensive delete link more


In your, the attach steps, detach steps and contact numbers seem to be hardcoded to 20, 40 and 2 respectively in Gripper::OnUpdate. is this still the case? Can these be changed in the sdf definition as is alluded to in the pr2_description?

PeterMilani gravatar image PeterMilani  ( 2013-01-08 22:02:35 -0500 )edit

answered 2013-01-01 13:25:01 -0500

Cherry gravatar image

Hi, I am working on the Atlas model with GFE simulator. The sandia hand that comes with the Atlas model always keep dropping the fire hose. Am I also able to use the grasp_hack to solve the problem?

edit flag offensive delete link more

answered 2016-03-19 19:19:14 -0500

A little late to the party. Here is a gazebo plugin that fixes this problem! I'm currently using it and works perfectly :)

edit flag offensive delete link more

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: 2012-05-08 13:23:25 -0500

Seen: 2,032 times

Last updated: Mar 19 '16