Skip to content

Commit

Permalink
Feature/diagnostics (#135)
Browse files Browse the repository at this point in the history
* Initial port of diagnostics to C++

* Remap axis camera topics to match API

* Monitor MCU Status message frequency

* Added firmware version check

* Group MCU diagnostics together

* Improve messaging around firmware versions

* Disable MCU diagnostics for A200
  • Loading branch information
hilary-luo authored and luis-camero committed Jan 28, 2025
1 parent f7e4f86 commit cd66fd9
Show file tree
Hide file tree
Showing 12 changed files with 528 additions and 360 deletions.
28 changes: 23 additions & 5 deletions clearpath_diagnostics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,32 @@ endif()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(ament_cmake_python REQUIRED)
find_package(clearpath_platform_msgs REQUIRED)
find_package(diagnostic_updater REQUIRED)
find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)

ament_python_install_package(${PROJECT_NAME})
set(DEPENDENCIES
ament_cmake
clearpath_platform_msgs
diagnostic_updater
rclcpp
sensor_msgs
)

install(PROGRAMS
${PROJECT_NAME}/diagnostics_updater
DESTINATION lib/${PROJECT_NAME}
add_executable(clearpath_diagnostic_updater
src/clearpath_diagnostic_updater.cpp
)
target_include_directories(clearpath_diagnostic_updater PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>)
target_compile_features(clearpath_diagnostic_updater PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17

ament_target_dependencies(clearpath_diagnostic_updater ${DEPENDENCIES})
target_link_libraries(clearpath_diagnostic_updater)

install(TARGETS clearpath_diagnostic_updater
DESTINATION lib/${PROJECT_NAME})

install(DIRECTORY config launch
DESTINATION share/${PROJECT_NAME}
Expand Down
Empty file.
249 changes: 0 additions & 249 deletions clearpath_diagnostics/clearpath_diagnostics/diagnostics_updater

This file was deleted.

35 changes: 35 additions & 0 deletions clearpath_diagnostics/config/diagnostic_aggregator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
diagnostic_aggregator:
ros__parameters:
path: Clearpath Diagnostics
platform:
type: diagnostic_aggregator/AnalyzerGroup
path: Platform
analyzers:
mcu:
type: diagnostic_aggregator/GenericAnalyzer
path: MCU
contains: [ 'MCU' ]
sensors:
type: diagnostic_aggregator/AnalyzerGroup
path: Sensors
analyzers:
cameras:
type: diagnostic_aggregator/GenericAnalyzer
path: Cameras
contains: [ 'camera' ]
lidar2d:
type: diagnostic_aggregator/GenericAnalyzer
path: Lidar2D
contains: [ 'lidar2d' ]
lidar3d:
type: diagnostic_aggregator/GenericAnalyzer
path: Lidar3D
contains: [ 'lidar3d' ]
imu:
type: diagnostic_aggregator/GenericAnalyzer
path: IMU
contains: [ 'imu' ]
gps:
type: diagnostic_aggregator/GenericAnalyzer
path: GPS
contains: [ 'gps' ]
8 changes: 8 additions & 0 deletions clearpath_diagnostics/config/diagnostic_updater.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
clearpath_diagnostic_updater:
ros__parameters:
serial_number: unknown
platform_model: unknown
ros_distro: unknown
latest_apt_firmware_version: unknown
installed_apt_firmware_version: unknown
topics: {}
36 changes: 0 additions & 36 deletions clearpath_diagnostics/config/diagnostics.yaml

This file was deleted.

Loading

0 comments on commit cd66fd9

Please sign in to comment.