diff --git a/clearpath_motor_msgs/CMakeLists.txt b/clearpath_motor_msgs/CMakeLists.txt index 87003a5..8c0fc8a 100644 --- a/clearpath_motor_msgs/CMakeLists.txt +++ b/clearpath_motor_msgs/CMakeLists.txt @@ -17,6 +17,15 @@ find_package(rosidl_default_generators REQUIRED) find_package(std_msgs REQUIRED) rosidl_generate_interfaces(${PROJECT_NAME} + action/LynxCalibrate.action + action/LynxUpdate.action + msg/LynxDebug.msg + msg/LynxFeedback.msg + msg/LynxMultiDebug.msg + msg/LynxMultiFeedback.msg + msg/LynxMultiStatus.msg + msg/LynxStatus.msg + msg/LynxSystemProtection.msg msg/PumaFeedback.msg msg/PumaStatus.msg msg/PumaMultiFeedback.msg diff --git a/clearpath_motor_msgs/action/LynxCalibrate.action b/clearpath_motor_msgs/action/LynxCalibrate.action new file mode 100644 index 0000000..6d12346 --- /dev/null +++ b/clearpath_motor_msgs/action/LynxCalibrate.action @@ -0,0 +1,7 @@ +# Request +--- +# Result +float32[] offset +--- +# Feedback +uint16[] iteration diff --git a/clearpath_motor_msgs/action/LynxUpdate.action b/clearpath_motor_msgs/action/LynxUpdate.action new file mode 100644 index 0000000..1065a68 --- /dev/null +++ b/clearpath_motor_msgs/action/LynxUpdate.action @@ -0,0 +1,8 @@ +# Request +string file +--- +# Result +bool[] success +--- +# Feedback +float32[] progress diff --git a/clearpath_motor_msgs/msg/LynxDebug.msg b/clearpath_motor_msgs/msg/LynxDebug.msg new file mode 100644 index 0000000..4904d88 --- /dev/null +++ b/clearpath_motor_msgs/msg/LynxDebug.msg @@ -0,0 +1,50 @@ +# Number on the bus (CAN ID). +uint8 can_id + +# Name of joint controlled, or other identifier. +string joint_name + +# Faults triggered per second +uint16 fault_frequency + +# Accumulator Flags +uint8 ACCUMULATOR_FLAG_ABOVE_RATED=0 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_1_1=1 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_1_2=2 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_1_3=3 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_1_4=4 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_1_5=5 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_1_6=6 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_1_7=7 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_1_8=8 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_1_9=9 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_2_0=10 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_2_1=11 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_2_2=12 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_2_3=13 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_2_4=14 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_2_5=15 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_2_6=16 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_2_7=17 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_2_8=18 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_2_9=19 +uint8 ACCUMULATOR_FLAG_CONTINUOUS_3_0=20 + +uint32 accumulator_flags + +uint8 ACCUMULATOR_ABOVE_RATED=0 +uint8 ACCUMULATOR_CONTINUOUS_1_1=1 +uint8 ACCUMULATOR_CONTINUOUS_1_5=2 +uint8 ACCUMULATOR_CONTINUOUS_2_0=3 +uint8 ACCUMULATOR_CONTINUOUS_2_5=4 +uint8 ACCUMULATOR_CONTINUOUS_3_0=5 +float32[] accumulators + +# Current readings (Amps) +uint8 CURRENT_ID_FB=0 +uint8 CURRENT_ID_FF=1 +uint8 CURRENT_ID_REF=2 +uint8 CURRENT_IQ_FB=3 +uint8 CURRENT_IQ_FF=4 +uint8 CURRENT_IQ_REF=5 +float32[] currents diff --git a/clearpath_motor_msgs/msg/LynxFeedback.msg b/clearpath_motor_msgs/msg/LynxFeedback.msg new file mode 100644 index 0000000..c736b8c --- /dev/null +++ b/clearpath_motor_msgs/msg/LynxFeedback.msg @@ -0,0 +1,14 @@ +# Number on the bus (CAN ID). +uint8 can_id + +# Name of joint controlled, or other identifier. +string joint_name + +# Current consumed (amps RMS). +float32 current + +# Motor voltage (volts). +float32 voltage + +# Angular velocity of the wheel (rad/s). +float32 velocity diff --git a/clearpath_motor_msgs/msg/LynxMultiDebug.msg b/clearpath_motor_msgs/msg/LynxMultiDebug.msg new file mode 100644 index 0000000..062f432 --- /dev/null +++ b/clearpath_motor_msgs/msg/LynxMultiDebug.msg @@ -0,0 +1,3 @@ +std_msgs/Header header + +clearpath_motor_msgs/LynxDebug[] drivers diff --git a/clearpath_motor_msgs/msg/LynxMultiFeedback.msg b/clearpath_motor_msgs/msg/LynxMultiFeedback.msg new file mode 100644 index 0000000..5567b17 --- /dev/null +++ b/clearpath_motor_msgs/msg/LynxMultiFeedback.msg @@ -0,0 +1,3 @@ +std_msgs/Header header + +clearpath_motor_msgs/LynxFeedback[] drivers diff --git a/clearpath_motor_msgs/msg/LynxMultiStatus.msg b/clearpath_motor_msgs/msg/LynxMultiStatus.msg new file mode 100644 index 0000000..6dcb584 --- /dev/null +++ b/clearpath_motor_msgs/msg/LynxMultiStatus.msg @@ -0,0 +1,3 @@ +std_msgs/Header header + +clearpath_motor_msgs/LynxStatus[] drivers diff --git a/clearpath_motor_msgs/msg/LynxStatus.msg b/clearpath_motor_msgs/msg/LynxStatus.msg new file mode 100644 index 0000000..67477c5 --- /dev/null +++ b/clearpath_motor_msgs/msg/LynxStatus.msg @@ -0,0 +1,39 @@ +# Number on the bus (CAN ID). +uint8 can_id + +# Name of joint controlled, or other identifier. +string joint_name + +# Firmware version +string firmware_version + +# Motor winding temperature (degC). +float32 motor_temperature + +# BLDC MCU temperature (degC) +float32 mcu_temperature + +# BLDC PCB temperature (degC) +float32 pcb_temperature + +# Hardware triggered stop +bool stopped + +# Status Flags +uint8 STATUS_FLAG_ADC_CALIBRATED=0 +uint8 STATUS_FLAG_ROTOR_CALIBRATED=1 +uint8 STATUS_FLAG_CALIBRATION_REQUESTED=2 +uint8 STATUS_FLAG_CALIBRATION_CANCELLED=3 +uint8 STATUS_FLAG_FIRST_VEL_RECEIVED=4 +uint8 STATUS_FLAG_ESTOPPED=5 + +uint32 status_flags + +# Error Flags +uint8 ERROR_FLAG_NOT_CALIBRATED=0 +uint8 ERROR_FLAG_MOTOR_FAULT=1 +uint8 ERROR_FLAG_MOTOR_THERMISTOR=2 +uint8 ERROR_FLAG_PCB_THERMISTOR=3 +uint8 ERROR_FLAG_ENCODER=4 + +uint32 error_flags diff --git a/clearpath_motor_msgs/msg/LynxSystemProtection.msg b/clearpath_motor_msgs/msg/LynxSystemProtection.msg new file mode 100644 index 0000000..12a8630 --- /dev/null +++ b/clearpath_motor_msgs/msg/LynxSystemProtection.msg @@ -0,0 +1,19 @@ +std_msgs/Header header + +# Protection states +uint8 NORMAL=0 +uint8 THROTTLED=1 +uint8 OVERHEATED=2 +uint8 ERROR=3 + +# System state based on highest protection state of motors +uint8 system_state + +# A300 +uint8 A300_MOTOR_REAR_LEFT=0 +uint8 A300_MOTOR_FRONT_LEFT=1 +uint8 A300_MOTOR_FRONT_RIGHT=2 +uint8 A300_MOTOR_REAR_RIGHT=3 + +# Individual motor protection states +uint8[] motor_states diff --git a/clearpath_motor_msgs/package.xml b/clearpath_motor_msgs/package.xml index a068124..6a43d71 100644 --- a/clearpath_motor_msgs/package.xml +++ b/clearpath_motor_msgs/package.xml @@ -14,8 +14,9 @@ ament_cmake action_msgs - std_msgs builtin_interfaces + std_msgs + rosidl_default_generators diff --git a/clearpath_platform_msgs/CMakeLists.txt b/clearpath_platform_msgs/CMakeLists.txt index 2a99201..622226b 100644 --- a/clearpath_platform_msgs/CMakeLists.txt +++ b/clearpath_platform_msgs/CMakeLists.txt @@ -25,6 +25,7 @@ rosidl_generate_interfaces(${PROJECT_NAME} msg/RGB.msg msg/Status.msg msg/StopStatus.msg + msg/Temperature.msg srv/ConfigureMcu.srv DEPENDENCIES std_msgs builtin_interfaces ) diff --git a/clearpath_platform_msgs/msg/Fans.msg b/clearpath_platform_msgs/msg/Fans.msg index b07a77c..0524fd5 100644 --- a/clearpath_platform_msgs/msg/Fans.msg +++ b/clearpath_platform_msgs/msg/Fans.msg @@ -1,5 +1,15 @@ # Location of fans. +# Common Core (CC01) +uint8 CC01_FAN1=0 +uint8 CC01_FAN2=1 +uint8 CC01_FAN3=2 +uint8 CC01_FAN4=3 +uint8 CC01_FAN5=4 +uint8 CC01_FAN6=5 +uint8 CC01_FAN7=6 +uint8 CC01_FAN8=7 + # Ridgeback (R100) uint8 R100_EQUIPMENT_BAY_INTAKE=0 uint8 R100_EQUIPMENT_BAY_EXHAUST=1 @@ -14,4 +24,4 @@ uint8 FAN_ON_HIGH=1 uint8 FAN_ON_LOW=2 # Control for the fans -uint8[] fans \ No newline at end of file +uint8[] fans diff --git a/clearpath_platform_msgs/msg/Lights.msg b/clearpath_platform_msgs/msg/Lights.msg index 31a9d70..1d655f8 100644 --- a/clearpath_platform_msgs/msg/Lights.msg +++ b/clearpath_platform_msgs/msg/Lights.msg @@ -28,4 +28,10 @@ uint8 W200_LIGHTS_FRONT_RIGHT=1 uint8 W200_LIGHTS_REAR_LEFT=2 uint8 W200_LIGHTS_REAR_RIGHT=3 +# Husky (A300) +uint8 A300_LIGHTS_FRONT_LEFT=0 +uint8 A300_LIGHTS_FRONT_RIGHT=1 +uint8 A300_LIGHTS_REAR_LEFT=2 +uint8 A300_LIGHTS_REAR_RIGHT=3 + RGB[] lights diff --git a/clearpath_platform_msgs/msg/Power.msg b/clearpath_platform_msgs/msg/Power.msg index d3b1ff0..977a846 100644 --- a/clearpath_platform_msgs/msg/Power.msg +++ b/clearpath_platform_msgs/msg/Power.msg @@ -50,6 +50,21 @@ uint8 A200_LEFT_DRIVER_VOLTAGE=1 uint8 A200_RIGHT_DRIVER_VOLTAGE=2 uint8 A200_VOLTAGES_SIZE=3 +# CC01 +uint8 CC01_BATTERY_VOLTAGE=0 +uint8 CC01_USER_BATTERY_VOLTAGE=1 +uint8 CC01_USER_24V_VOLTAGE=2 +uint8 CC01_USER_12V_VOLTAGE=3 +uint8 CC01_SYSTEM_12V_VOLTAGE=4 +uint8 CC01_EXPANSION_VOLTAGE=5 +uint8 CC01_BREAKOUT_24V_AUX_VOLTAGE=6 +uint8 CC01_BREAKOUT_12V_AUX_VOLTAGE=7 +uint8 CC01_BREAKOUT_USER_12VA_VOLTAGE=8 +uint8 CC01_BREAKOUT_LYNX1_VOLTAGE=9 +uint8 CC01_BREAKOUT_LYNX2_VOLTAGE=10 +uint8 CC01_BREAKOUT_LYNX3_VOLTAGE=11 +uint8 CC01_BREAKOUT_LYNX4_VOLTAGE=12 + float32[] measured_voltages # Current senses available on platform, in amps. @@ -84,4 +99,19 @@ uint8 A200_LEFT_DRIVER_CURRENT=1 uint8 A200_RIGHT_DRIVER_CURRENT=2 uint8 A200_CURRENTS_SIZE=3 +# CC01 +uint8 CC01_BATTERY_PACK_CURRENT=0 +uint8 CC01_USER_BATTERY_CURRENT=1 +uint8 CC01_AUX_CURRENT=2 +uint8 CC01_SYSTEM_12V_CURRENT=3 +uint8 CC01_24_CURRENT=4 +uint8 CC01_12_CURRENT=5 +uint8 CC01_BREAKOUT_USER_24V_CURRENT=6 +uint8 CC01_BREAKOUT_USER_12VA_CURRENT=7 +uint8 CC01_BREAKOUT_USER_12VB_CURRENT=8 +uint8 CC01_BREAKOUT_USER_LYNX1_CURRENT=9 +uint8 CC01_BREAKOUT_USER_LYNX2_CURRENT=10 +uint8 CC01_BREAKOUT_USER_LYNX3_CURRENT=11 +uint8 CC01_BREAKOUT_USER_LYNX4_CURRENT=12 + float32[] measured_currents diff --git a/clearpath_platform_msgs/msg/Temperature.msg b/clearpath_platform_msgs/msg/Temperature.msg new file mode 100644 index 0000000..ba60036 --- /dev/null +++ b/clearpath_platform_msgs/msg/Temperature.msg @@ -0,0 +1,27 @@ +# Location of temperature sensors. + +std_msgs/Header header + +# Common Core (CC01) +uint8 CC01_MCU=0 +uint8 CC01_FAN1=1 +uint8 CC01_FAN2=2 +uint8 CC01_FAN3=3 +uint8 CC01_FAN4=4 +uint8 CC01_FAN5=5 +uint8 CC01_FAN6=6 +uint8 CC01_FAN7=7 +uint8 CC01_FAN8=8 +uint8 CC01_5V_INDUCTOR=9 +uint8 CC01_MAIN_GND_LUG=10 +uint8 CC01_24V_DCDC=11 +uint8 CC01_12V_DCDC=12 +uint8 CC01_EXT_1=13 +uint8 CC01_EXT_2=14 +uint8 CC01_EXT_3=15 +uint8 CC01_EXT_4=16 +uint8 CC01_BREAKOUT_1=17 +uint8 CC01_BREAKOUT_2=18 + +# Array of temperature readings in Celsius +float32[] temperatures