Esempio n. 1
0
 def __init__(self):
     time.sleep(1)
     self.robot_state_msgs = RobotState()
     self.battery_state_msgs = BatteryState()
     self.twist_msgs = Twist()
     #
     self.diagnostics_speak_thread = {}
     self.auto_undocking = False
     self.diagnostics_list = []
     if rospy.get_param("~speak_warn", True):
         self.diagnostics_list.append(DiagnosticStatus.WARN)
     if rospy.get_param("~speak_error", True):
         self.diagnostics_list.append(DiagnosticStatus.ERROR)
     if rospy.get_param("~speak_stale", True):
         self.diagnostics_list.append(DiagnosticStatus.STALE)
     #
     self.base_breaker = rospy.ServiceProxy('base_breaker', BreakerCommand)
     #
     self.battery_sub = rospy.Subscriber("battery_state", BatteryState, self.battery_callback, queue_size = 1)
     self.cmd_vel_sub = rospy.Subscriber("base_controller/command_unchecked", Twist, self.cmd_vel_callback, queue_size = 1)
     self.robot_state_sub = rospy.Subscriber("robot_state", RobotState, self.robot_state_callback, queue_size = 1)
     self.diagnostics_status_sub = rospy.Subscriber("diagnostics", DiagnosticArray, self.diagnostics_status_callback, queue_size = 1)
     self.undock_sub = rospy.Subscriber("/undock/status", GoalStatusArray, self.undock_status_callback)
     #
     self.cmd_vel_pub = rospy.Publisher("base_controller/command", Twist, queue_size=1)
Esempio n. 2
0
 def __init__(self):
     time.sleep(1)
     self.battery_sub = rospy.Subscriber("battery_state", BatteryState, self.battery_callback, queue_size = 1)
     self.cmd_vel_sub = rospy.Subscriber("base_controller/command", Twist, self.cmd_vel_callback, queue_size = 1)
     self.robot_state_sub = rospy.Subscriber("robot_state", RobotState, self.robot_state_callback, queue_size = 1)
     self.diagnostics_status_sub = rospy.Subscriber("diagnostics", DiagnosticArray, self.diagnostics_status_callback, queue_size = 1)
     self.base_breaker = rospy.ServiceProxy('base_breaker', BreakerCommand)
     #
     self.robot_state_msgs = RobotState()
     self.battery_state_msgs = BatteryState()
     self.twist_msgs = Twist()
     #
     self.diagnostics_speak_thread = {}