Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.")