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

Problem picking items up in Gazebo with PR2

asked 2011-06-23 12:39:12 -0500

r_kempf gravatar image


I've set up my own world in Gazebo and now want the PR2 in the simulation grasp the items and pick them up. Therefore I have a script (script from aaai_lfd_demo: https://bosch-ros-pkg.svn.sourceforge... ) which moves the arm of the PR2 into the right position, opens the gripper, grasps the item, and should pick it up. But if the PR2 has grasped the item he freezes. He isn't able to pick it up. So what could be the problem? When using this script with an actual PR2, it works, so it has to be a problem with the Gazebo setup. I just launch my world, a PR2 and my script to move the robot. Here is the xml code of my object: (Are there maybe some parameters wrong?)

I also tried the pick up the coke_can from the PR2_Pick_and_Place_Demo from the pr2_simulator tutorials in my world, but it also doesn't work.

Thanks in advance!

Ralf Kempf

edit retag flag offensive close merge delete


does the entire simulation freeze? which world file are you using (are you launching pr2 via 'roslaunch pr2_gazebo pr2_empty_world.launch')?
hsu gravatar image hsu  ( 2011-06-28 07:49:42 -0500 )edit
No just the PR2 freezes. I'm using my own world file and im launching a pr2 within my world.launch
r_kempf gravatar image r_kempf  ( 2011-07-01 05:14:32 -0500 )edit

Were you able to spot the problem? I think I'm facing the same issue. I'm using MoveIt! to pick objects, the first part of a grasp is ok (move the arm and open the gripper), but when the gripper closes around the object the controller get stuck waiting for the gripper to fully close.

Rodrigo gravatar image Rodrigo  ( 2016-10-18 12:53:18 -0500 )edit

@Rodrigo Does this answer help with your issue?

LSD gravatar image LSD  ( 2022-12-01 11:34:46 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2011-07-01 08:16:32 -0500

hsu gravatar image

The gripper controller is not detecting stall due to gripper velocity jitter. Try adding these two lines to your aaai_lfd_simulator/launch/simulation_world.launch:

<!-- Set params for sim -->
<param name="r_gripper_controller/gripper_action_node/stall_velocity_threshold" value="0.01" type="double"/>
<param name="l_gripper_controller/gripper_action_node/stall_velocity_threshold" value="0.01" type="double"/>
edit flag offensive delete link more

answered 2011-06-23 12:43:36 -0500

r_kempf gravatar image

updated 2011-06-30 13:53:40 -0500

hsu gravatar image


The Tea-Box

<model:physical name="tea_box_model">
<xyz>   -0.1355  -1.138   0.9</xyz>
<rpy>   0.0    0.0    0.0</rpy>
<body:box name="tea_box_body">
  <geom:box name="tea_box_geom">
    <size>0.085 0.07 0.14</size>
    <mass> 0</mass>
      <size>0.085 0.07 0.14</size>
edit flag offensive delete link more

answered 2011-07-01 05:17:33 -0500

r_kempf gravatar image

Here is a more precisely description of the problem and how to reproduce it:

I have problems with the action server for the gripperAction. If I close the gripper of a PR2 in Gazebo when grasping simulated objects the acion server doesn't return.

In my script the robot opens his gripper, then moves his arm to a simulated object and then closes his gripper. At that point he got stuck When closing the gripper, in my script ( I call the method wait_for_result() on a SimpleActionClient (in the method execGripperCommand()). When calling this method he waits untill infinity.

I don't know why this happens but maybe you can have a look on it and figure out what the problem is. In Gazebo it seems that the robot wants to close the gripper completely but he can't because of the object.

To reproduce this failing you could install/watch my stuff at

You can get it run by following the instructions on . Instead of launching the whole aaai_lfd_executive.launch (last step) you could also use: rosrun openloop_object_manipulation tea-box l 3 This shows the problem, that the robot gets stuck when grasping the object.

I think there is a problem with the action server, but I don't know what the problem is.

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: 2011-06-23 12:39:12 -0500

Seen: 2,352 times

Last updated: Jul 01 '11