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

pr2 Pick and Place Demo IK error (diamondback)

asked 2011-10-11 09:21:35 -0600

sararielle gravatar image

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

ngrennan gravatar image

I am trying to run the pr2_pick_and_place_demo on our PR2 (running diamondback). Most of the time I can get it to locate the object, grab it, and lift its arm, but then it stops. The error it throws is a "tuple index out of range" error. In the manipulation stack it throws the IK error code NO_IK_SOLUTION. Has anyone experienced this problem? Does anyone have a good solution?



Full Error Information
Traceback (most recent call last):
File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner self.run()
File "/usr/lib/python2.6/threading.py", line 484, in run self.__target(*self.__args, **self.__kwargs)
File df"/opt/ros/diamondback/stacks/pr2_tabletop_manipulation_apps/pr2_pick_and_place_demos/src/pr2_pick_and_place_demos/pick_and_place_demo.py", line 300, in run_demo result = self.move_objects_to_other_side()
File "/opt/ros/diamondback/stacks/pr2_tabletop_manipulation_apps/pr2_pick_and_place_demos/src/pr2_pick_and_place_demos/pick_and_place_demo.py", line 149, in move_objects_to_other_side (result, arm_used) = self.detect_and_pick_up_object(head_point, arms_to_try = arms_to_try, constrained = self.constrained)
File "/opt/ros/diamondback/stacks/pr2_tabletop_manipulation_apps/pr2_pick_and_place_demos/src/pr2_pick_and_place_demos/pick_and_place_manager.py", line 1614, in detect_and_pick_up_object (success, arm_used) = self.pick_up_nearest_object(arms_to_try = arms_to_try)
File "/opt/ros/diamondback/stacks/pr2_tabletop_manipulation_apps/pr2_pick_and_place_demos/src/pr2_pick_and_place_demos/pick_and_place_manager.py", line 1447, in pick_up_nearest_object (result, arm_used) = self.grasp_object_and_check_success(object_to_grasp, whicharm)
File "/opt/ros/diamondback/stacks/pr2_tabletop_manipulation_apps/pr2_pick_and_place_demos/src/pr2_pick_and_place_demos/pick_and_place_manager.py", line 1326, in grasp_object_and_check_success self.move_arm_to_side(arm_used, try_constrained = 1)
File "/opt/ros/diamondback/stacks/pr2_tabletop_manipulation_apps/pr2_pick_and_place_demos/src/pr2_pick_and_place_demos/pick_and_place_manager.py", line 1664, in move_arm_to_side result = self.try_to_move_constrained(whicharm,constraint,3,start_angles,location)
File "/opt/ros/diamondback/stacks/pr2_tabletop_manipulation_apps/pr2_pick_and_place_demos/src/pr2_pick_and_place_demos/pick_and_place_manager.py", line 1633, in try_to_move_constrained error_code = self.cms[whicharm].move_arm_constrained(constraint, start_angles, location)
File "/opt/ros/diamondback/stacks/pr2_object_manipulation/pr2_gripper_reactive_approach/src/pr2_gripper_reactive_approach/controller_manager.py", line 599, in move_arm_constrained joint_constraint.position = solution[2]
IndexError: tuple index out of range

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-10-12 03:05:55 -0600

The NO_IK_SOLUTION means that the IK received a manipulator pose for which there is no joints configuration (or it can't be found). You should try a different place position (which I don't think can be done with the demo).

The IndexError is probably a bug, as it means that there is no check that IK returned no solution, and it tries to access an element of an empty vector. This problem is trivial to solve (a try...except, or a if len(solution) != 0) will suffice, but I have never encountered it before.

Can you try electric and see if anything changes? Manipulation has improved a lot in the new version.

edit flag offensive delete link more
0

answered 2011-10-12 10:16:38 -0600

sararielle gravatar image

I upgraded the robot to electric and now the demo appears to work!!! yay! Thank you so much

edit flag offensive delete link more

Comments

Great! Next time you should post this as a comment, not an answer. Also, be sure to mark the question as answered so people will know the problem is solved. Enjoy your pick and place! :-)
Lorenzo Riano gravatar image Lorenzo Riano  ( 2011-10-12 20:59:05 -0600 )edit

Question Tools

Stats

Asked: 2011-10-11 09:21:35 -0600

Seen: 352 times

Last updated: Oct 12 '11