-
Notifications
You must be signed in to change notification settings - Fork 2
feat: multi-ECU aggregation demo with static peer and mDNS discovery #56
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
58c22fc
feat(demo): scaffold multi-ECU aggregation demo package
bburda ada0602
feat(demo): add all 10 ROS 2 nodes for multi-ECU aggregation demo
bburda 902d128
feat(demo): add config files for multi-ECU aggregation demo
bburda 99def4b
feat(demo): add launch files for perception, planning, actuation ECUs
bburda a8a223e
feat(demo): add Dockerfile and docker-compose for multi-ECU demo
bburda 5c31a75
feat(demo): add shell scripts and container scripts for fault injection
bburda 9fb1a97
docs(demo): add README for multi-ECU aggregation demo
bburda b49fb6e
fix(demo): correct YAML namespace for gateway params
bburda 36ac3c5
fix(demo): enable aggregation on actuation ECU and hide unmanifested …
bburda 263e522
fix(demo): add infrastructure apps to manifests, use unmanifested_nod…
bburda c4cc503
fix(demo): change ROS2_MEDKIT_REF from feature branch to main
bburda f64870c
fix(demo): address review findings - shellcheck, clock type, timer re…
bburda d49cdda
fix(demo): update member variable on rate fallback in motor_controlle…
bburda 18f4256
fix(demo): update gripper_rate_ on fallback, add explicit geometry_ms…
bburda f62533b
fix(demo): improve code quality, add CI and smoke test for multi-ECU …
bburda 902abb5
fix(demo): fix actuation namespace references in main() functions
bburda 6782a50
fix(demo): fix domain_bridge node names and relax component assertion…
bburda 9c66caf
fix(demo): check ECU subcomponents at correct endpoint
bburda e3cee3e
fix: address review feedback on planning params and docker-compose
bburda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,3 +38,4 @@ docker-compose.local.yml | |
| .env | ||
| .venv/ | ||
| venv/ | ||
| demos/multi_ecu_aggregation/launch/__pycache__/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| cmake_minimum_required(VERSION 3.8) | ||
| project(multi_ecu_demo) | ||
|
|
||
| if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
| add_compile_options(-Wall -Wextra -Wpedantic) | ||
| endif() | ||
|
|
||
| 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(nav_msgs REQUIRED) | ||
| find_package(vision_msgs REQUIRED) | ||
| find_package(diagnostic_msgs REQUIRED) | ||
| find_package(rcl_interfaces REQUIRED) | ||
| find_package(ros2_medkit_msgs REQUIRED) | ||
|
|
||
| # --- Perception ECU nodes --- | ||
| add_executable(lidar_driver src/perception/lidar_driver.cpp) | ||
| ament_target_dependencies(lidar_driver rclcpp sensor_msgs diagnostic_msgs rcl_interfaces) | ||
|
|
||
| add_executable(camera_driver src/perception/camera_driver.cpp) | ||
| ament_target_dependencies(camera_driver rclcpp sensor_msgs diagnostic_msgs rcl_interfaces) | ||
|
|
||
| add_executable(point_cloud_filter src/perception/point_cloud_filter.cpp) | ||
| ament_target_dependencies(point_cloud_filter rclcpp sensor_msgs diagnostic_msgs rcl_interfaces) | ||
|
|
||
| add_executable(object_detector src/perception/object_detector.cpp) | ||
| ament_target_dependencies(object_detector rclcpp sensor_msgs vision_msgs diagnostic_msgs rcl_interfaces) | ||
|
|
||
| # --- Planning ECU nodes --- | ||
| add_executable(path_planner src/planning/path_planner.cpp) | ||
| ament_target_dependencies(path_planner rclcpp nav_msgs vision_msgs diagnostic_msgs rcl_interfaces) | ||
|
|
||
| add_executable(behavior_planner src/planning/behavior_planner.cpp) | ||
| ament_target_dependencies(behavior_planner rclcpp nav_msgs geometry_msgs diagnostic_msgs rcl_interfaces) | ||
|
|
||
| add_executable(task_scheduler src/planning/task_scheduler.cpp) | ||
| ament_target_dependencies(task_scheduler rclcpp std_msgs diagnostic_msgs rcl_interfaces) | ||
|
|
||
| # --- Actuation ECU nodes --- | ||
| add_executable(motor_controller src/actuation/motor_controller.cpp) | ||
| ament_target_dependencies(motor_controller rclcpp sensor_msgs geometry_msgs diagnostic_msgs rcl_interfaces) | ||
|
|
||
| add_executable(joint_driver src/actuation/joint_driver.cpp) | ||
| ament_target_dependencies(joint_driver rclcpp sensor_msgs diagnostic_msgs rcl_interfaces) | ||
|
|
||
| add_executable(gripper_controller src/actuation/gripper_controller.cpp) | ||
| ament_target_dependencies(gripper_controller rclcpp sensor_msgs geometry_msgs diagnostic_msgs rcl_interfaces) | ||
|
|
||
| # --- Install --- | ||
| install(TARGETS | ||
| lidar_driver camera_driver point_cloud_filter object_detector | ||
| path_planner behavior_planner task_scheduler | ||
| motor_controller joint_driver gripper_controller | ||
| DESTINATION lib/${PROJECT_NAME} | ||
| ) | ||
|
|
||
| install(DIRECTORY launch/ DESTINATION share/${PROJECT_NAME}/launch) | ||
| 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() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # Multi-ECU Aggregation Demo | ||
| FROM ros:jazzy-ros-base | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
| ENV ROS_DISTRO=jazzy | ||
| ENV COLCON_WS=/root/demo_ws | ||
|
|
||
| # Install minimal dependencies (no GUI/simulation) | ||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| ros-${ROS_DISTRO}-vision-msgs \ | ||
| ros-${ROS_DISTRO}-nav-msgs \ | ||
| ros-${ROS_DISTRO}-domain-bridge \ | ||
| ros-${ROS_DISTRO}-ament-lint-auto \ | ||
| ros-${ROS_DISTRO}-ament-lint-common \ | ||
| ros-${ROS_DISTRO}-ament-cmake-gtest \ | ||
| ros-${ROS_DISTRO}-yaml-cpp-vendor \ | ||
| ros-${ROS_DISTRO}-example-interfaces \ | ||
| python3-colcon-common-extensions \ | ||
| python3-requests \ | ||
| nlohmann-json3-dev \ | ||
| libcpp-httplib-dev \ | ||
| libsystemd-dev \ | ||
| sqlite3 \ | ||
| libsqlite3-dev \ | ||
| git \ | ||
| curl \ | ||
| jq \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # Clone ros2_medkit from GitHub (gateway + dependencies + plugins) | ||
| ARG ROS2_MEDKIT_REF=feat/entity-model-and-aggregation | ||
| WORKDIR ${COLCON_WS}/src | ||
| RUN git clone --depth 1 --branch ${ROS2_MEDKIT_REF} https://github.com/selfpatch/ros2_medkit.git && \ | ||
| mv ros2_medkit/src/ros2_medkit_cmake . && \ | ||
| 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/ros2_medkit_plugins/ros2_medkit_graph_provider . && \ | ||
| rm -rf ros2_medkit | ||
|
|
||
| # Copy demo package | ||
| COPY package.xml CMakeLists.txt ${COLCON_WS}/src/multi_ecu_demo/ | ||
| COPY src/ ${COLCON_WS}/src/multi_ecu_demo/src/ | ||
| COPY config/ ${COLCON_WS}/src/multi_ecu_demo/config/ | ||
| COPY launch/ ${COLCON_WS}/src/multi_ecu_demo/launch/ | ||
|
|
||
| # Copy container scripts | ||
| COPY container_scripts/ /var/lib/ros2_medkit/scripts/ | ||
| RUN find /var/lib/ros2_medkit/scripts -name "*.bash" -exec chmod +x {} \; | ||
|
|
||
| # 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 | ||
|
|
||
| # ECU_LAUNCH env var selects which launch file to run | ||
| ENV ECU_LAUNCH=perception.launch.py | ||
| CMD ["bash", "-c", "mkdir -p /var/lib/ros2_medkit/rosbags && source /opt/ros/jazzy/setup.bash && source /root/demo_ws/install/setup.bash && ros2 launch multi_ecu_demo ${ECU_LAUNCH}"] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.