32 import actionlib_msgs.msg
33 from actionlib
import goal_id_generator
38 * @class StatusTracker 39 * @brief A class for storing the status of each goal the action server 40 * is currently working on 43 def __init__(self, goal_id=None, status=None, goal=None):
45 @brief create status tracker. Either pass goal_id and status OR goal 49 self.
status = actionlib_msgs.msg.GoalStatus()
57 self.status.goal_id = goal_id
58 self.status.status = status
61 self.status.goal_id = goal.goal_id
64 self.status.status = actionlib_msgs.msg.GoalStatus.PENDING
67 if self.status.goal_id.id ==
"":
68 self.status.goal_id = self.id_generator.generate_ID()
71 if self.status.goal_id.stamp == rospy.Time():
72 self.status.goal_id.stamp = rospy.Time.now()
def __init__(self, goal_id=None, status=None, goal=None)