示例#1
0
 def __init__(self):
     self.action_server = MultiGoalActionServer('expression',
                                                ExpressionAction,
                                                auto_start=False)
     self.action_server.register_goal_callback(self.goal_callback)
     self.motor_pub = rospy.Publisher('pololu/command',
                                      MotorCommand,
                                      queue_size=10)
     self.motor_range_srv = rospy.ServiceProxy('pololu/motor_range',
                                               MotorRange)
     self.rate = rospy.Rate(10)
示例#2
0
 def __init__(self, node_name):
     self.action_server = MultiGoalActionServer(node_name, TimerAction, auto_start=False)
     self.action_server.register_goal_callback(self.goal_callback)
     self.action_server.register_preempt_callback(self.preempt_callback)
     self.timers = {}
     self.timers_lock = threading.RLock()