Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
dbd6717
feat(sensor-diagnostics): add project skeleton and LiDAR simulator node
bburda Jan 25, 2026
b72d5a5
feat(sensor-diagnostics): add IMU, GPS, and camera simulator nodes
bburda Jan 25, 2026
4f567b2
feat(sensor-diagnostics): add anomaly detector node
bburda Jan 25, 2026
8f2e6b3
feat(sensor-diagnostics): add config files and launch system
bburda Jan 25, 2026
d0a794e
feat(sensor-diagnostics): add Docker support
bburda Jan 25, 2026
da1a3c4
feat(sensor-diagnostics): add demo scripts and documentation
bburda Jan 25, 2026
aacda07
docs: update main README with sensor diagnostics demo
bburda Jan 25, 2026
fa254ed
ci: add sensor diagnostics demo to CI pipeline
bburda Jan 25, 2026
2c05967
fix(docker): include all ros2_medkit dependencies
bburda Jan 25, 2026
ce7a928
fix(docker): resolve build issues for sensor diagnostics demo
bburda Jan 25, 2026
a2bd2ae
feat: integrate anomaly detector with fault_manager
bburda Jan 25, 2026
180ebde
feat: implement dual fault reporting paths (legacy + modern)
bburda Jan 25, 2026
fc395d4
feat: add fault clearing to restore-normal.sh script
bburda Jan 25, 2026
95735a5
fix: address PR review comments from Copilot
bburda Jan 25, 2026
f10b563
fix: async_send_request with callback + correct fault clearing paths
bburda Jan 25, 2026
6e0c47b
fix: address all PR #14 review comments
bburda Jan 26, 2026
c606ccb
refactor: remove unused simulated_sensor_base.hpp (YAGNI)
bburda Jan 26, 2026
c441941
fix(sensor-demo): Fix fault injection scripts
bburda Jan 26, 2026
8a13e05
docs: note that sensors use ERROR level for all non-OK states
bburda Jan 26, 2026
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
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Sensor Diagnostics demo image
run: |
cd demos/sensor_diagnostics
docker build -t sensor-diagnostics-demo:test -f Dockerfile .

- name: Build TurtleBot3 demo image
run: |
cd demos/turtlebot3_integration
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,19 @@ progressing toward more advanced use cases.

| Demo | Description | Status |
|------|-------------|--------|
| [TurtleBot3 Integration](demos/turtlebot3_integration/) | Basic ros2_medkit integration with TurtleBot3 and Nav2 | 🚧 In Progress |
| [Sensor Diagnostics](demos/sensor_diagnostics/) | Lightweight sensor diagnostics demo (no Gazebo required) | ✅ Ready |
| [TurtleBot3 Integration](demos/turtlebot3_integration/) | Full ros2_medkit integration with TurtleBot3 and Nav2 | 🚧 In Progress |

### Quick Start (Sensor Diagnostics)

The sensor diagnostics demo is the fastest way to try ros2_medkit:

```bash
cd demos/sensor_diagnostics
docker compose up
# Open http://localhost:3000 for the Web UI
# Run ./run-demo.sh for an interactive walkthrough
```

## Getting Started

Expand Down
86 changes: 86 additions & 0 deletions demos/sensor_diagnostics/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
cmake_minimum_required(VERSION 3.8)
project(sensor_diagnostics_demo)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# Find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(diagnostic_msgs REQUIRED)
find_package(rcl_interfaces REQUIRED)
find_package(ros2_medkit_msgs REQUIRED)

# LiDAR simulator node
add_executable(lidar_sim_node src/lidar_sim_node.cpp)
ament_target_dependencies(lidar_sim_node
rclcpp
sensor_msgs
diagnostic_msgs
rcl_interfaces
)

# IMU simulator node
add_executable(imu_sim_node src/imu_sim_node.cpp)
ament_target_dependencies(imu_sim_node
rclcpp
sensor_msgs
diagnostic_msgs
)

# GPS simulator node
add_executable(gps_sim_node src/gps_sim_node.cpp)
ament_target_dependencies(gps_sim_node
rclcpp
sensor_msgs
diagnostic_msgs
)

# Camera simulator node
add_executable(camera_sim_node src/camera_sim_node.cpp)
ament_target_dependencies(camera_sim_node
rclcpp
sensor_msgs
diagnostic_msgs
rcl_interfaces
)

# Anomaly detector node
add_executable(anomaly_detector_node src/anomaly_detector_node.cpp)
ament_target_dependencies(anomaly_detector_node
rclcpp
sensor_msgs
diagnostic_msgs
ros2_medkit_msgs
)

# Install executables
install(TARGETS
lidar_sim_node
imu_sim_node
gps_sim_node
camera_sim_node
anomaly_detector_node
DESTINATION lib/${PROJECT_NAME}
)

# Install launch files
install(DIRECTORY launch/
DESTINATION share/${PROJECT_NAME}/launch
)

# Install config files
install(DIRECTORY config/
DESTINATION share/${PROJECT_NAME}/config
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_package()
63 changes: 63 additions & 0 deletions demos/sensor_diagnostics/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Sensor Diagnostics Demo
# Lightweight ROS 2 image without Gazebo - fast build and startup
# Image size: ~500MB vs ~4GB for TurtleBot3 demo
# Startup time: ~5s vs ~60s

FROM ros:jazzy-ros-base

ENV DEBIAN_FRONTEND=noninteractive
ENV ROS_DISTRO=jazzy
ENV COLCON_WS=/root/demo_ws

# Install minimal dependencies (no Gazebo, no simulation packages)
RUN apt-get update && apt-get install -y \
ros-jazzy-ament-lint-auto \
ros-jazzy-ament-lint-common \
ros-jazzy-ament-cmake-gtest \
ros-jazzy-yaml-cpp-vendor \
ros-jazzy-example-interfaces \
python3-colcon-common-extensions \
python3-requests \
nlohmann-json3-dev \
libcpp-httplib-dev \
libsqlite3-dev \
git \
curl \
jq \
&& rm -rf /var/lib/apt/lists/*

# Clone ros2_medkit from GitHub (gateway + dependencies)
WORKDIR ${COLCON_WS}/src
RUN git clone --depth 1 --recurse-submodules https://github.com/selfpatch/ros2_medkit.git && \
mv ros2_medkit/src/ros2_medkit_gateway . && \
mv ros2_medkit/src/ros2_medkit_serialization . && \
mv ros2_medkit/src/ros2_medkit_msgs . && \
mv ros2_medkit/src/ros2_medkit_fault_manager . && \
mv ros2_medkit/src/ros2_medkit_fault_reporter . && \
mv ros2_medkit/src/ros2_medkit_diagnostic_bridge . && \
mv ros2_medkit/src/dynamic_message_introspection/dynmsg . && \
rm -rf ros2_medkit

# Copy demo package
COPY package.xml CMakeLists.txt ${COLCON_WS}/src/sensor_diagnostics_demo/
COPY src/ ${COLCON_WS}/src/sensor_diagnostics_demo/src/
COPY config/ ${COLCON_WS}/src/sensor_diagnostics_demo/config/
COPY launch/ ${COLCON_WS}/src/sensor_diagnostics_demo/launch/

# Build all packages (skip test dependencies that aren't in ros-base)
WORKDIR ${COLCON_WS}
RUN bash -c "source /opt/ros/jazzy/setup.bash && \
rosdep update && \
rosdep install --from-paths src --ignore-src -r -y \
--skip-keys='ament_cmake_clang_format ament_cmake_clang_tidy test_msgs example_interfaces sqlite3' && \
colcon build --symlink-install --cmake-args -DBUILD_TESTING=OFF"

# Setup environment
RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc && \
echo "source ${COLCON_WS}/install/setup.bash" >> ~/.bashrc

# Expose gateway port
EXPOSE 8080

# Default command: launch the demo
CMD ["bash", "-c", "source /opt/ros/jazzy/setup.bash && source /root/demo_ws/install/setup.bash && ros2 launch sensor_diagnostics_demo demo.launch.py"]
Loading