Repository navigation
Add cancel timeout when cancelling actions (backport Jazzy) - #5903
Merged
Merged
Conversation
Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
Contributor
|
@mini-1235, all pull requests must be targeted towards the |
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 25 files with indirect coverage changes 🚀 New features to boost your workflow:
|
SteveMacenski
requested changes
Jan 27, 2026
Signed-off-by: mini-1235 <[email protected]>
SteveMacenski
approved these changes
Jan 28, 2026
redvinaa
pushed a commit
to EnjoyRobotics/navigation2
that referenced
this pull request
Mar 2, 2026
…gation#5903) * Add cancel timeout when cancelling actions (backport Jazzy) Signed-off-by: mini-1235 <[email protected]> * Declare parameter Signed-off-by: mini-1235 <[email protected]> * Update cancel timeout Signed-off-by: mini-1235 <[email protected]> --------- Signed-off-by: mini-1235 <[email protected]>
RBT22
pushed a commit
to EnjoyRobotics/navigation2
that referenced
this pull request
May 28, 2026
* Backport RouteTool RViz plugin to Jazzy (ros-navigation#5663) (ros-navigation#5727) * Backport RouteTool RViz plugin to Jazzy (ros-navigation#5663) Adds the RouteTool panel to nav2_rviz_plugins for creating and editing route graphs in RViz2. Changes: - Add route_tool.hpp/cpp with Jazzy-compatible namespaces - Add nav2_route dependency to nav2_rviz_plugins - Fix nav2_route include export paths - Add UI resources and launch files for RouteTool Jazzy compatibility fixes: - Use nav2_util::LifecycleNode instead of nav2::LifecycleNode - Use rclcpp::Subscription instead of nav2::Subscription Tested: Builds successfully, plugin loads in RViz2 Signed-off-by: Prathmesh Atkale <[email protected]> * fix Linting: added newline at end of file Signed-off-by: Prathmesh Atkale <[email protected]> * Fix linting: remove blank line at end of Python file Signed-off-by: Prathmesh Atkale <[email protected]> * Fix uncrustify formatting for route_tool files Signed-off-by: Prathmesh Atkale <[email protected]> * Updated nav2_route/CMakeLists.txt to original Jazzy Signed-off-by: Prathmesh Atkale <[email protected]> * Fix RouteTool backport to jazzy - Changed nav2::LifecycleNode to nav2_util::LifecycleNode (correct namespace for jazzy) - Fixed plugins_description.xml: changed base_class_type from rviz_common::Tool to rviz_common::Panel Tested in RViz - plugin loads correctly and creates route graph nodes/edges. Signed-off-by: Prathmesh Atkale <[email protected]> --------- Signed-off-by: Prathmesh Atkale <[email protected]> * Backport GetCurrentPose, ArePosesNear, and ConcatenatePaths BT nodes for Route Server in Jazzy, and minimal BT for navigation. (ros-navigation#5755) * Backported GetCurrentPose, ConcatenatePaths and ArePosesNear BT nodes to Jazzy Signed-off-by: Pau Reverté <[email protected]> * Created minimum BT for navigation using RouteServer, without replanning Signed-off-by: Pau Reverté <[email protected]> * GetCurrentPose and ArePosesNear use deconflictPortAndParamFile for frames Signed-off-by: Pau Reverté <[email protected]> * Apply cpplint and uncrustify formatting corrections for new BT nodes Signed-off-by: Pau Reverté <[email protected]> * Original copyright Signed-off-by: Pau Reverté <[email protected]> * Added test for GetCurrentPose, ConcatenatePaths and ArePosesNear Signed-off-by: Pau Reverté <[email protected]> * Correct copyright for GetCurrentPose Signed-off-by: Pau Reverté <[email protected]> * GetCurrentPose heritages from BT::ActionNodeBase Signed-off-by: Pau Reverté <[email protected]> * ArePosesNear uses isStatusActive Signed-off-by: Pau Reverté <[email protected]> * Added route_server to server_handler for BT test in building Signed-off-by: Pau Reverté <[email protected]> * GetCurrentPose, ArePosesNear and ConcatenatePaths closer to main branch structure Signed-off-by: Pau Reverté <[email protected]> * Removed new BT with routes and nav2_system_tests additions for testing this tree, back to original Signed-off-by: Pau Reverté <[email protected]> * Removed override of halt function for get_current_pose_action.cpp Signed-off-by: Pau Reverté <[email protected]> * Removed default values for input ports of GetCurrentPose Signed-off-by: Pau Reverté <[email protected]> --------- Signed-off-by: Pau Reverté <[email protected]> * Groot monitoring support back ported to jazzy (ros-navigation#5762) * Groot monitoring support back ported to jazzy Signed-off-by: Mike Slembrouck <[email protected]> * add test_json_utils to CMakeLists.txt Signed-off-by: mikeslembrouckZYGO <[email protected]> Signed-off-by: Mike Slembrouck <[email protected]> * Remove WaypointStatus tests from JsonTest Removed tests related to WaypointStatus from JsonTest class. Signed-off-by: mikeslembrouckZYGO <[email protected]> Signed-off-by: Mike Slembrouck <[email protected]> * Add JSON parsing support for key conversion in bt_utils Signed-off-by: Mike Slembrouck <[email protected]> * Add Groot monitoring support in system tests and parameters Signed-off-by: Mike Slembrouck <[email protected]> * Fix uncrustify and flake8 errors Signed-off-by: Mike Slembrouck <[email protected]> * Fix extra blank line in nav_to_pose_tester_node.py Signed-off-by: Mike Slembrouck <[email protected]> * Remove unused Groot-related code and parameters Signed-off-by: Mike Slembrouck <[email protected]> * Add JSON type registration for ports in behavior tree plugins Signed-off-by: Mike Slembrouck <[email protected]> * Update JSON type registration to use `std::vector<geometry_msgs::msg::PoseStamped>` instead of `nav_msgs::msg::Goals` Signed-off-by: Mike Slembrouck <[email protected]> * Include `json_export` header in behavior tree plugins to enable JSON export functionality Signed-off-by: Mike Slembrouck <[email protected]> * Revert header include order Signed-off-by: Mike Slembrouck <[email protected]> * Remove unnecessary blank line in header file Signed-off-by: mikeslembrouckZYGO <[email protected]> * Remove extra blank lines Signed-off-by: Mike Slembrouck <[email protected]> --------- Signed-off-by: Mike Slembrouck <[email protected]> Signed-off-by: mikeslembrouckZYGO <[email protected]> * Backport jazzy: Update obstacle layer usage of max range (ros-navigation#5775) * Update obstacle layer usage of max ranges (ros-navigation#5697) * Use cell distance for obstacle marking max range Signed-off-by: Simon Dathan <[email protected]> * Don't raytrace clear the cell containing the current observation Signed-off-by: Simon Dathan <[email protected]> * Add tests for max marking and clearing ranges Signed-off-by: Simon Dathan <[email protected]> * Fix cpplint failures Signed-off-by: Simon Dathan <[email protected]> * Fix distance calculation Signed-off-by: Simon Dathan <[email protected]> * fix casting, formatting Signed-off-by: Simon Dathan <[email protected]> * check origin is in map, update CMakeLists Signed-off-by: Simon Dathan <[email protected]> * use hypot instead of squared dist Signed-off-by: Simon Dathan <[email protected]> * Move origin calc out of loop Signed-off-by: Simon Dathan <[email protected]> * Revert don't raytrace observation cell Signed-off-by: Simon Dathan <[email protected]> * Revert don't raytrace origin if it is observation cell Signed-off-by: Simon Dathan <[email protected]> * Remove new line Signed-off-by: Simon Dathan <[email protected]> --------- Signed-off-by: Simon Dathan <[email protected]> * Fix tests for jazzy Signed-off-by: Simon Dathan <[email protected]> --------- Signed-off-by: Simon Dathan <[email protected]> * fix typo in route tool plugin name (ros-navigation#5809) Signed-off-by: EricoMeger <[email protected]> * fix Z base frame transformation (ros-navigation#5794) (ros-navigation#5815) (cherry picked from commit 4534ff1) Signed-off-by: Guillaume Doisy <[email protected]> Co-authored-by: Guillaume Doisy <[email protected]> Co-authored-by: Guillaume Doisy <[email protected]> * Fix initialize in drive on heading action node (ros-navigation#5842) Signed-off-by: Maurice <[email protected]> Co-authored-by: Johannes Plapp <[email protected]> * Add symmetric goal for goal checker and mppi goal angle critic (ros-navigation#5833) (ros-navigation#5848) * Add symmetric goal for goal checker and mppi goal angle critic * Lint * Update nav2_mppi_controller/README.md --------- Signed-off-by: mini-1235 <[email protected]> Signed-off-by: Maurice Alexander Purnawan <[email protected]> Co-authored-by: Sandeep Dutta <[email protected]> Co-authored-by: Steve Macenski <[email protected]> * [Jazzy] Optimize MPPI visualization to skip processing when no subscribers (ros-navigation#5807) * Optimize MPPI visualization to skip processing when no subscribers - Added subscription count check in TrajectoryVisualizer::add Signed-off-by: SatArw <[email protected]> * Update nav2_mppi_controller/src/trajectory_visualizer.cpp Remove redundant brackets in the if statement. Co-authored-by: Steve Macenski <[email protected]> Signed-off-by: Satwik Arawalli <[email protected]> --------- Signed-off-by: SatArw <[email protected]> Signed-off-by: Satwik Arawalli <[email protected]> Co-authored-by: Steve Macenski <[email protected]> * Add new parameter to nav2_velocity_smoother to also smooth the timestamp of TwistStamped messages (ros-navigation#5858) * Add new parameter to nav2_velocity_smoother that updates the timestamp of the smoothed velocity header message Signed-off-by: Andrei Costinescu <[email protected]> * Update parameter description of stamp_smoothed_velocity_with_smoothing_time in nav2_velocity_smoother/README.md Signed-off-by: Andrei Costinescu <[email protected]> * Add new parameter stamp_smoothed_velocity_with_smoothing_time in parameter examples in nav2_bringup Signed-off-by: Andrei Costinescu <[email protected]> * Fix lines too long cpplint issues in velocity_smoother.cpp Signed-off-by: Andrei Costinescu <[email protected]> * Rephrase parameter description for improved clarity Signed-off-by: Andrei Costinescu <[email protected]> * Rename delta time variable for clarity. Signed-off-by: Andrei Costinescu <[email protected]> * Make the time-smoothing computation more concise. Signed-off-by: Andrei Costinescu <[email protected]> * Change code to 1) not write the timestamp in the cmd_vel->header twice and 2) make the difference explicit between using and not using the new parameter Signed-off-by: Andrei Costinescu <[email protected]> --------- Signed-off-by: Andrei Costinescu <[email protected]> * Fix MAX_NON_OBSTACLE_COST in theta star planner (ros-navigation#5865) (ros-navigation#5868) (cherry picked from commit 018dca9) Signed-off-by: mini-1235 <[email protected]> Co-authored-by: Maurice Alexander Purnawan <[email protected]> * Jazzy sync Jan 23, 2026 (ros-navigation#5890) * No need to spam the logs (ros-navigation#5674) Signed-off-by: Tim Clephas <[email protected]> * Conditionally call onLoop based on node status (ros-navigation#5700) Signed-off-by: Steve Macenski <[email protected]> * Allow for no progress checkers to be configured (ros-navigation#5701) Signed-off-by: SteveMacenski <[email protected]> * Fix: wait for drive_on_heading_client instead of backup_client (ros-navigation#5724) The basic navigator was waiting for the backup_client in the driveOnHeading function. Signed-off-by: agennart <[email protected]> Co-authored-by: agennart <[email protected]> * Fix: reset controller_server loop_rate when missed desired rate ros-navigation#5712 (ros-navigation#5723) When a single iteration takes longer than the expected period, this impacts the next iterations behavior since they will have less time to perform the control logic, thus increasing the actual controller_frequency. By resetting the loop_rate on sleep() failure, this ensures that each iteration will have a full period to exectue its logic. Signed-off-by: agennart <[email protected]> Co-authored-by: agennart <[email protected]> * temporary fix bug null pointer (ros-navigation#5749) * temporary fix bug null pointer Signed-off-by: suifengersan123 <[email protected]> * add return Signed-off-by: suifengersan123 <[email protected]> * remove return Signed-off-by: suifengersan123 <[email protected]> --------- Signed-off-by: suifengersan123 <[email protected]> * fix: change warning to exception when goal poses cannot be transformed (ros-navigation#5759) - Replace RCLCPP_WARN with std::runtime_error exception in onPreempt method - Remove bt_action_server_->terminatePendingGoal() call after accepting goal - Add required stdexcept include for exception handling Fixes issue where navigators accept pending goal but are not properly terminated if rejected during goal pose transformation. Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> * Update obstacle layer usage of max ranges (ros-navigation#5697) * Use cell distance for obstacle marking max range Signed-off-by: Simon Dathan <[email protected]> * Don't raytrace clear the cell containing the current observation Signed-off-by: Simon Dathan <[email protected]> * Add tests for max marking and clearing ranges Signed-off-by: Simon Dathan <[email protected]> * Fix cpplint failures Signed-off-by: Simon Dathan <[email protected]> * Fix distance calculation Signed-off-by: Simon Dathan <[email protected]> * fix casting, formatting Signed-off-by: Simon Dathan <[email protected]> * check origin is in map, update CMakeLists Signed-off-by: Simon Dathan <[email protected]> * use hypot instead of squared dist Signed-off-by: Simon Dathan <[email protected]> * Move origin calc out of loop Signed-off-by: Simon Dathan <[email protected]> * Revert don't raytrace observation cell Signed-off-by: Simon Dathan <[email protected]> * Revert don't raytrace origin if it is observation cell Signed-off-by: Simon Dathan <[email protected]> * Remove new line Signed-off-by: Simon Dathan <[email protected]> --------- Signed-off-by: Simon Dathan <[email protected]> * [mppi] Don't reset zone-based speed limits (ros-navigation#5768) * [mppi] Don't reset zone-based speed limits Signed-off-by: Adi Vardi <[email protected]> * [mppi] update motion model params from speed_limit Signed-off-by: Adi Vardi <[email protected]> * fix linting issue Signed-off-by: Adi Vardi <[email protected]> * Revert: reset speed limits after param change Signed-off-by: Adi Vardi <[email protected]> --------- Signed-off-by: Adi Vardi <[email protected]> * Bugfix inactive publishers (ros-navigation#5748) * Do not publish costmap unless active Signed-off-by: Christopher Thompson <[email protected]> * Fix style Signed-off-by: Christopher Thompson <[email protected]> * Fix typo Signed-off-by: Christopher Thompson <[email protected]> * Use layers isEnabled() to prevent publishing Signed-off-by: Christopher Thompson <[email protected]> * Fix style Signed-off-by: Christopher Thompson <[email protected]> * Add missing include for CostmapLayer type Signed-off-by: Christopher Thompson <[email protected]> * Remove extra scoping Signed-off-by: Christopher Thompson <[email protected]> --------- Signed-off-by: Christopher Thompson <[email protected]> Co-authored-by: Christopher Thompson <[email protected]> * Fix MAX_NON_OBSTACLE_COST in theta star planner (ros-navigation#5865) Signed-off-by: mini-1235 <[email protected]> * Bump jazzy to 1.3.11 for release Signed-off-by: SteveMacenski <[email protected]> --------- Signed-off-by: Tim Clephas <[email protected]> Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: SteveMacenski <[email protected]> Signed-off-by: agennart <[email protected]> Signed-off-by: suifengersan123 <[email protected]> Signed-off-by: Simon Dathan <[email protected]> Signed-off-by: Adi Vardi <[email protected]> Signed-off-by: Christopher Thompson <[email protected]> Signed-off-by: mini-1235 <[email protected]> Co-authored-by: Tim Clephas <[email protected]> Co-authored-by: Saitama <[email protected]> Co-authored-by: agennart <[email protected]> Co-authored-by: suifengersan123 <[email protected]> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Simon Dathan <[email protected]> Co-authored-by: Adi Vardi <[email protected]> Co-authored-by: Christopher Thompson <[email protected]> Co-authored-by: Christopher Thompson <[email protected]> Co-authored-by: Maurice Alexander Purnawan <[email protected]> * Fix parameters in route server (backport Jazzy) (ros-navigation#5904) * Fix parameters in route server (backport Jazzy) Signed-off-by: mini-1235 <[email protected]> * Fix Signed-off-by: mini-1235 <[email protected]> --------- Signed-off-by: mini-1235 <[email protected]> * Add cancel timeout when cancelling actions (backport Jazzy) (ros-navigation#5903) * Add cancel timeout when cancelling actions (backport Jazzy) Signed-off-by: mini-1235 <[email protected]> * Declare parameter Signed-off-by: mini-1235 <[email protected]> * Update cancel timeout Signed-off-by: mini-1235 <[email protected]> --------- Signed-off-by: mini-1235 <[email protected]> * Backport docking in reverse fixes for jazzy (ros-navigation#5971) * Increase docking coverage && fix backward docking (backport Jazzy) (ros-navigation#5097) * Increase docking coverage && fix backward docking (backport Jazzy) Signed-off-by: Iacopo Moles <[email protected]> Increase docking coverage && fix backward docking (ros-navigation#5097) * Add dock_database tests Signed-off-by: Alberto Tudela <[email protected]> * Add utils test Signed-off-by: Alberto Tudela <[email protected]> * Improve filter tests Signed-off-by: Alberto Tudela <[email protected]> * Added simple charging tests Signed-off-by: Alberto Tudela <[email protected]> * Improve comments Signed-off-by: Alberto Tudela <[email protected]> * Fix backward and redo main test Signed-off-by: Alberto Tudela <[email protected]> * Change test period to reduce test time Signed-off-by: Alberto Tudela <[email protected]> * Revert "Change test period to reduce test time" This reverts commit ef1555e. Signed-off-by: Alberto Tudela <[email protected]> * Delete print pose Signed-off-by: Alberto Tudela <[email protected]> --------- Signed-off-by: Alberto Tudela <[email protected]> Signed-off-by: Iacopo Moles <[email protected]> * bump package versions Signed-off-by: Iacopo Moles <[email protected]> * Revert "bump package versions" This reverts commit a35c23d. Signed-off-by: Iacopo Moles <[email protected]> --------- Signed-off-by: Alberto Tudela <[email protected]> Signed-off-by: Iacopo Moles <[email protected]> Co-authored-by: Alberto Tudela <[email protected]> --------- Signed-off-by: Prathmesh Atkale <[email protected]> Signed-off-by: Pau Reverté <[email protected]> Signed-off-by: Mike Slembrouck <[email protected]> Signed-off-by: mikeslembrouckZYGO <[email protected]> Signed-off-by: Simon Dathan <[email protected]> Signed-off-by: EricoMeger <[email protected]> Signed-off-by: Guillaume Doisy <[email protected]> Signed-off-by: Maurice <[email protected]> Signed-off-by: mini-1235 <[email protected]> Signed-off-by: Maurice Alexander Purnawan <[email protected]> Signed-off-by: SatArw <[email protected]> Signed-off-by: Satwik Arawalli <[email protected]> Signed-off-by: Andrei Costinescu <[email protected]> Signed-off-by: Tim Clephas <[email protected]> Signed-off-by: Steve Macenski <[email protected]> Signed-off-by: SteveMacenski <[email protected]> Signed-off-by: agennart <[email protected]> Signed-off-by: suifengersan123 <[email protected]> Signed-off-by: Adi Vardi <[email protected]> Signed-off-by: Christopher Thompson <[email protected]> Signed-off-by: Alberto Tudela <[email protected]> Signed-off-by: Iacopo Moles <[email protected]> Co-authored-by: Prathmesh2931 <[email protected]> Co-authored-by: Pau Reverté <[email protected]> Co-authored-by: mikeslembrouckZYGO <[email protected]> Co-authored-by: Simon Dathan <[email protected]> Co-authored-by: Érico Meger <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> Co-authored-by: Guillaume Doisy <[email protected]> Co-authored-by: Guillaume Doisy <[email protected]> Co-authored-by: Maurice Alexander Purnawan <[email protected]> Co-authored-by: Johannes Plapp <[email protected]> Co-authored-by: Sandeep Dutta <[email protected]> Co-authored-by: Steve Macenski <[email protected]> Co-authored-by: Satwik Arawalli <[email protected]> Co-authored-by: Andrei Costinescu <[email protected]> Co-authored-by: Tim Clephas <[email protected]> Co-authored-by: Saitama <[email protected]> Co-authored-by: agennart <[email protected]> Co-authored-by: suifengersan123 <[email protected]> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Adi Vardi <[email protected]> Co-authored-by: Christopher Thompson <[email protected]> Co-authored-by: Christopher Thompson <[email protected]> Co-authored-by: Iacopo Moles <[email protected]> Co-authored-by: Alberto Tudela <[email protected]>
Rooteq
pushed a commit
to Rooteq/navigation2
that referenced
this pull request
Nov 9, 2026
…gation#5903) * Add cancel timeout when cancelling actions (backport Jazzy) Signed-off-by: mini-1235 <[email protected]> * Declare parameter Signed-off-by: mini-1235 <[email protected]> * Update cancel timeout Signed-off-by: mini-1235 <[email protected]> --------- Signed-off-by: mini-1235 <[email protected]>
idesign0
added a commit
to idesign0/id_navigation2
that referenced
this pull request
Nov 17, 2026
1fc0902 ("Fix: MacOS compilation fixes") rewrote the subtree blackboard setters with the `template` keyword for Apple clang and dropped blackboard->set<std::chrono::milliseconds>("cancel_timeout", default_cancel_timeout_), which jazzy has had since e70bedb (ros-navigation#5903, cancel timeout backport). Subtree BT nodes then found no cancel_timeout. Restored, with `template` like the lines around it; against upstream jazzy this file now differs only by that keyword on the four setters. Built nav2_behavior_tree and nav2_bt_navigator on macOS 27 (Apple clang 21) as an overlay on ros2-jazzy 26.11.16.7 with nav2_package()'s -Werror: both finish. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Dhruv Patel <[email protected]>
This was referenced Nov 17, 2026
jwallace42
pushed a commit
that referenced
this pull request
Nov 18, 2026
…ly fixes (#6815) * Use Mach thread policy for soft real-time priority on macOS (backport #5679) Partial backport of #5679 to jazzy: only the nav2_util node_utils change. sched_setscheduler() and SCHED_FIFO do not exist on macOS, so nav2_util fails to compile there. On __APPLE__, setSoftRealTimePriority() now uses the Mach thread precedence policy; other platforms are unchanged. The std::chrono cast part of #5679 targets main and is not needed on jazzy. Compile-tested on macOS 27 (arm64, Apple clang 21) as an overlay on a ROS 2 Jazzy install: nav2_util builds with nav2_package()'s -Werror. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Dhruv Patel <[email protected]> * Add template keyword for dependent calls on macOS (backport #5729) Backport of #5729 to jazzy. Apple clang rejects calls to member templates of a dependent type without the `template` keyword, so nav2_behavior_tree (bt_action_server_impl.hpp, subtree blackboard setters) and nav2_route (route_operation_client.hpp, create_client) fail to compile there. jazzy already has the route_server.hpp part via #6016. jazzy also sets cancel_timeout on the subtree blackboard (#5903); it is kept, with the same keyword. Compile-tested on macOS 27 (arm64, Apple clang 21) as an overlay on a ROS 2 Jazzy install: nav2_behavior_tree and nav2_bt_navigator build with nav2_package()'s -Werror. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Dhruv Patel <[email protected]> * Fix Apple Clang template ambiguity in MPPI (backport #6017) Backport of #6017 (merged into humble) to jazzy, whose MPPI still uses xtensor. On Apple clang the xt::cumsum(..., {1}) calls in optimizer.cpp resolve through a braced scalar (-Wbraced-scalar-init, an error under nav2_package()'s -Werror). As in #6017, these use the cumsum helpers in tools/apple_utils.hpp on __APPLE__; the non-Apple path is unchanged in result. The humble commit does not apply cleanly to jazzy, so this is the same change adapted to jazzy's files. Compile-tested on macOS 27 (arm64, Apple clang 21) as an overlay on a ROS 2 Jazzy install, both sides with the same local CMakeLists workaround for the separate AppleClang flag issue: upstream jazzy reports optimizer.cpp:380/396/398 "braces around scalar initializer"; with this change those are gone and the remaining errors (-Wpessimizing-move in four critics, a separate issue) are identical on both sides. Signed-off-by: Dhruv Patel <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * Fix clang -Werror errors in nav2_system_tests and nav2_rviz_plugins (#6803) Backport of #6803 to jazzy. * nav2_system_tests: mark the UnknownErrorController overrides (cleanup, activate, deactivate, setPlan, computeVelocityCommands, setSpeedLimit) with override (-Winconsistent-missing-override). * nav2_rviz_plugins: discard the stoi() result explicitly (-Wunused-result; libc++ marks std::stoi [[nodiscard]]). Adapted to jazzy: setPlan instead of newPathReceived, and computeVelocityCommands takes the GoalChecker. Compile-tested on macOS 27 (arm64, Apple clang 21) as an overlay on a ROS 2 Jazzy install, with nav2_package()'s -Werror: nav2_system_tests fails on upstream jazzy with 6 missing-override errors and builds with this change; nav2_rviz_plugins' nav2_panel.cpp -Wunused-result error is gone. (cherry picked from commit 6272fad) Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Dhruv Patel <[email protected]> * nav2_rviz_plugins: Remove slots without implementation (#4974) Without this change, when compiled for Jazzy with Nix using gcc14 and qt-5.15, loading the plugins to rviz fails with the following error: [rviz2]: PluginlibFactory: The plugin for class 'nav2_rviz_plugins/Navigation 2' failed to load. Error: Failed to load library /nix/store/...-ros-env/lib/libnav2_rviz_plugins.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library dlopen error: /nix/store/...-ros-env/lib/libnav2_rviz_plugins.so: undefined symbol: _ZN17nav2_rviz_plugins12DockingPanel9onStartupEv, at /build/rcutils-release-release-jazzy-rcutils-6.7.2-1/src/shared_library.c:99 The dynamic linker complains about undefined symbol, which corresponds to a Qt slot, which is declared, but has no implementation. I'm not sure what is the root cause of this behavior, but removing the slot definitions fixes the problem and the plugins can be loaded. Signed-off-by: Michal Sojka <[email protected]> (cherry picked from commit e6f500e) Signed-off-by: Dhruv Patel <[email protected]> * nav2_rviz_plugins: Don't use non-existent slot (#5016) The definition of the slot was removed in commit e6f500e ("nav2_rviz_plugins: Remove slots without implementation (#4974)", 2025-03-10), because it had no implementation. But we forgot to remove the reference to this slot, because the compiler cannot detect it. We remove the reference now. Without this, rviz shows warnings like: QObject::connect: No such slot nav2_rviz_plugins::CostmapCostTool::updateAutoDeactivate() QObject::connect: (sender name: 'Single click') Signed-off-by: Michal Sojka <[email protected]> (cherry picked from commit 46dbd07) Signed-off-by: Dhruv Patel <[email protected]> * Mark virtual overrides with override (backport of #5782) Clang reports -Winconsistent-missing-override (an error under nav2_package()'s -Werror) in costmap_filter.hpp, keepout_filter.hpp, plugin_container_layer.hpp and route_tool.hpp, where some overrides are marked and others are not. Same headers as #5782 on main; jazzy keeps `override` instead of `final` on CostmapFilter::isClearable() so out-of-tree filters that override it still build, and keepout_filter uses jazzy's Pose2D signature. The map_server and planner_server parts of #5782 are not needed on jazzy. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Dhruv Patel <[email protected]> * Circle: keep Polygon::updatePolygon overloads visible (-Woverloaded-virtual) circle.hpp:102:8: error: 'nav2_collision_monitor::Circle::updatePolygon' hides overloaded virtual function [-Werror,-Woverloaded-virtual] Circle::updatePolygon(double) hid Polygon::updatePolygon(const Velocity &) (public, virtual) and Polygon::updatePolygon(PolygonStamped::ConstSharedPtr) (protected). A using-declaration in Circle's protected section brings them back into Circle's scope. Circle overrides neither, so virtual dispatch is unchanged; the one call inside Circle, updatePolygon(msg->data) with a float, still selects updatePolygon(double) (Velocity is an aggregate and a shared_ptr is not constructible from a float), and calls through Polygon pointers are unaffected. Tested on macOS 27 (arm64), Apple clang 21, CMake 4.4.2: all 45 packages of this branch build as an overlay on ros2-jazzy 26.11.16.7 with nav2_package()'s -Werror active and no extra compiler flags. Every translation unit of nav2_costmap_2d, nav2_collision_monitor, nav2_mppi_controller, nav2_route, nav2_rviz_plugins, nav2_smac_planner and the nav2_system_tests controller plugins (138) was compiled from the previous commit and from this series with identical flags (the originals with -Wno-error, both with the source root mapped to one path): `otool -tV` output is byte-identical for all 138. planner/controller/behavior/bt_navigator/smoother/ waypoint_follower/velocity_smoother/collision_monitor/route_server configure through lifecycle with nav2_bringup's nav2_params.yaml. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Dhruv Patel <[email protected]> * mppi: only probe x86 SIMD flags on x86 (-Wunused-command-line-argument) clang++: error: argument unused during compilation: '-msse4.2' [-Werror,-Wunused-command-line-argument] On arm64, check_cxx_compiler_flag("-msse4.2") passes (clang only warns that the flag is unused) while -mno-avx512f, -mavx2 and -mfma are rejected, so -msse4.2 alone was added -- with no effect on arm64 code, and fatal under -Werror. The checks and add_compile_options now run only when CMAKE_SYSTEM_PROCESSOR is x86; on x86 they are exactly as before. Tested on macOS 27 (arm64), Apple clang 21, CMake 4.4.2: all 45 packages of this branch build as an overlay on ros2-jazzy 26.11.16.7 with nav2_package()'s -Werror active and no extra compiler flags. Every translation unit of nav2_costmap_2d, nav2_collision_monitor, nav2_mppi_controller, nav2_route, nav2_rviz_plugins, nav2_smac_planner and the nav2_system_tests controller plugins (138) was compiled from the previous commit and from this series with identical flags (the originals with -Wno-error, both with the source root mapped to one path): `otool -tV` output is byte-identical for all 138. planner/controller/behavior/bt_navigator/smoother/ waypoint_follower/velocity_smoother/collision_monitor/route_server configure through lifecycle with nav2_bringup's nav2_params.yaml. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Dhruv Patel <[email protected]> * mppi: guard GCC-only diagnostic pragmas from clang (-Wunknown-warning-option) tools/utils.hpp: error: unknown warning group '-Wstringop-overflow', ignored [-Werror,-Wunknown-warning-option] (and '-Wmaybe-uninitialized'; same in critic_data.hpp, critic_manager.hpp, models/*.hpp, motion_models.hpp, optimizer.hpp, tools/noise_generator.hpp, tools/trajectory_visualizer.hpp) -Wstringop-overflow and -Wmaybe-uninitialized exist only in GCC; clang ignores the pragma and warns. Each such pragma line is wrapped in #if defined(__GNUC__) && !defined(__clang__). GCC sees the same pragmas as before; clang never acted on them. -Warray-bounds (known to both) is left as is. (test/utils_test.cpp carries the same pragma and gets the same guard; tests were not built here.) Tested on macOS 27 (arm64), Apple clang 21, CMake 4.4.2: all 45 packages of this branch build as an overlay on ros2-jazzy 26.11.16.7 with nav2_package()'s -Werror active and no extra compiler flags. Every translation unit of nav2_costmap_2d, nav2_collision_monitor, nav2_mppi_controller, nav2_route, nav2_rviz_plugins, nav2_smac_planner and the nav2_system_tests controller plugins (138) was compiled from the previous commit and from this series with identical flags (the originals with -Wno-error, both with the source root mapped to one path): `otool -tV` output is byte-identical for all 138. planner/controller/behavior/bt_navigator/smoother/ waypoint_follower/velocity_smoother/collision_monitor/route_server configure through lifecycle with nav2_bringup's nav2_params.yaml. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Dhruv Patel <[email protected]> * mppi: drop std::move on xtensor expression temporaries (-Wpessimizing-move) constraint_critic.cpp: error: moving a temporary object prevents copy elision [-Werror,-Wpessimizing-move] (6x; velocity_deadband_critic.cpp 4x, prefer_forward_critic.cpp 2x, path_follow_critic.cpp 2x) std::move(expr) on a prvalue only adds a move. Each std::move(X) becomes (X) -- parentheses kept, so grouping is unchanged: e.g. std::move(a + b + c) * dt stays (a + b + c) * dt, not a + b + c * dt -- and where the call was already wrapped, (std::move(X)) becomes (X). Machine code of all four critics is byte-identical to before (see below). Tested on macOS 27 (arm64), Apple clang 21, CMake 4.4.2: all 45 packages of this branch build as an overlay on ros2-jazzy 26.11.16.7 with nav2_package()'s -Werror active and no extra compiler flags. Every translation unit of nav2_costmap_2d, nav2_collision_monitor, nav2_mppi_controller, nav2_route, nav2_rviz_plugins, nav2_smac_planner and the nav2_system_tests controller plugins (138) was compiled from the previous commit and from this series with identical flags (the originals with -Wno-error, both with the source root mapped to one path): `otool -tV` output is byte-identical for all 138. planner/controller/behavior/bt_navigator/smoother/ waypoint_follower/velocity_smoother/collision_monitor/route_server configure through lifecycle with nav2_bringup's nav2_params.yaml. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Dhruv Patel <[email protected]> * route, smac_planner: use the nlohmann_json / nanoflann targets for their headers nav2_route/include/nav2_route/graph_loader.hpp:22:10: fatal error: 'nlohmann/json.hpp' file not found nav2_route/include/nav2_route/node_spatial_tree.hpp:21:10: fatal error: 'nanoflann.hpp' file not found nav2_smac_planner/include/nav2_smac_planner/node_lattice.hpp:30:10: fatal error: 'nlohmann/json.hpp' file not found nav2_route names nlohmann_json in ament_target_dependencies(), which only forwards <pkg>_INCLUDE_DIRS/<pkg>_TARGETS -- nlohmann_json's config defines neither -- and it find_package()s nanoflann without using it; nav2_smac_planner includes json.hpp without finding the package. Both only build where the headers sit in a default include dir (/usr/include on Ubuntu). Link nlohmann_json::nlohmann_json (and nanoflann::nanoflann for nav2_route), header-only INTERFACE targets that add their include dir, and export the dependencies their installed headers need so consumers (nav2_rviz_plugins) can resolve those targets. Both are already <depend>s in package.xml. No generated code changes (nav2_route and nav2_smac_planner objects are byte-identical, below). Tested on macOS 27 (arm64), Apple clang 21, CMake 4.4.2: all 45 packages of this branch build as an overlay on ros2-jazzy 26.11.16.7 with nav2_package()'s -Werror active and no extra compiler flags. Every translation unit of nav2_costmap_2d, nav2_collision_monitor, nav2_mppi_controller, nav2_route, nav2_rviz_plugins, nav2_smac_planner and the nav2_system_tests controller plugins (138) was compiled from the previous commit and from this series with identical flags (the originals with -Wno-error, both with the source root mapped to one path): `otool -tV` output is byte-identical for all 138. planner/controller/behavior/bt_navigator/smoother/ waypoint_follower/velocity_smoother/collision_monitor/route_server configure through lifecycle with nav2_bringup's nav2_params.yaml. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Dhruv Patel <[email protected]> * smac_planner: drop unused #include <omp.h> nav2_smac_planner/src/a_star.cpp:16:10: fatal error: 'omp.h' file not found a_star.cpp uses no OpenMP (no #pragma omp, no omp_* call) and the package neither finds nor links OpenMP, so the include is unused; it only compiles where omp.h is a default header (GCC). Removed; a_star.cpp's object code is byte-identical. Tested on macOS 27 (arm64), Apple clang 21, CMake 4.4.2: all 45 packages of this branch build as an overlay on ros2-jazzy 26.11.16.7 with nav2_package()'s -Werror active and no extra compiler flags. Every translation unit of nav2_costmap_2d, nav2_collision_monitor, nav2_mppi_controller, nav2_route, nav2_rviz_plugins, nav2_smac_planner and the nav2_system_tests controller plugins (138) was compiled from the previous commit and from this series with identical flags (the originals with -Wno-error, both with the source root mapped to one path): `otool -tV` output is byte-identical for all 138. planner/controller/behavior/bt_navigator/smoother/ waypoint_follower/velocity_smoother/collision_monitor/route_server configure through lifecycle with nav2_bringup's nav2_params.yaml. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Dhruv Patel <[email protected]> * nav2_mppi_controller: GCC-only flags only for GCC, match AppleClang Two compiler checks in the CMakeLists break Apple clang: * -finline-limit is passed to every compiler; clang rejects it (-Wignored-optimization-argument, an error under -Werror). It is now added only for GCC; the other optimization flags are unchanged for all. * The C++20 branch checks CMAKE_CXX_COMPILER_ID STREQUAL "Clang", but Apple's compiler reports "AppleClang", so it gets -fconcepts (clang++: error: unknown argument: '-fconcepts'). Use MATCHES "Clang", as in #6816 on main. GCC gets exactly the same flags as before. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Dhruv Patel <[email protected]> --------- Signed-off-by: Dhruv Patel <[email protected]> Signed-off-by: Michal Sojka <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Michal Sojka <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Basic Info
Description of contribution in a few bullet points
Description of documentation updates required from your changes
Description of how this change was tested
Future work that may be required in bullet points
For Maintainers:
backport-*.