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

The Pick and Place Autonomous Demo, grasping error

asked 2011-08-14 03:30:42 -0600

vincent gravatar image

updated 2014-11-22 17:05:25 -0600

ngrennan gravatar image

Hi all

I was going through the pr2_pick_and_place_demos/Tutorials/The Pick and Place Autonomous Demo. A simulated pr2 was running. The robot always succeed to find the table, move the arm but finally failed to grasp the object, the gripper always stopped nearby the object and reported an error(I have tried different simple objects from gazebo_worlds/objects).

Here is the output from rviz, gazebo, PR2 Dashboard(/rosout) and terminal. Can someone tell me what could possibly go wrong? Thanks. BTW, I was using Diamondback. In the terminal with pr2_tabletop_manipulation.launch, it shows

[ WARN] [1313335466.622271285, 3307.596000000]: waiting for rgbd assembler at /rgbd_assembly
[ INFO] [1313335466.632494052, 3307.596000000]: waitForService: Service [/rgbd_assembly] has not been advertised, waiting...

Don't know if that affects anything.

rviz

gazebo

PR2 Dashboard, Rosout message:

header: 
  seq: 13383
  stamp: 3451.653000000
  frame_id: 
level: 8
name: /object_manipulator
msg: Hand posture controller timed out on goal (1)
file: /tmp/buildd/ros-diamondback-object-manipulation-0.4.4/debian/ros-diamondback-object-manipulation/opt/ros/diamondback/stacks/object_manipulation/object_manipulator/src/tools/mechanism_interface.cpp
function: MechanismInterface::handPostureGraspAction
line: 975
topics[]
  topics[0]: /rosout
  topics[1]: /object_manipulator/grasp_execution_markers
  topics[2]: /object_manipulator/object_manipulator_pickup/result
  topics[3]: /object_manipulator/object_manipulator_pickup/feedback
  topics[4]: /object_manipulator/object_manipulator_pickup/status
  topics[5]: /object_manipulator/object_manipulator_place/result
  topics[6]: /object_manipulator/object_manipulator_place/feedback
  topics[7]: /object_manipulator/object_manipulator_place/status
  topics[8]: /head_traj_controller/point_head_action/goal
  topics[9]: /head_traj_controller/point_head_action/cancel
  topics[10]: /attached_collision_object
  topics[11]: /r_cart/command_pose
  topics[12]: /l_cart/command_pose
  topics[13]: /move_left_arm/goal
  topics[14]: /move_left_arm/cancel
  topics[15]: /l_gripper_grasp_posture_controller/goal
  topics[16]: /l_gripper_grasp_posture_controller/cancel
  topics[17]: /move_right_arm/goal
  topics[18]: /move_right_arm/cancel
  topics[19]: /r_gripper_grasp_posture_controller/goal
  topics[20]: /r_gripper_grasp_posture_controller/cancel


header: 
  seq: 13384
  stamp: 3451.653000000
  frame_id: 
level: 8
name: /object_manipulator
msg: Grasp error; exception: grasp execution:mechanism:Hand posture controller timed out
file: /tmp/buildd/ros-diamondback-object-manipulation-0.4.4/debian/ros-diamondback-object-manipulation/opt/ros/diamondback/stacks/object_manipulation/object_manipulator/src/object_manipulator.cpp
function: ObjectManipulator::pickup
line: 240
topics[]
  topics[0]: /rosout
  topics[1]: /object_manipulator/grasp_execution_markers
  topics[2]: /object_manipulator/object_manipulator_pickup/result
  topics[3]: /object_manipulator/object_manipulator_pickup/feedback
  topics[4]: /object_manipulator/object_manipulator_pickup/status
  topics[5]: /object_manipulator/object_manipulator_place/result
  topics[6]: /object_manipulator/object_manipulator_place/feedback
  topics[7]: /object_manipulator/object_manipulator_place/status
  topics[8]: /head_traj_controller/point_head_action/goal
  topics[9]: /head_traj_controller/point_head_action/cancel
  topics[10]: /attached_collision_object
  topics[11]: /r_cart/command_pose
  topics[12]: /l_cart/command_pose
  topics[13]: /move_left_arm/goal
  topics[14]: /move_left_arm/cancel
  topics[15]: /l_gripper_grasp_posture_controller/goal
  topics[16]: /l_gripper_grasp_posture_controller/cancel
  topics[17]: /move_right_arm/goal
  topics[18]: /move_right_arm/cancel
  topics[19]: /r_gripper_grasp_posture_controller/goal
  topics[20]: /r_gripper_grasp_posture_controller/cancel

Terminal with pick_and_place_demo.py

[INFO] [WallTime: 1313333951.928096] [0.000000] grasp_executive: waiting for object_manipulator_pickup action
[INFO] [WallTime: 1313333952.319281] [3134.483000] grasp_executive: object_manipulator_pickup action found
[INFO] [WallTime: 1313333952.405726] [3134.490000] grasp_executive: waiting for object_manipulator_place action
[INFO] [WallTime: 1313333953.660155] [3134.612000] grasp_executive: object_manipulator_place action found
[INFO] [WallTime: 1313333953.780220] [3134.621000] grasp_executive: waiting for point_head_action client
[INFO] [WallTime: 1313333955.345885] [3134.802000] grasp_executive: point_head_action client found
[INFO] [WallTime: 1313333955.620685] [3134.824000] grasp_executive: waiting for reactive place clients
[INFO] [WallTime: 1313333956.402844] [3134.915000] grasp_executive: reactive place clients found
[INFO] [WallTime: 1313333956.404042] [3134.915000] initializing controller managers for both arms ...
(more)
edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
1

answered 2011-08-14 09:16:40 -0600

hsiao gravatar image
edit flag offensive delete link more

Comments

The error in my case lies in the database. solved by running the database server and changing the database to `household_objects-0.4_diamondback_prerelease_2.backup`. but now i went into another problem. (see the post below)
vincent gravatar image vincent  ( 2011-08-14 12:02:00 -0600 )edit
1

answered 2011-08-14 12:53:02 -0600

hsiao gravatar image

updated 2011-08-14 13:02:19 -0600

Apologies--that's a bug that's been fixed in Electric but hasn't been back-released into Diamondback yet. I'll try to get that updated this week. In the meantime, the patch below should stop it from crashing. As to why there's no IK solution, I'm not sure--it's trying to find a constrained position by the robot's side that keeps the object level, and perhaps it's in a weird grasp position? Definitely shouldn't crash because of that, though. The 'else' is just tabbed wrong:

Index: controller_manager.py
===================================================================
--- controller_manager.py   (revision 52775)
+++ controller_manager.py   (working copy)
@@ -585,9 +585,9 @@
        rospy.loginfo("IK solution found for constrained goal")
        orientation_constraint.orientation = desired_pose.pose.orientation 
        break
-    else:
-      rospy.loginfo("no IK solution found for goal, aborting")
-      return 0
+      else:
+        rospy.loginfo("no IK solution found for goal, aborting")
+        return 0

move_arm_goal.motion_plan_request.goal_constraints.orientation_constraints.append(orientation_constraint)
edit flag offensive delete link more

Comments

Wow. That formatting sure got screwed up. Basically, take the block that says "else: rospy.loginfo("no IK solution found for goal, aborting") return 0" and move it to the right two spaces to line up with the 'for' block instead of the 'if' block.
hsiao gravatar image hsiao  ( 2011-08-14 12:56:48 -0600 )edit
thanks, it worked. But rviz still crashes, giving the same error message. Do you have any idea why rviz crashes according to that error message?
vincent gravatar image vincent  ( 2011-08-14 13:49:53 -0600 )edit
1

answered 2011-08-23 18:24:20 -0600

hsiao gravatar image

you should check out https://code.ros.org/svn/ros-pkg/stacks/visualization_common/trunk/ogre/ and overlay it (put it in a directory that you have permissions to edit, that you add to your ROS_PACKAGE_PATH before /opt/ros/diamondback/stacks), then change it and re-make.

edit flag offensive delete link more

Comments

thank you
vincent gravatar image vincent  ( 2011-08-24 00:12:28 -0600 )edit
0

answered 2011-08-14 12:11:42 -0600

vincent gravatar image

Now the robot was able to find and grasp the object. But it either fails to lift the object, or cannot find the trajectory to drop off the object and stuck there(I was thinking maybe it's because the robot is picking up the object with right arm and supposed to drop it off at the left part of the table, which is too far for the right arm to accomplish). And then rviz window always crashes.

rviz: /tmp/buildd/ros-diamondback-visualization-common-1.4.2/debian/ros-diamondback-visualization-common/opt/ros/diamondback/stacks/visualization_common/ogre/build/ogre_src_v1-7-1/OgreMain/src/OgreRenderQueueSortingGrouping.cpp:386: void Ogre::QueuedRenderableCollection::addRenderable(Ogre::Pass*, Ogre::Renderable*): Assertion `retPair.second && "Error inserting new pass entry into PassGroupRenderableMap"' failed.
Aborted

This following image shows how the gazebo world was set up. The front edge of the base is flush with the front edge of the middle area of the table.

gazebo3

Output in the pick_and_place_demo.py window:

[INFO] [WallTime: 1313364634.696529] [482.448000] try_hard_to_move_joint try number: 0
[INFO] [WallTime: 1313364634.709388] [482.448000] asking move_arm to go to angles: -2.135 0.803 -1.732 -1.905 -2.369 -1.680 1.398
[ERROR] [WallTime: 1313364634.721057] [482.448000] Got a feedback callback when we're not tracking a goal. (id: /pick_and_place_demo_32161_1313362798776-3-482.448)
[INFO] [WallTime: 1313364635.324415] [482.525000] move_arm succeeded
[INFO] [WallTime: 1313364635.324947] [482.525000] move arm reported success
[INFO] [WallTime: 1313364635.325349] [482.525000] try_hard_to_move_joint try number: 0
[INFO] [WallTime: 1313364635.381088] [482.539000] asking move_arm to go to angles: 2.135 0.803 1.732 -1.905 2.369 -1.680 1.398
[INFO] [WallTime: 1313364636.054058] [482.578000] move_arm succeeded
[INFO] [WallTime: 1313364636.054517] [482.578000] move arm reported success
[INFO] [WallTime: 1313364648.031121] [484.016000] calling tabletop detection
[INFO] [WallTime: 1313364648.765651] [484.072000] tabletop detection reports success
[INFO] [WallTime: 1313364648.781044] [484.072000] table front edge x: 0.355
[INFO] [WallTime: 1313364648.781535] [484.072000] table height: 0.504
[INFO] [WallTime: 1313364648.782079] [484.072000] detection finished, finding bounding boxes for clusters and sorting objects
[INFO] [WallTime: 1313364651.297679] [484.380000] calling tabletop detection
[INFO] [WallTime: 1313364652.627787] [484.523000] tabletop detection reports success
[INFO] [WallTime: 1313364652.676713] [484.524000] detection finished, finding bounding boxes for clusters and sorting objects
[INFO] [WallTime: 1313364652.683333] [484.524000] object 0, red: recognized object with id 18665 and col name graspable_object_0
[INFO] [WallTime: 1313364652.684626] [484.524000] object dist from back edge is -0.259
[INFO] [WallTime: 1313364657.426376] [485.041000] calling tabletop detection
[INFO] [WallTime: 1313364658.520358] [485.143000] tabletop detection reports success
[INFO] [WallTime: 1313364658.530696] [485.143000] detection finished, finding bounding boxes for clusters and sorting objects
[INFO] [WallTime: 1313364658.531799] [485.143000] saw 1 objects on the right and 0 objects on the left
[INFO] [WallTime: 1313364658.532192] [485.143000] setting pick_up_side to the right side, put_down_side to the left
[INFO] [WallTime: 1313364658.572135] [485.146000] starting to move objects from r side to l side
[INFO] [WallTime: 1313364658.573262] [485.146000] object_tries:0 ...
(more)
edit flag offensive delete link more

Comments

The rviz crash is caused by a bug in Ogre. Certain combinations of marker materials will cause that in an unpredictable fashion; unfortunately there is not much we can do about it... What marker topics do you have enabled? Disabling some of those will hopefully eliminate the crash.
Matei Ciocarlie gravatar image Matei Ciocarlie  ( 2011-08-18 05:38:20 -0600 )edit
A better (though still not ideal) solution is to patch Ogre to eliminate that assertion. We have put a patch that does that in our electric release. If you are on diamondback, you can download the diamondback version of the source code for the ogre package, then apply the patch and recompile.
Matei Ciocarlie gravatar image Matei Ciocarlie  ( 2011-08-18 05:40:39 -0600 )edit
the marker topic that i am using is: /tabletop_object_recognition_markers, /tabletop_segmentation_markers, /head_monitor_right_arm/point_head_target_marker, /grasp_markers, /kinematics_collisions, /environment_server_contact_markers, /point_cluster_grasp_planner_markers, /interpolation_markers
vincent gravatar image vincent  ( 2011-08-19 13:54:40 -0600 )edit
I tried to apply the patch, but couldn't find the file 'OgreRenderQueueSortingGrouping.cpp' in diamondback.
vincent gravatar image vincent  ( 2011-08-19 15:57:10 -0600 )edit
I added the patch to the Makefile in ogre root directory. But when I type make, it told me permission was denied to create directory 'build'. Then I type sudo make, it couldn't find the rospack command. Why I can't use sudo make? And what's the appropriate way to apply this patch.
vincent gravatar image vincent  ( 2011-08-20 03:17:20 -0600 )edit
I am not familiar with the gnu build system. So bear with me:)
vincent gravatar image vincent  ( 2011-08-20 03:25:07 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2011-08-14 03:30:42 -0600

Seen: 1,601 times

Last updated: Aug 23 '11