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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro kilted showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro rolling showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro ardent showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro bouncy showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro crystal showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro eloquent showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro dashing showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro galactic showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro foxy showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro iron showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro lunar showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro jade showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro indigo showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro hydro showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro kinetic showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro melodic showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange

No version for distro noetic showing humble. Known supported distros are highlighted in the buttons above.

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

Shared CMake modules for ros2_medkit packages (multi-distro compat, ccache, linting)

Maintainers

  • bburda

Authors

No additional 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_DIR param)
  • medkit_target_dependencies() - Drop-in replacement for ament_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 many clang-tidy processes one package runs. It defaults to min(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 every tidy run 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

Changelog for package ros2_medkit_cmake

0.6.0 (2026-06-22)

  • ROS2MedkitTestDomain: carve dedicated ROS_DOMAIN_ID ranges 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.cmake module centralizes compiler warning flags across all packages, with selective -Werror (namespaced MEDKIT_ENABLE_WERROR, defaults OFF) applied only to flags safe against external headers
  • ROS2MedkitSanitizers.cmake module adds ASan/UBSan and TSan support for sanitizer CI jobs
  • ROS2MedkitTestDomain.cmake centralizes ROS_DOMAIN_ID allocation for per-test DDS isolation
  • Vendored cpp-httplib 0.14.3 as a build-farm fallback (VENDORED_DIR parameter), marked as a SYSTEM include to suppress third-party warnings
  • medkit_find_cpp_httplib caps cpp-httplib at < 0.20 across both the pkg-config and find_package(httplib) tiers, so distros shipping 0.20+ (Ubuntu 26.04 ships 0.26, which dropped the multipart Request::has_file API the gateway uses) fall through to the vendored 0.14.3 header instead of failing the build; ROS2MedkitCompat.cmake extended to cover ROS 2 Lyrical / Ubuntu 26.04 Resolute (rclcpp 32, yaml_cpp_vendor target export, ament_target_dependencies removal 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

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged ros2_medkit_cmake at Robotics Stack Exchange