Skip to content
Snippets Groups Projects
Commit 157c4e9e authored by Jayant Khatkar's avatar Jayant Khatkar
Browse files

catch failed trajectory and exit prematurely (#17)

parent 98da0995
No related merge requests found
......@@ -323,8 +323,12 @@ class Controller(object):
if len(msg.status_list)>0:
self.traj_complete = (msg.status_list[-1].status==3 or
msg.status_list[-1].status==2)
# if self.traj_complete:
# print("Trajectory Execution Completed")
if msg.status_list[-1].status >= 4:
print("Trajectory has failed to execute, please check ROS MoveIt execution planner to see why")
print("STATUS: {}".format(msg.status_list[-1].status))
print("For info on status meaning, go to:\n" + \
"http://docs.ros.org/en/melodic/api/actionlib_msgs/html/msg/GoalStatus.html")
sys.exit(0)
def getR_ET():
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment