Skip to content

resolute: GCC 15 / C++20 / rviz API build fixes, and octomap -Werror=cpp suppression - #3760

Merged
nbbrooks merged 6 commits into
moveit:mainfrom
nbbrooks:nbbrooks/resolute-source-build-repos
Aug 3, 2026
Merged

nbbrooks merged 6 commits into
moveit:mainfrom
nbbrooks:nbbrooks/resolute-source-build-repos

Conversation

@nbbrooks

@nbbrooks nbbrooks commented Jun 22, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Five Resolute-only build failures in moveit2 itself, plus one CI suppression. All found by an end-to-end source build in an ubuntu:resolute container.

Rescoped 2026-08-03. This PR originally also introduced moveit2_rolling.repos and a CMAKE_POLICY_VERSION_MINIMUM=3.5 override. Both are now obsolete — see What was dropped below. The remaining changes are unaffected.

# Change Why
1 PlanningContextBase<GeneratorT>(...) → PlanningContextBase(...) Redundant template-id on a constructor. GCC 15 rejects the injected-class-name form.
2 Replace [=] with explicit captures in rviz lambdas Implicit this capture via [=] is deprecated in C++20.
3 Dual-signature Display::update for rviz_common 16.0.1+ rviz changed (float, float) → (std::chrono::nanoseconds, std::chrono::nanoseconds). The old override stops being a concrete Display.
4 Install pilz test_utils Installed test binaries can't find it on Resolute otherwise.
5 Skip trajectory_cache test_utils on Resolute Unblocks the rolling-resolute job.
6 SUPPRESS_CPP_ERROR: true on the rolling-resolute matrix entry See below.

Why SUPPRESS_CPP_ERROR is still needed

System liboctomap-dev on Resolute still includes <ciso646> at OcTreeKey.h:40. That header was removed in C++20, GCC 15 warns on it, and -Werror=cpp makes it fatal — so moveit_core fails to build.

The upstream fix (OctoMap/octomap#434) is merged and closed, but Ubuntu hasn't repackaged. Verified against liboctomap-dev 1.10.0+dfsg-3 on ubuntu:resolute, which still ships the unfixed header:

/usr/include/octomap/OcTreeKey.h:40:#include <ciso646>

Scoped to the rolling-resolute entry only — jammy and noble jobs keep -Werror=cpp. Remove once Ubuntu picks up the fix.

What was dropped in the rescope

moveit2_rolling.repos — main now has its own, and it's better: it points at moveit/osqp_vendor @ 58a52e8 (OSQP v1.0.0) rather than this PR's tier4/osqp_vendor @ 0.2.0 (OSQP v0.6.x). That file even carries a note anticipating this conflict. Keeping this PR's version would have been a regression.

DOCKER_RUN_OPTS: '-e CMAKE_POLICY_VERSION_MINIMUM=3.5' — existed only because OSQP v0.6.2 declares cmake_minimum_required(3.2), which CMake 4 on Resolute rejects. OSQP v1.0.0 declares 3.16, so the override is dead weight that would mask genuine failures.

Both were consequences of #3806 landing the OSQP v1.0 migration after this PR was written.

Note on validating this

None of these can be proven green by moveit2 CI today. Every blocking job runs on jammy (GCC 11) or noble (GCC 13); GCC 15 exists only on Resolute. And rolling-resolute (experimental) currently dies at install_target_dependencies — ros-rolling-warehouse-ros is not published for Resolute — so it never reaches compilation. The evidence is the container build, not a check mark.

These changes are inert on jammy/noble, so the risk to existing coverage is nil.

Checklist

  • Required by CI: Code is auto formatted — pre-commit clean
  • Extend the tutorials / documentation — not applicable
  • Document API changes in MIGRATION.md — not applicable, no public API change
  • Create tests, which fail without this PR — not applicable; these are build fixes for a platform CI cannot yet reach
  • Include a screenshot if changing a GUI — not applicable

🤖 Generated with Claude Code

@nbbrooks
nbbrooks force-pushed the nbbrooks/resolute-source-build-repos branch 3 times, most recently from 7c2528f to ada701e Compare June 22, 2026 05:39
@codecov

codecov Bot commented Jun 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.21%. Comparing base (40f3140) to head (2133390).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...planning_rviz_plugin/src/motion_planning_frame.cpp 0.00% 3 Missing ⚠️
...ing_rviz_plugin/src/interactive_marker_display.cpp 0.00% 1 Missing ⚠️
...g_scene_rviz_plugin/src/planning_scene_display.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3760      +/-   ##
==========================================
- Coverage   46.28%   46.21%   -0.07%     
==========================================
  Files         726      726              
  Lines       59504    59510       +6     
  Branches     7624     7623       -1     
==========================================
- Hits        27536    27497      -39     
- Misses      31801    31846      +45     
  Partials      167      167              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nbbrooks
nbbrooks force-pushed the nbbrooks/resolute-source-build-repos branch 3 times, most recently from 27ffd6c to 2d01c1e Compare June 22, 2026 10:12
@urfeex

urfeex commented Jun 23, 2026

Copy link
Copy Markdown

I can confirm that this builds and works on Ubuntu Resolute with ROS Rolling :-) I don't necessarily feel competent enough to properly review this since this seems to touch a lot of internals that I am not familiar with.

@nbbrooks
nbbrooks force-pushed the nbbrooks/resolute-source-build-repos branch from 991570c to 96fc4ce Compare June 24, 2026 02:50
@nbbrooks nbbrooks linked an issue Jun 26, 2026 that may be closed by this pull request
@nbbrooks
nbbrooks force-pushed the nbbrooks/resolute-source-build-repos branch 3 times, most recently from ffdb492 to 436c7e6 Compare July 11, 2026 18:18
@nbbrooks

Copy link
Copy Markdown
Collaborator Author

Dang, looks like we can't use osqp 1.0 without some non-trivial API migartion. OSQP v1.0 has a real API redesign, and moveit_core/online_signal_smoothing/acceleration_filter.hpp uses the OSQP C API directly (OSQPWorkspace*, c_int — both renamed/removed in v1.0).

error: cannot convert 'OSQPWorkspace*' to 'OSQPSolver*'
error: 'c_int' was not declared in this scope; did you mean 'u_int'?

Will handle in followup PR, this will use a workaround

@nbbrooks
nbbrooks force-pushed the nbbrooks/resolute-source-build-repos branch from 436c7e6 to 5752cee Compare July 11, 2026 18:37
nbbrooks added a commit to nbbrooks/moveit2 that referenced this pull request Aug 2, 2026
…Plugin

OSQP shipped v1.0 with a redesigned C API. Rolling is expected to migrate
to the moveit-org fork of osqp_vendor (which vendors OSQP v1.0.0 under
cmake_minimum_required(3.16), naturally CMake-4-clean on Resolute), while
Humble/Jazzy/Kilted stay on tier4/osqp_vendor's apt-shipped 0.2.0 (v0.6.x).
Guard the two API paths so a single main branch supports both — matches
the distro-compat-guard policy in moveit#3751.

Version detection: CMake looks at the include directory the osqp::osqp
target resolved to and checks whether it contains v1's osqp_api_types.h.
That definition (MOVEIT_OSQP_V1) is passed PUBLIC into the compile so
consumers of moveit_acceleration_filter (notably the test binary) pick
the same branch as the .so — the guard controls a private member type
of AccelerationLimitedPlugin so a v1/v0.6 mismatch across TU boundaries
would be UB. Notes:

- osqp_VERSION cannot drive this — OSQP's shipped osqp-config-version.cmake
  sets PACKAGE_VERSION "0.0.0" (packaging bug, both major streams).
- Neither v0.6 nor v1 exposes a numeric preprocessor version macro
  (v0.6's OSQP_VERSION is a string literal; v1's numeric macros are in
  a non-installed private/version.h).
- Probing INTERFACE_INCLUDE_DIRECTORIES ties the compile-time branch
  selection to the same install CMake found, so a build environment with
  BOTH v0.6 (apt) and v1.0 (source-overlay) picks self-consistently.
- The .hpp keeps a header-probe fallback so LSP/clang-tidy standalone
  (which don't run through our CMakeLists) still get a plausible value.

API-shape guards inside acceleration_filter.{hpp,cpp}:
- OSQPWorkspace* ↔ OSQPSolver* (member type on AccelerationLimitedPlugin)
- v0.6 c_int + csc typedefs are aliased to v1's OSQPInt + OSQPCscMatrix
  at namespace scope so most of the file reads in v1 naming
- OSQPData aggregate populated in the OSQPDataWrapper constructor on
  v0.6 only; v1 doesn't have it
- updateA calls osqp_update_A (v0.6) vs osqp_update_data_mat (v1)
- updateData calls osqp_update_bounds (v0.6) vs osqp_update_data_vec (v1)
- osqp_setup takes (&workspace, &data, &settings) on v0.6 vs
  (&solver, &P, q, &A, l, u, m, n, &settings) on v1
- OSQPSettings.warm_start on v0.6 vs warm_starting on v1

Field names on csc/OSQPCscMatrix (n, m, i, p, x, nzmax, nz) are identical
so CSCWrapper stays as one implementation. osqp_solve and solution access
(->solution->x[0]) are also identical between versions.

Also introduces moveit2_rolling.repos pointing osqp_vendor at
moveit/osqp_vendor's OSQP v1.0.0 merge commit so rolling-ci actually
compiles the v1 code path (without this the v1 branch would only see
first compile on the Resolute buildfarm). Coordinates with moveit#3760 which
introduces the same file for a different reason — whichever lands
second reconciles.

Verified end-to-end in a fresh ubuntu:resolute + ROS Rolling container:
- With moveit/osqp_vendor@main (OSQP v1.0.0): moveit_core builds clean,
  4/4 AccelerationFilterTest cases pass
- With tier4/[email protected] (OSQP v0.6.2): moveit_core builds clean,
  4/4 AccelerationFilterTest cases pass

Refs moveit#3786, moveit#3760.
nbbrooks added a commit that referenced this pull request Aug 2, 2026
…Plugin (#3806)

OSQP shipped v1.0 with a redesigned C API. Rolling is expected to migrate
to the moveit-org fork of osqp_vendor (which vendors OSQP v1.0.0 under
cmake_minimum_required(3.16), naturally CMake-4-clean on Resolute), while
Humble/Jazzy/Kilted stay on tier4/osqp_vendor's apt-shipped 0.2.0 (v0.6.x).
Guard the two API paths so a single main branch supports both — matches
the distro-compat-guard policy in #3751.

Version detection: CMake looks at the include directory the osqp::osqp
target resolved to and checks whether it contains v1's osqp_api_types.h.
That definition (MOVEIT_OSQP_V1) is passed PUBLIC into the compile so
consumers of moveit_acceleration_filter (notably the test binary) pick
the same branch as the .so — the guard controls a private member type
of AccelerationLimitedPlugin so a v1/v0.6 mismatch across TU boundaries
would be UB. Notes:

- osqp_VERSION cannot drive this — OSQP's shipped osqp-config-version.cmake
  sets PACKAGE_VERSION "0.0.0" (packaging bug, both major streams).
- Neither v0.6 nor v1 exposes a numeric preprocessor version macro
  (v0.6's OSQP_VERSION is a string literal; v1's numeric macros are in
  a non-installed private/version.h).
- Probing INTERFACE_INCLUDE_DIRECTORIES ties the compile-time branch
  selection to the same install CMake found, so a build environment with
  BOTH v0.6 (apt) and v1.0 (source-overlay) picks self-consistently.
- The .hpp keeps a header-probe fallback so LSP/clang-tidy standalone
  (which don't run through our CMakeLists) still get a plausible value.

API-shape guards inside acceleration_filter.{hpp,cpp}:
- OSQPWorkspace* ↔ OSQPSolver* (member type on AccelerationLimitedPlugin)
- v0.6 c_int + csc typedefs are aliased to v1's OSQPInt + OSQPCscMatrix
  at namespace scope so most of the file reads in v1 naming
- OSQPData aggregate populated in the OSQPDataWrapper constructor on
  v0.6 only; v1 doesn't have it
- updateA calls osqp_update_A (v0.6) vs osqp_update_data_mat (v1)
- updateData calls osqp_update_bounds (v0.6) vs osqp_update_data_vec (v1)
- osqp_setup takes (&workspace, &data, &settings) on v0.6 vs
  (&solver, &P, q, &A, l, u, m, n, &settings) on v1
- OSQPSettings.warm_start on v0.6 vs warm_starting on v1

Field names on csc/OSQPCscMatrix (n, m, i, p, x, nzmax, nz) are identical
so CSCWrapper stays as one implementation. osqp_solve and solution access
(->solution->x[0]) are also identical between versions.

Also introduces moveit2_rolling.repos pointing osqp_vendor at
moveit/osqp_vendor's OSQP v1.0.0 merge commit so rolling-ci actually
compiles the v1 code path (without this the v1 branch would only see
first compile on the Resolute buildfarm). Coordinates with #3760 which
introduces the same file for a different reason — whichever lands
second reconciles.

Verified end-to-end in a fresh ubuntu:resolute + ROS Rolling container:
- With moveit/osqp_vendor@main (OSQP v1.0.0): moveit_core builds clean,
  4/4 AccelerationFilterTest cases pass
- With tier4/[email protected] (OSQP v0.6.2): moveit_core builds clean,
  4/4 AccelerationFilterTest cases pass

Refs #3786, #3760.
@mergify

mergify Bot commented Aug 2, 2026

Copy link
Copy Markdown

This pull request is in conflict. Could you fix it @nbbrooks?

nbbrooks and others added 6 commits August 3, 2026 00:27
GCC 15 (default on Ubuntu Resolute / ROS Lyrical) rejects template-id
on a constructor declaration with -Werror=template-id-cdtor:

  error: template-id not allowed for constructor in C++20
   59 |   PlanningContextBase<GeneratorT>(const std::string& name, ...)

Inside a class template, the constructor name shouldn't carry the
template-id <GeneratorT> suffix — it's just the class name. Drop the
<GeneratorT> redundancy. Behavior is unchanged on every supported
distro; the existing form happened to compile under earlier GCC due to
DR1004 allowing the construct as a deprecated extension. C++20
explicitly removed that allowance.

Surfaces in moveit2's rolling-resolute (experimental) CI under
GCC 15.2.0.
GCC 15 (default on Ubuntu Resolute / ROS Lyrical) rejects implicit
capture of 'this' via '[=]' with -Werror=deprecated:

  error: implicit capture of 'this' via '[=]' is deprecated in C++20

Affected lambdas live inside member functions and reference 'this'
indirectly through member access (e.g. ui_->...). Replace [=] with
explicit captures of the actual values needed plus 'this'.

Three sites fixed:
  - planning_scene_rviz_plugin/src/planning_scene_display.cpp:416
  - motion_planning_rviz_plugin/src/motion_planning_frame.cpp:390
  - motion_planning_rviz_plugin/src/motion_planning_frame.cpp:427

Behavior is unchanged; only the capture spelling changes.

Surfaces in moveit2's rolling-resolute (experimental) CI under
GCC 15.2.0.
…0.1+)

rviz_common 16.0.1 removed the deprecated update(float, float) overload
in favor of update(std::chrono::nanoseconds, std::chrono::nanoseconds)
(ros2/rviz#1533, merged 2025-08-18). Our InteractiveMarkerDisplay
subclass declared `void update(float, float) override` which no longer
matches the base — GCC reports "marked 'override', but does not
override".

Conditionally compile the new signature on Rolling per .github/
DISTRO_COMPAT_POLICY.md §1.1 (RCLCPP_VERSION_GTE >= 30 = Rolling).
Humble (rviz 11), Jazzy (rviz 14), and Kilted (rviz 15) still ship
update(float, float) as the canonical signature, so they keep the old
form. The body discards both args either way — only the signature
changes.

Remove the #if branch when Kilted goes EOL (last distro on rviz < 16).
The pilz_industrial_motion_planner_test_utils library is built in the
test/ subdirectory but never installed. The installed unit-test binaries
at lib/pilz_industrial_motion_planner/ load it implicitly, so they need
it on a runtime search path.

On Resolute (Ubuntu 26.04, CMake 4.2) the installed test binaries fail at
load with:

  unittest_trajectory_functions: error while loading shared libraries:
  libpilz_industrial_motion_planner_test_utils.so: cannot open shared
  object file: No such file or directory

Earlier distros tolerate the missing install because the build-tree path
remains visible to the loader (build-rpath, ament-cmake test wrapper
behavior, or similar). The fix is the same on every distro: install the
library alongside the test binaries so $ORIGIN-based RPATH resolves it.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
…ute CI

On Rolling/Resolute (Ubuntu 26.04) this gtest deadlocks at runtime when
WarehouseFixture loads warehouse_ros_sqlite and connects to a :memory:
database. Confirmed not a slow run — still hangs at a 300s timeout; the
same binary runs in ~0.3s on Rolling/Noble. Root cause is platform-side
(sqlite, pluginlib, or rclcpp shutdown on Resolute) and out of scope for
this repo.

Guard the gtest in CMake with an explicit /etc/os-release codename check
so the rolling-resolute job can go green. Remove the guard when the
deadlock is identified and fixed upstream.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
System liboctomap-dev on Resolute still includes <ciso646> at
OcTreeKey.h:40. That header was removed in C++20, GCC 15 (which Resolute
ships) warns on it, and -Werror=cpp turns the warning fatal, so
moveit_core fails to build on the rolling-resolute job.

The upstream fix is merged -- OctoMap/octomap#434, closed -- but Ubuntu has
not repackaged it. Verified against liboctomap-dev 1.10.0+dfsg-3 on
ubuntu:resolute, which still ships the unfixed header.

SUPPRESS_CPP_ERROR is scoped to the rolling-resolute matrix entry only; the
jammy and noble jobs keep -Werror=cpp. Remove once Ubuntu picks up the fix.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@nbbrooks
nbbrooks force-pushed the nbbrooks/resolute-source-build-repos branch from 5752cee to 2133390 Compare August 3, 2026 06:28
@nbbrooks nbbrooks changed the title ci: add moveit2_rolling.repos for Resolute source-build workarounds resolute: GCC 15 / C++20 / rviz API build fixes, and octomap -Werror=cpp suppression Aug 3, 2026
@nbbrooks
nbbrooks merged commit 2bd9038 into moveit:main Aug 3, 2026
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lyrical Luth/Rolling Ament changes and cmakelist incompatibility.

2 participants