Regards,
Dr. Philippe Capdepuy
Research EngineerTel : +33 5 56 39 37 05
Découvrez Baxter, votre nouveau compagnon
pour la recherche et l’éducation
Baxter Research RobotRob,
If your still having this issue or to anyone else having this issue, I had the same problem and found a couple solutions.
The first solution I found was to use setPositionTarget (double x, double y, double z, const std::string &end_effector_link="").
Your code posted above does not have the end effector link which might be why it’s not working?
geometry_msgs::Pose target_pose1;
target_pose1.position.x = 1.0;
target_pose1.position.y = -0.2;
target_pose1.position.z = 0.5;
group.setPoseTarget(target_pose1.position.x, target_pose1.position.y, target_pose1.position.z, “tool0”);
group.setGoalTolerance(0.01);
The second solution I found was the orientation precision. If no orientation is given it uses the same orientation that the robot is in at the beginning which can cause it to fail. Also, if the given orientation does not have enough significant digits then it ignores it. To get setPoseTarget to work I had to specify the orientation to 10^-6.
Code excerpt:
geometry_msgs::Pose target_pose1;
target_pose1.orientation.x = -0.476214;
target_pose1.orientation.y = 0.485218;
target_pose1.orientation.z = -0.517232;
target_pose1.orientation.w = 0.519859;
target_pose1.position.x = 1.0;
target_pose1.position.y = -0.2;
target_pose1.position.z = 0.5;
group.setPoseTarget(target_pose1);
group.setGoalTolerance(0.01);
Using this code I was able to get the robot to move. I also implemented Philippe’s idea of goal tolerance. I hope this helps.
-Ben