Skip to content

Commit 7dcbcd3

Browse files
committed
feat(cpp_trees): default MANYMOVE_WITH_MEDKIT to OFF
Switch the toggle default so a fresh clone of manymove builds with no extra deps. Users who want the medkit integration opt in via the env var (rosdep) plus the CMake arg, mirroring how the Isaac ROS pieces are handled. README and FAULT_CODES.md document the opt-in flow.
1 parent 26b721e commit 7dcbcd3

4 files changed

Lines changed: 31 additions & 12 deletions

File tree

docs/FAULT_CODES.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# manymove fault codes
22

33
This is the catalogue of fault codes emitted by `manymove_cpp_trees` BT action
4-
nodes via [`ros2_medkit_fault_reporter`](https://github.com/selfpatch/ros2_medkit).
4+
nodes via [`ros2_medkit_fault_reporter`](https://github.com/selfpatch/ros2_medkit)
5+
when built with `MANYMOVE_WITH_MEDKIT=ON` (see the package README for the
6+
build instructions). With the option OFF the same `reportFault()` call sites
7+
compile to no-ops and nothing is published.
58
Each entry below maps to one or more `reportFault()` call sites in the action
69
node sources; the source-of-truth string constants live in
710
`manymove_cpp_trees/include/manymove_cpp_trees/fault_codes.hpp`.

manymove_cpp_trees/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ endif()
1414
#--------------------------------------------------------------------
1515
# Build options
1616
#--------------------------------------------------------------------
17-
# ros2_medkit fault reporting is on by default. Turn it off to build
18-
# without the medkit overlay (action nodes still compile, every
19-
# reportFault()/reportFaultPassed() call becomes a no-op).
17+
# ros2_medkit fault reporting is off by default to keep the upstream
18+
# build free of extra deps. Turn it on (-DMANYMOVE_WITH_MEDKIT=ON plus
19+
# MANYMOVE_WITH_MEDKIT=1 in the env for rosdep) to pull in the medkit
20+
# overlay; with it off, the FaultReporting mixin and installFaultReporter()
21+
# compile to no-ops so action nodes build unchanged.
2022
option(MANYMOVE_WITH_MEDKIT
2123
"Build with ros2_medkit fault reporting integration"
22-
ON)
24+
OFF)
2325

2426
#--------------------------------------------------------------------
2527
# Dependencies

manymove_cpp_trees/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,21 @@ Each executable spins the BT factory, registers the custom nodes, and runs the `
4242
- Control and runtime messaging: `rclcpp`, `rclcpp_action`, `control_msgs`, `std_msgs`, `std_srvs`, `topic_based_ros2_control`
4343
- Simulation and perception bridges: `simulation_interfaces`, `vision_msgs`
4444

45+
## Optional: ros2_medkit fault reporting
46+
The package can emit structured fault events via
47+
[`ros2_medkit`](https://github.com/selfpatch/ros2_medkit) when built with
48+
`MANYMOVE_WITH_MEDKIT=ON`. With the option OFF (default) the action nodes
49+
build with no extra dependencies and every `reportFault()` call compiles
50+
to a no-op. To enable:
51+
52+
```bash
53+
export MANYMOVE_WITH_MEDKIT=1 # for rosdep
54+
rosdep install --from-paths src --ignore-src -y
55+
colcon build --cmake-args -DMANYMOVE_WITH_MEDKIT=ON # for the build
56+
```
57+
58+
See [`docs/FAULT_CODES.md`](../docs/FAULT_CODES.md) for the catalogue.
59+
4560
## Notes
4661
- Robot safety mechanisms (stop buttons, workspace supervision) must be handled externally.
4762
- Review the main README for project-wide disclaimers, contribution guidance, and licensing details.

manymove_cpp_trees/package.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,12 @@
2727
<depend>simulation_interfaces</depend>
2828
<depend>vision_msgs</depend>
2929
<depend>rcpputils</depend>
30-
<!-- ros2_medkit deps follow the MANYMOVE_WITH_MEDKIT CMake option. The
31-
rosdep condition keys off the env var of the same name: unset or any
32-
non-zero value -> install (default), MANYMOVE_WITH_MEDKIT=0 -> skip.
33-
This keeps the binary distro install (rosdep + apt) aligned with the
34-
compile-time switch in CMakeLists.txt. -->
35-
<depend condition="$MANYMOVE_WITH_MEDKIT != 0">ros2_medkit_fault_reporter</depend>
36-
<depend condition="$MANYMOVE_WITH_MEDKIT != 0">ros2_medkit_msgs</depend>
30+
<!-- ros2_medkit deps follow the MANYMOVE_WITH_MEDKIT CMake option (default
31+
OFF). The rosdep condition keys off the env var of the same name:
32+
MANYMOVE_WITH_MEDKIT=1 -> install, unset or any other value -> skip.
33+
Keep this aligned with the CMake option in CMakeLists.txt. -->
34+
<depend condition="$MANYMOVE_WITH_MEDKIT == 1">ros2_medkit_fault_reporter</depend>
35+
<depend condition="$MANYMOVE_WITH_MEDKIT == 1">ros2_medkit_msgs</depend>
3736

3837
<test_depend>ament_lint_auto</test_depend>
3938
<test_depend>ament_lint_common</test_depend>

0 commit comments

Comments
 (0)