Moveit's computeCartesianPath() returns error code that is not listed

asked 2021-10-05 02:17:43 -0500

abhishek47 gravatar image

updated 2021-10-05 02:18:30 -0500

When computeCartesianPath() (documentation) fails, the error code obtained is not one listed in moveit_msgs/MoveItErrorCodes Message.

Here's the relevant code snippet:

moveit::planning_interface::MoveItErrorCode error;
const double fraction = move_group.computeCartesianPath(waypoints, step, jump_threshold, traj, &error);

For failures, error.val is some very large random number (sometimes 0) but none from the list of moveit_msgs/MoveItErrorCodes. And I've already checked if it's a case of buffer-overflow by adding/subtracting int32's limits, which it is not. One example of those large numbers is 805349328.

Why would the error code be any number other than those listed in moveit_msgs/MoveItErrorCodes?


Interestingly, if computeCartesianPath()'s default argument avoid_collisions is explicitly set to true, error.val is always 1, be it success or failure cases:

const bool avoid_collisions = true;
moveit::planning_interface::MoveItErrorCode error;
const double fraction = move_group.computeCartesianPath(waypoints, step, jump_threshold, traj, avoid_collisions, &error);
edit retag flag offensive close merge delete

Comments

Discord post that received some comments

abhishek47 gravatar image abhishek47  ( 2021-10-06 23:59:53 -0500 )edit