Ask Your Question
0

Moveit Commander Plan Fail

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

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?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

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

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)
else:
  rospy.logerr("Trajectory is empty. Planning was unsuccessful.")
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 162 times

Last updated: Feb 29 '20