Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange
Package Summary
| Version | 0.6.0 |
| License | Apache-2.0 |
| Build type | AMENT_CMAKE |
| Use | RECOMMENDED |
Repository Summary
| Checkout URI | https://github.com/selfpatch/ros2_medkit.git |
| VCS Type | git |
| VCS Version | main |
| Last Updated | 2026-08-09 |
| Dev Status | DEVELOPED |
| Released | RELEASED |
| Contributing |
Help Wanted (-)
Good First Issues (-) Pull Requests to Review (-) |
Package Description
Maintainers
- bburda
Authors
ros2_medkit_cmake
Shared CMake modules for the ros2_medkit workspace. Provides multi-distro compatibility, build acceleration, and centralized linting configuration across all packages.
Modules
| Module | Description |
|---|---|
ROS2MedkitCcache.cmake |
Auto-detect and configure ccache with PCH-aware sloppiness settings |
ROS2MedkitCompat.cmake |
Multi-distro compatibility shims for ROS 2 Humble, Jazzy, and Lyrical |
ROS2MedkitCoverage.cmake |
gcov/lcov instrumentation behind -DENABLE_COVERAGE=ON
|
ROS2MedkitLinting.cmake |
Shared lint configs via medkit_lint_config(), plus the opt-in clang-tidy gate (CI runs run-clang-tidy instead) |
ROS2MedkitSanitizers.cmake |
ASan / TSan / UBSan behind -DSANITIZER=asan,ubsan
|
ROS2MedkitTestDomain.cmake |
Per-package ROS_DOMAIN_ID allocation for test isolation |
ROS2MedkitWarnings.cmake |
Shared warning flags and vendored-code relaxations |
ROS2MedkitCompat
Resolves dependency differences across ROS 2 distributions:
-
medkit_find_yaml_cpp()- Finds yaml-cpp (namespaced targets on Jazzy, manual fallback on Humble) -
medkit_find_cpp_httplib()- Finds cpp-httplib >= 0.14 via pkg-config, CMake config, or vendored fallback (VENDORED_DIRparam) -
medkit_target_dependencies()- Drop-in replacement forament_target_dependencies(removed on Lyrical) -
medkit_detect_compat_defs()/medkit_apply_compat_defs()- Compile definitions for version-specific APIs
ROS2MedkitLinting
medkit_lint_config(<file name> <output variable>) resolves one of the three
shared configs - .clang-format, .clang-tidy, .flake8:
include(ROS2MedkitLinting)
medkit_lint_config(.clang-format _config)
ament_clang_format(${_format_files} CONFIG_FILE "${_config}")
The configs are files of this package, in cmake/ next to the modules and
installed next to them, so the same lookup works from a source tree, a plain
install and a --symlink-install. The repository root paths that editors,
pre-commit and scripts/clang-tidy-diff.sh use are symlinks to them, so there
is a single copy of each.
Address them any other way and it breaks quietly. ${CMAKE_CURRENT_SOURCE_DIR}/../..
reaches the repository root, which exists in a workspace checkout and nowhere
else: a binary package is built from an export of one package directory, so the
linter gets a path that is not there. Nobody sees it, because bloom’s
debian/rules runs the test step as dh_auto_test || true. A missing config
therefore aborts the configure step - a linter that runs unconfigured, or does
not run, is the worse outcome.
Registers the package’s clang_tidy CTest test behind -DENABLE_CLANG_TIDY=ON,
off by default. This is a local gate: CI does not use it. The clang-tidy job
in .github/workflows/quality.yml configures with -DENABLE_CLANG_TIDY=OFF and
runs run-clang-tidy over the compilation database instead.
A participating package registers exactly one such test - packages that exclude
ament_cmake_clang_tidy and never call ros2_medkit_clang_tidy() register none.
colcon runs a separate ctest per package, so --ctest-args -j has nothing to
parallelise: CTest only ever sees one matching test. The analysis is therefore
parallelised inside the test:
-
-DROS2_MEDKIT_CLANG_TIDY_JOBS=<n>at configure time sets how manyclang-tidyprocesses one package runs. It defaults tomin(host cores, 2), falling back to 1 where CMake cannot determine the core count. -
ros2_medkit_clang_tidy(JOBS <n>)overrides it for a single package. -
./scripts/test.sh tidy --jobs <n>is the everyday switch. The count is baked into the CTest command at configure time, so the script reconfigures the clang-tidy packages first - a couple of seconds, no recompilation. The value then sticks in the CMake cache, so everytidyrun prints the count in effect.
How many packages analyse at once is colcon’s --parallel-workers, not
CTest’s -j. Because the parallelism now lives inside each test, the package
tests must run one at a time: ./scripts/test.sh tidy pins
--parallel-workers 1 and ignores a caller’s override, because running both
levels at once multiplies peak memory by the number of packages.
The footprint is large enough that the default is capped rather than set to the
core count. Measured on ros2_medkit_gateway, a 16-core host:
JOBS |
wall clock | peak resident |
|---|---|---|
| 2 (default) | 17min58s | 2.6 GiB |
| 4 | 9min55s | 4.7 GiB |
| 8 | 6min00s | 9.4 GiB |
| 16 | 4min32s | 17.4 GiB |
Memory scales linearly at roughly 1.2 GiB per job - a single clang-tidy
process holds 1.4 GiB at its peak - while wall clock does not. The default is
sized so that one package fits an 8 GB machine, which puts it at 2. That is
deliberately the slow end of the curve: the alternative is a default that only
works on the largest machine anyone here has.
If you have the memory, take it - ./scripts/test.sh tidy --jobs 8 roughly
triples the speed for 9.4 GiB.
Over-subscribing is guarded, but only through the script. ament_clang_tidy
derives its exit status from the warnings it managed to parse, so a clang-tidy
process killed by the OOM reaper contributes nothing and the test passes as if
File truncated at 100 lines see the full file
Changelog for package ros2_medkit_cmake
0.6.0 (2026-06-22)
-
ROS2MedkitTestDomain: carve dedicatedROS_DOMAIN_IDranges for the new log bridge (210-214) and action-status bridge (215-219) test suites out of the integration-tests range (#422) - Contributors: \@mfaferek93
0.5.0 (2026-06-08)
-
ROS2MedkitWarnings.cmakemodule centralizes compiler warning flags across all packages, with selective-Werror(namespacedMEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers -
ROS2MedkitSanitizers.cmakemodule adds ASan/UBSan and TSan support for sanitizer CI jobs -
ROS2MedkitTestDomain.cmakecentralizesROS_DOMAIN_IDallocation for per-test DDS isolation - Vendored cpp-httplib 0.14.3 as a build-farm fallback (
VENDORED_DIRparameter), marked as a SYSTEM include to suppress third-party warnings -
medkit_find_cpp_httplibcaps cpp-httplib at< 0.20across both the pkg-config andfind_package(httplib)tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipartRequest::has_fileAPI the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build;ROS2MedkitCompat.cmakeextended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32,yaml_cpp_vendortarget export,ament_target_dependenciesremoval in ament_cmake 2.8.5+), which replaces Rolling in CI (#405) - Contributors: \@bburda, \@mfaferek93
0.4.0 (2026-03-20)
- Initial release - shared cmake modules extracted from gateway package (#294)
-
ROS2MedkitCcache.cmake- auto-detect ccache for faster incremental rebuilds -
ROS2MedkitLinting.cmake- centralized clang-tidy configuration (opt-in locally, mandatory in CI) -
ROS2MedkitCompat.cmake- multi-distro compatibility shims for ROS 2 Humble/Jazzy/Rolling - Contributors: \@bburda
Package Dependencies
| Deps | Name |
|---|---|
| ament_cmake | |
| ament_cmake_test | |
| domain_coordinator | |
| ament_cmake_flake8 | |
| ament_cmake_pytest | |
| rclpy | |
| std_msgs |
System Dependencies
| Name |
|---|
| python3-pytest |