Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial ROS 2 Jazzy #57

Draft
wants to merge 8 commits into
base: jazzy
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions clearpath_motor_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions clearpath_motor_msgs/action/LynxCalibrate.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Request
---
# Result
float32[] offset
---
# Feedback
uint16[] iteration
8 changes: 8 additions & 0 deletions clearpath_motor_msgs/action/LynxUpdate.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Request
string file
---
# Result
bool[] success
---
# Feedback
float32[] progress
50 changes: 50 additions & 0 deletions clearpath_motor_msgs/msg/LynxDebug.msg
Original file line number Diff line number Diff line change
@@ -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
14 changes: 14 additions & 0 deletions clearpath_motor_msgs/msg/LynxFeedback.msg
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions clearpath_motor_msgs/msg/LynxMultiDebug.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
std_msgs/Header header

clearpath_motor_msgs/LynxDebug[] drivers
3 changes: 3 additions & 0 deletions clearpath_motor_msgs/msg/LynxMultiFeedback.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
std_msgs/Header header

clearpath_motor_msgs/LynxFeedback[] drivers
3 changes: 3 additions & 0 deletions clearpath_motor_msgs/msg/LynxMultiStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
std_msgs/Header header

clearpath_motor_msgs/LynxStatus[] drivers
39 changes: 39 additions & 0 deletions clearpath_motor_msgs/msg/LynxStatus.msg
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions clearpath_motor_msgs/msg/LynxSystemProtection.msg
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion clearpath_motor_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
<buildtool_depend>ament_cmake</buildtool_depend>

<depend>action_msgs</depend>
<depend>std_msgs</depend>
<depend>builtin_interfaces</depend>
<depend>std_msgs</depend>


<build_depend>rosidl_default_generators</build_depend>

Expand Down
1 change: 1 addition & 0 deletions clearpath_platform_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
12 changes: 11 additions & 1 deletion clearpath_platform_msgs/msg/Fans.msg
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -14,4 +24,4 @@ uint8 FAN_ON_HIGH=1
uint8 FAN_ON_LOW=2

# Control for the fans
uint8[] fans
uint8[] fans
6 changes: 6 additions & 0 deletions clearpath_platform_msgs/msg/Lights.msg
Original file line number Diff line number Diff line change
Expand Up @@ -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
30 changes: 30 additions & 0 deletions clearpath_platform_msgs/msg/Power.msg
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
27 changes: 27 additions & 0 deletions clearpath_platform_msgs/msg/Temperature.msg
Original file line number Diff line number Diff line change
@@ -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