Repository navigation
resolute: GCC 15 / C++20 / rviz API build fixes, and octomap -Werror=cpp suppression - #3760
Conversation
7c2528f to
ada701e
Compare
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
27ffd6c to
2d01c1e
Compare
|
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. |
991570c to
96fc4ce
Compare
ffdb492 to
436c7e6
Compare
|
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 Will handle in followup PR, this will use a workaround |
436c7e6 to
5752cee
Compare
…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.
…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.
|
This pull request is in conflict. Could you fix it @nbbrooks? |
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]>
5752cee to
2133390
Compare
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:resolutecontainer.PlanningContextBase<GeneratorT>(...)→PlanningContextBase(...)[=]with explicit captures in rviz lambdasthiscapture via[=]is deprecated in C++20.Display::updatefor rviz_common 16.0.1+(float, float)→(std::chrono::nanoseconds, std::chrono::nanoseconds). The old override stops being a concreteDisplay.test_utilstest_utilson Resoluterolling-resolutejob.SUPPRESS_CPP_ERROR: trueon therolling-resolutematrix entryWhy
SUPPRESS_CPP_ERRORis still neededSystem
liboctomap-devon Resolute still includes<ciso646>atOcTreeKey.h:40. That header was removed in C++20, GCC 15 warns on it, and-Werror=cppmakes it fatal — somoveit_corefails 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-3onubuntu:resolute, which still ships the unfixed header:Scoped to the
rolling-resoluteentry only — jammy and noble jobs keep-Werror=cpp. Remove once Ubuntu picks up the fix.What was dropped in the rescope
moveit2_rolling.repos—mainnow has its own, and it's better: it points atmoveit/osqp_vendor@58a52e8(OSQP v1.0.0) rather than this PR'stier4/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 declarescmake_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 atinstall_target_dependencies—ros-rolling-warehouse-rosis 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
🤖 Generated with Claude Code