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

Moveit Commander Plan Fail

asked 2019-11-26 15:15:53 -0600

rklutz gravatar image

I'm using rospy and moveit_commander to control a robot. It works wonderfully, except I cannot find a way in the API to handle a path planning failure. The MoveGroupCommander.plan() method does not seem to expose any value that indicates failure in python. Is there something I'm missing?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-02-29 12:36:20 -0600

fvd gravatar image

If the plan fails, the RobotTrajectory is empty, so you can check it as described here:

plan = move_group.plan()
if plan.joint_trajectory.points:  # True if trajectory contains points
  move_success = move_group.execute(plan)
  rospy.logerr("Trajectory is empty. Planning was unsuccessful.")
edit flag offensive delete link more

Question Tools


Asked: 2019-11-26 15:15:53 -0600

Seen: 474 times

Last updated: Feb 29 '20