def check_vitals_front_motors(self, stat): try: status = roboclaw.ReadError(self.addressFrontMotors)[1] except OSError as e: rospy.logwarn("Diagnostics OSError: %d", e.errno) rospy.logdebug(e) return state, message = self.ERRORS[status] stat.summary(state, message) try: stat.add("Main Batt V:", float(roboclaw.ReadMainBatteryVoltage(self.addressFrontMotors)[1] / 10)) stat.add("Logic Batt V:", float(roboclaw.ReadLogicBatteryVoltage(self.addressFrontMotors)[1] / 10)) stat.add("Temp1 C:", float(roboclaw.ReadTemp(self.addressFrontMotors)[1] / 10)) stat.add("Temp2 C:", float(roboclaw.ReadTemp2(self.addressFrontMotors)[1] / 10)) except OSError as e: rospy.logwarn("Diagnostics OSError: %d", e.errno) rospy.logdebug(e) return stat
def read_main_battery_voltage(self, motor): return roboclaw_driver.ReadMainBatteryVoltage(self.address[motor])