Skip to content

Commit

Permalink
added Watchdog messages to ROS2
Browse files Browse the repository at this point in the history
  • Loading branch information
jmastrangelo-cpr committed Sep 25, 2024
1 parent 0c7925e commit 2c50fe4
Show file tree
Hide file tree
Showing 34 changed files with 197 additions and 4 deletions.
34 changes: 34 additions & 0 deletions clearpath_outdoornav_msgs/clearpath_safety_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,48 @@ project(clearpath_safety_msgs)

find_package(rosidl_default_generators REQUIRED)
find_package(ament_cmake REQUIRED)
find_package(std_msgs REQUIRED)
set(CMAKE_CXX_STANDARD 17)

rosidl_generate_interfaces(
${PROJECT_NAME}
msg/AssistedTeleopState.msg
msg/ObstacleMap.msg
msg/Safety.msg
msg/WatchdogConfigArray.msg
msg/WatchdogConfigCommon.msg
msg/WatchdogConfigCommunication.msg
msg/WatchdogConfigHeartbeat.msg
msg/WatchdogConfigInclination.msg
msg/WatchdogConfigNodeletStatus.msg
msg/WatchdogConfigNodeStatus.msg
msg/WatchdogConfigNumPoints.msg
msg/WatchdogConfigOdomCovariance.msg
msg/WatchdogConfigRtkFix.msg
msg/WatchdogConfigTopicData.msg
msg/WatchdogStatus.msg
msg/WatchdogStatusArray.msg
srv/AddCommunicationWatchdog.srv
srv/AddHeartbeatWatchdog.srv
srv/AddInclinationWatchdog.srv
srv/AddNodeletStatusWatchdog.srv
srv/AddNodeStatusWatchdog.srv
srv/AddNumPointsWatchdog.srv
srv/AddOdomCovarianceWatchdog.srv
srv/AddRtkFixWatchdog.srv
srv/AddTopicDataWatchdog.srv
srv/RemoveWatchdog.srv
srv/UpdateCommunicationWatchdog.srv
srv/UpdateHeartbeatWatchdog.srv
srv/UpdateInclinationWatchdog.srv
srv/UpdateNodeletStatusWatchdog.srv
srv/UpdateNodeStatusWatchdog.srv
srv/UpdateNumPointsWatchdog.srv
srv/UpdateOdomCovarianceWatchdog.srv
srv/UpdateRtkFixWatchdog.srv
srv/UpdateTopicDataWatchdog.srv
DEPENDENCIES
std_msgs
)

ament_package()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ uint8 ASSIST_ON = 100
uint8 ASSIST_OFF_SERVICE = 101
uint8 ASSIST_OFF_JOYSTICK_OVERRIDE = 102
uint8 ASSIST_OFF_SENSOR_TIMEOUT = 103
uint8 ASSIST_OFF_REMOTE_CONTROLLER_OVERRIDE = 104
uint8 assist_off_trigger

string error_message
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Watchdog config message containing information related to device
# monitoring and what action should be taken to recover from an error


WatchdogConfigCommunication[] communication_config
WatchdogConfigHeartbeat[] heartbeat_config
WatchdogConfigInclination[] inclination_config
WatchdogConfigNodeStatus[] node_status_config
WatchdogConfigNodeletStatus[] nodelet_status_config
WatchdogConfigNumPoints[] num_points_config
WatchdogConfigOdomCovariance[] odom_covariance_config
WatchdogConfigRtkFix[] rtk_fix_config
WatchdogConfigTopicData[] topic_data_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
string name
string type
bool enabled
string[] components
string on_trigger_action
# string[] on_trigger_options
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
WatchdogConfigCommon base_config
string protocol
string ip # only used when protocol is 'ip'
string interface # only used when protocol is 'can' or 'serial'
float32 timeout
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
WatchdogConfigCommon base_config
string topic
float32 timeout
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
WatchdogConfigCommon base_config
float32 roll_limit
float32 pitch_limit
float32 delay
string topic
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
WatchdogConfigCommon base_config
string node_name
uint8 num_requests
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
WatchdogConfigCommon base_config
string manager
string nodelet
uint8 num_requests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
WatchdogConfigCommon base_config
string topic
int32 threshold
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
WatchdogConfigCommon base_config
string topic # Odometry topic
float32 xy_threshold
float32 yaw_threshold
float32 timeout
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
WatchdogConfigCommon base_config

bool rtk_heading_required
bool rtk_position_required
float32 timeout
string gnss_type # Either 'swiftnav' or 'xvn'
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
WatchdogConfigCommon base_config
string topic
float32 timeout
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Watchdog status message containing information related to sensor monitoring, emergency stop and safety stops
# The message definition for a Watchdog including the type of watchdog, whether it
# has been triggered or not and the recovery taken.

bool[] gps_watchdog_triggered
bool[] lidar_watchdog_triggered
bool[] camera_watchdog_triggered

string name
bool triggered
string trigger_message
string action
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Watchdog status message containing information related to device
# monitoring and what action has been taken to recover from an error

std_msgs/Header header
WatchdogStatus[] statuses
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigCommunication config

---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigHeartbeat config

---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigInclination config

---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigNodeStatus config

---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigNodeletStatus config

---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigNumPoints config

---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigOdomCovariance config

---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigRtkFix config

---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigTopicData config

---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

string name
---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigCommunication new_config
string current_name # used as a key to find the watchdog in the list of watchdogs
---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigHeartbeat new_config
string current_name # used as a key to find the watchdog in the list of watchdogs
---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigInclination new_config
string current_name # used as a key to find the watchdog in the list of watchdogs
---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigNodeStatus new_config
string current_name # used as a key to find the watchdog in the list of watchdogs
---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigNodeletStatus new_config
string current_name # used as a key to find the watchdog in the list of watchdogs
---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigNumPoints new_config
string current_name # used as a key to find the watchdog in the list of watchdogs
---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigOdomCovariance new_config
string current_name # used as a key to find the watchdog in the list of watchdogs
---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigRtkFix new_config
string current_name # used as a key to find the watchdog in the list of watchdogs
---
bool success
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

WatchdogConfigTopicData new_config
string current_name # used as a key to find the watchdog in the list of watchdogs
---
bool success

0 comments on commit 2c50fe4

Please sign in to comment.