def setup(self, context): self.name = "hrpsys dashbaord" self._console = ConsoleDashWidget(self.context, minimal=False) self._monitor = MonitorDashWidget(self.context) self._log = HrpsysLogMenu() rtcd_start_command = rospy.get_param('hrpsys_rtcd_start_command', None) rtcd_stop_command = rospy.get_param('hrpsys_rtcd_stop_command', None) if rtcd_stop_command or rtcd_start_command: self._rtcd = HrpsysRTCDMenu(rtcd_start_command, rtcd_stop_command) else: self._rtcd = None ros_bridge_start_command = rospy.get_param( 'hrpsys_ros_bridge_start_command', None) ros_bridge_stop_command = rospy.get_param( 'hrpsys_ros_bridge_stop_command', None) if ros_bridge_stop_command or ros_bridge_start_command: self._ros_bridge = HrpsysROSBridgeMenu(ros_bridge_start_command, ros_bridge_stop_command) else: self._ros_bridge = None self._power = None #self._power = HrpsysPowerMenu() self._servo = HrpsysServoMenu( rospy.get_param('hrpsys_servo_start_command', None), rospy.get_param('hrpsys_servo_stop_command', None)) self._dashboard_agg_sub = rospy.Subscriber( 'diagnostics_agg', diagnostic_msgs.msg.DiagnosticArray, self.dashboard_callback)
def setup(self, context): self.name = 'PR2 Dashboard' self.max_icon_size = QSize(50, 30) self.message = None self._dashboard_message = None self._last_dashboard_message_time = 0.0 self._raw_byte = None self.digital_outs = [0, 0, 0] self._console = ConsoleDashWidget(self.context, minimal=False) self._monitor = MonitorDashWidget(self.context) self._motors = PR2Motors(self.on_reset_motors, self.on_halt_motors) self._breakers = [ PR2BreakerButton('Left Arm', 0), PR2BreakerButton('Base', 1), PR2BreakerButton('Right Arm', 2) ] self._runstop = PR2Runstops('RunStops') self._batteries = [PR2Battery(self.context)] self._dashboard_agg_sub = rospy.Subscriber('dashboard_agg', DashboardState, self.dashboard_callback)
def setup(self, context): self.name = 'Youbot Dashboard' self.max_icon_size = QSize(50, 30) self.message = None self._dashboard_message = None self._last_dashboard_message_time = 0.0 self._raw_byte = None self.digital_outs = [0, 0, 0] self._console = ConsoleDashWidget(self.context, minimal=False) self._monitor = MonitorDashWidget(self.context) self._base_motors = YoubotMotors("base", self.on_base_motors_on_clicked, self.on_base_motors_off_clicked) self._arm_1_motors = YoubotMotors("arm", self.on_arm_1_motors_on_clicked, self.on_arm_1_motors_off_clicked) self._ethercat = YoubotEthercat('EtherCAT', self.on_reconnect_clicked) self._batteries = [PR2Battery(self.context)] self._dashboard_agg_sub = rospy.Subscriber('dashboard_agg', DashboardState, self.dashboard_callback)
def setup(self, context): self.name = 'Scitos Dashboard' self.max_icon_size = QSize(50, 30) self.message = None self._dashboard_message = None self._last_dashboard_message_time = 0.0 self._raw_byte = None self.digital_outs = [0, 0, 0] self._console = ConsoleDashWidget(self.context, minimal=False) self._monitor = MonitorDashWidget(self.context) self._mileage = ScitosMileage() self._drive = ScitosDrive(self.reset_motorstop_cb, self.freerun_cb, self.enable_motorstop_cb) self._batteries = ScitosBattery() self._freerun_state = True self._motor_state_sub = rospy.Subscriber('/motor_status', MotorStatus, self.motor_status_callback) self._battery_state_sub = rospy.Subscriber('/battery_state', BatteryState, self.battery_callback) self._mileage_sub = rospy.Subscriber('/mileage', Float32, self.mileage_callback) self._motor_stale_timer = Timer(0, self._drive.set_stale) self._motor_stale_timer.start() self._battery_stale_timer = Timer(0, self._batteries.set_stale) self._battery_stale_timer.start() self._mileage_stale_timer = Timer(0, self._mileage.set_stale) self._mileage_stale_timer.start()
def setup(self, context): self.name = 'PR2 Dashboard' self.max_icon_size = QSize(50, 30) self.message = None parser = argparse.ArgumentParser(prog='pr2_dashboard', add_help=False) PR2Dashboard.add_arguments(parser) args = parser.parse_args(context.argv()) self._motor_namespace = args.motor_namespace self._dashboard_message = None self._last_dashboard_message_time = 0.0 self._raw_byte = None self.digital_outs = [0, 0, 0] self._console = ConsoleDashWidget(self.context, minimal=False) self._monitor = MonitorDashWidget(self.context) self._motors = PR2Motors(self.on_reset_motors, self.on_halt_motors) self._breakers = [ PR2BreakerButton('Left Arm', 0), PR2BreakerButton('Base', 1), PR2BreakerButton('Right Arm', 2) ] self._runstop = PR2Runstops('RunStops') self._batteries = [PR2Battery(self.context)] self._dashboard_agg_sub = rospy.Subscriber('dashboard_agg', DashboardState, self.dashboard_callback)
class NAOqiDashboard(Dashboard): def setup(self, context): self.name = 'NAOqi Dashboard (%s)' % rosenv.get_master_uri() self.robot_prefix = '' # get robot info rospy.wait_for_service("/naoqi_driver/get_robot_config") try: get_robot_info = rospy.ServiceProxy( "/naoqi_driver/get_robot_config", GetRobotInfo) resp = get_robot_info.call(GetRobotInfoRequest()) if resp.info.type == 0: self.robot_prefix = "nao_robot" elif resp.info.type == 2: self.robot_prefix = "pepper_robot" except rospy.ServiceException, e: print "Unable to call naoqi_driver/get_robot_config:%s", e #print "gonna work with robot prefix ", self.robot_prefix self._robot_combobox = AvahiWidget() # Diagnostics self._monitor = MonitorDashWidget(self.context) # Rosout self._console = ConsoleDashWidget(self.context, minimal=False) ## Joint temperature self._temp_joint_button = StatusControl('Joint temperature', 'temperature_joints') ## CPU temperature self._temp_head_button = StatusControl('CPU temperature', 'temperature_head') ## Motors self._motors_button = Motors(self.context, self.robot_prefix) ## Postures self._postures = PostureWidget(self.robot_prefix) ## Battery State self._power_state_ctrl = PowerStateControl('Battery') self._agg_sub = rospy.Subscriber('/diagnostics_agg', DiagnosticArray, self.new_diagnostic_message)
def setup(self, context): self.name = 'Irp6 Dashboard (%s)'%rosenv.get_master_uri() # Diagnostics self._monitor = MonitorDashWidget(self.context) # Rosout self._console = ConsoleDashWidget(self.context, minimal=False) ## Motors self._irp6p_motors_button = Irp6pMotors(self.context) self._irp6ot_motors_button = Irp6otMotors(self.context) self._conveyor_motors_button = ConveyorMotors(self.context) self._stop_button = Irp6Stop('Irp6Stop',self.emergency_stop) self._agg_sub = rospy.Subscriber('diagnostics', DiagnosticArray, self.new_diagnostic_message_diagnostics)
def setup(self, context): self.name = 'NAO Dashboard (%s)'%rosenv.get_master_uri() self._robot_combobox = AvahiWidget() # Diagnostics self._monitor = MonitorDashWidget(self.context) # Rosout self._console = ConsoleDashWidget(self.context, minimal=False) ## Joint temperature self._temp_joint_button = StatusControl('Joint temperature', 'temperature_joints') ## CPU temperature self._temp_head_button = StatusControl('CPU temperature', 'temperature_head') ## Motors self._motors_button = Motors(self.context) ## Battery State self._power_state_ctrl = PowerStateControl('NAO Battery') self._agg_sub = rospy.Subscriber('diagnostics_agg', DiagnosticArray, self.new_diagnostic_message)