# Problem picking items up in Gazebo with PR2

Hello,

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.

Ralf Kempf

edit retag 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')?
( 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
( 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.

( 2016-10-18 12:53:18 -0500 )edit

Sort by » oldest newest most voted

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"/>

more

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 (https://bosch-ros-pkg.svn.sourceforge.net/svnroot/bosch-ros-pkg/trunk/stacks/bosch_manipulation_utils/simple_robot_control/src/simple_robot_control/gripper.py) 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 http://bosch-ros-pkg.svn.sourceforge.net/svnroot/bosch-ros-pkg/trunk/stacks/aaai_lfd_demo/.

You can get it run by following the instructions on http://www.ros.org/wiki/aaai_lfd_demo . Instead of launching the whole aaai_lfd_executive.launch (last step) you could also use: rosrun openloop_object_manipulation pick.py 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.

more

Edit:

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>
<static>false</static>
<body:box name="tea_box_body">
<geom:box name="tea_box_geom">
<mu1>1.5</mu1>
<mu2>1.5</mu2>
<mesh>default</mesh>
<size>0.085 0.07 0.14</size>
<mass> 0</mass>
<visual>
<size>0.085 0.07 0.14</size>
<material>Gazebo/Red</material>
<mesh>unit_box</mesh>
</visual>
</geom:box>
</body:box>
</model:physical>

more