Skip to content

Set headers on generated coverage path poses - #159

Merged
SteveMacenski merged 2 commits into
open-navigation:mainfrom
nobleo:fix/nav-path-pose-headers-main
Nov 26, 2026
Merged

SteveMacenski merged 2 commits into
open-navigation:mainfrom
nobleo:fix/nav-path-pose-headers-main

Conversation

@brammmieee

Copy link
Copy Markdown
Contributor

Summary

Copy the supplied path header to each generated pose so consumers can transform poses using their frame and timestamp.

 msg.poses.push_back(toMsg(state));
+msg.poses.back().header = header;

Cherry-picked from the Nobleo Jazzy patch; adapted the test to the existing upstream path fixture.

Evidence

  • Before: Individual poses have default headers even when the path header is populated.
    After: Each pose receives the supplied header; the existing utility test now checks frame and timestamp equality for every pose.
  • Upstream build/tests have not been run locally (local workspace uses Jazzy).

Merge Danger

Door: two-way

Blast Radius: path-consumers

Only generated pose headers change; geometry is unchanged.

@brammmieee
brammmieee force-pushed the fix/nav-path-pose-headers-main branch from 8fb41d6 to 4b88cb3 Compare November 10, 2026 12:36
@@ -356,6 +356,7 @@ inline nav_msgs::msg::Path toNavPathMsg(

for (const auto & state : path) {
msg.poses.push_back(toMsg(state));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not update toMsg?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, thanks!

@brammmieee
brammmieee force-pushed the fix/nav-path-pose-headers-main branch from f4629be to 7541e9d Compare November 26, 2026 09:43
@SteveMacenski
SteveMacenski merged commit c4c1225 into open-navigation:main Nov 26, 2026
8 checks passed
SteveMacenski pushed a commit that referenced this pull request Nov 26, 2026
* Fix Broken isValid Check in Path Components Iterator (#103)

* fix: incorrect isValid check

* fix: add path component iteration index validation test

(cherry picked from commit 40c2d84)
Signed-off-by: u33549 <[email protected]>

* docs: add XML usage examples to BT plugin doxygen descriptions (#104)

Signed-off-by: AJedancov <[email protected]>

(cherry picked from commit e023454)
Signed-off-by: u33549 <[email protected]>

* Fix `ros2 param list` due to issue with default_custom_order (#151)

Before this patch, `ros2 param dump` and `rqt_reconfigure` would not
work:

```
  ros2 run opennav_coverage opennav_coverage
  ros2 lifecycle set /coverage_server configure
  ros2 lifecycle set /coverage_server activate
  ros2 param dump /coverage_server
  /coverage_server:
    ros__parameters: {}
```

After this patch, `ros2 param dump` works as expected:

```
  ros2 param dump /coverage_server
  /coverage_server:
    ros__parameters:
      /bond_disable_heartbeat_timeout: true
      action_server_result_timeout: 10.0
      ...
```

Signed-off-by: Ramon Wijnands <[email protected]>
Co-authored-by: Copilot <[email protected]>

Adapted for humble: nav2_util::declare_parameter_if_not_declared.

(cherry picked from commit 7942d38)
Signed-off-by: u33549 <[email protected]>

* Add a useful error if the headland is too large (#150)

Signed-off-by: Ramon Wijnands <[email protected]>

Adapted for humble: reformatted for humble's ament_uncrustify.

(cherry picked from commit 04858cf)
Signed-off-by: u33549 <[email protected]>

* Fix dependencies missing from package.xml (#153)

Adapted for humble: behaviortree_cpp_v3 and backported_bt_navigator kept; nav2_ros_common and nav2_bt_navigator are not used on humble and are left out. Also declares and includes ament_index_cpp in the navigator, the non-CI part of #163 (cherry picked from commit eb43d10).

(cherry picked from commit 2fb8254)
Signed-off-by: u33549 <[email protected]>

* Make visualizers transient_local (#155)

Signed-off-by: Alireza Moayyedi <[email protected]>

Adapted for humble: the headland_swaths publisher does not exist here.

(cherry picked from commit aa04819)
Signed-off-by: u33549 <[email protected]>

* Set headers on generated coverage path poses (#159)

* Set headers on generated coverage path poses

Signed-off-by: Bram Odrosslij <[email protected]>

* Set pose headers in the PathState converter

Signed-off-by: Bram Odrosslij <[email protected]>

---------

Signed-off-by: Bram Odrosslij <[email protected]>

Adapted for humble: keeps humble's existing SWATH densify check in TesttoNavPathMsg.

(cherry picked from commit c4c1225)
Signed-off-by: u33549 <[email protected]>

---------

Signed-off-by: u33549 <[email protected]>
Co-authored-by: Joey Quinlan <[email protected]>
Co-authored-by: Andrei Jedancov <[email protected]>
Co-authored-by: Ramon Wijnands <[email protected]>
Co-authored-by: Tim Clephas <[email protected]>
Co-authored-by: Alireza Moayyedi <[email protected]>
Co-authored-by: Bram O <[email protected]>
SteveMacenski pushed a commit that referenced this pull request Nov 26, 2026
* fix: Add global frame ID to UTM path poses. (#90)

This fixes an issue with visualization of the UTM path in Foxglove Studio which requires that the path frame_id match all the pose frame_ids.

(cherry picked from commit 77dcdca)
Signed-off-by: u33549 <[email protected]>

* Fix Broken isValid Check in Path Components Iterator (#103)

* fix: incorrect isValid check

* fix: add path component iteration index validation test

(cherry picked from commit 40c2d84)
Signed-off-by: u33549 <[email protected]>

* docs: add XML usage examples to BT plugin doxygen descriptions (#104)

Signed-off-by: AJedancov <[email protected]>

(cherry picked from commit e023454)
Signed-off-by: u33549 <[email protected]>

* Fix `ros2 param list` due to issue with default_custom_order (#151)

Before this patch, `ros2 param dump` and `rqt_reconfigure` would not
work:

```
  ros2 run opennav_coverage opennav_coverage
  ros2 lifecycle set /coverage_server configure
  ros2 lifecycle set /coverage_server activate
  ros2 param dump /coverage_server
  /coverage_server:
    ros__parameters: {}
```

After this patch, `ros2 param dump` works as expected:

```
  ros2 param dump /coverage_server
  /coverage_server:
    ros__parameters:
      /bond_disable_heartbeat_timeout: true
      action_server_result_timeout: 10.0
      ...
```

Signed-off-by: Ramon Wijnands <[email protected]>
Co-authored-by: Copilot <[email protected]>

Adapted for jazzy: nav2_util::declare_parameter_if_not_declared.

(cherry picked from commit 7942d38)
Signed-off-by: u33549 <[email protected]>

* Add a useful error if the headland is too large (#150)

Signed-off-by: Ramon Wijnands <[email protected]>

(cherry picked from commit 04858cf)
Signed-off-by: u33549 <[email protected]>

* Fix dependencies missing from package.xml (#153)

Adapted for jazzy: nav2_ros_common and nav2_bt_navigator are not used on jazzy and are left out. Also declares and includes ament_index_cpp in the navigator, the non-CI part of #163 (cherry picked from commit eb43d10).

(cherry picked from commit 2fb8254)
Signed-off-by: u33549 <[email protected]>

* Make visualizers transient_local (#155)

Signed-off-by: Alireza Moayyedi <[email protected]>

Adapted for jazzy: the headland_swaths publisher does not exist here.

(cherry picked from commit aa04819)
Signed-off-by: u33549 <[email protected]>

* Set headers on generated coverage path poses (#159)

* Set headers on generated coverage path poses

Signed-off-by: Bram Odrosslij <[email protected]>

* Set pose headers in the PathState converter

Signed-off-by: Bram Odrosslij <[email protected]>

---------

Signed-off-by: Bram Odrosslij <[email protected]>

Adapted for jazzy: keeps jazzy's existing SWATH densify check in TesttoNavPathMsg.

(cherry picked from commit c4c1225)
Signed-off-by: u33549 <[email protected]>

---------

Signed-off-by: u33549 <[email protected]>
Co-authored-by: Bryan Bush <[email protected]>
Co-authored-by: Joey Quinlan <[email protected]>
Co-authored-by: Andrei Jedancov <[email protected]>
Co-authored-by: Ramon Wijnands <[email protected]>
Co-authored-by: Tim Clephas <[email protected]>
Co-authored-by: Alireza Moayyedi <[email protected]>
Co-authored-by: Bram O <[email protected]>
SteveMacenski pushed a commit that referenced this pull request Nov 27, 2026
* Pin Fields2Cover to v2.1.1 for the upstreamed fixes

Fields2Cover v2.1.1 carries the fixes and APIs this package used to work
around: HL_SWATH densification, the corridor headland and the
degenerate-polygon guard.

(cherry picked from commit 2ef1796, part of #162)
Signed-off-by: u33549 <[email protected]>

* Drop the unused multi-cell headland overload

The server only calls the Field overload; the F2CCells one had no
callers left after the headland-first decomposition rework.

(cherry picked from commit 93915e2, part of #162)
Signed-off-by: u33549 <[email protected]>

* Let Fields2Cover densify headland passes

Path::discretizeSwath now splits HL_SWATH states as well, so the local
copy that did the same is no longer needed. The step guard stays at the
call site since Fields2Cover does not clamp a zero step.

(cherry picked from commit 195b002, part of #162)
Signed-off-by: u33549 <[email protected]>

* Carve the inter-cell corridor with Fields2Cover

CorridorHL finds the borders cells really share and carves the corridor
from the smaller cell. route_headland_width is now the total corridor
width; the previous code could carve it from both cells, or miss a
partially shared border.

Also drops the sliver filter Fields2Cover no longer needs: CorridorHL already removes the zero-width pieces carving leaves, and the degenerate-polygon crash the filter guarded against is fixed upstream.

(cherry picked from commit 8ecb2f4, part of #162)
(cherry picked from commit a4f3a87, part of #162)
Signed-off-by: u33549 <[email protected]>

* Remove the unused default_max_swaths_for_global_route parameter

It has had no effect since multi-cell TSP routing moved to a per-cell
solve; the threshold it set is no longer read.

(cherry picked from commit 852e0f1, part of #162)
Signed-off-by: u33549 <[email protected]>

* Report where a swath ends in the coverage path message

With Fields2Cover v2 a straight swath is a single path state, so taking
the end from that state's start point gave every swath start == end.
Use PathState::atEnd() instead.

(cherry picked from commit af70ccf, part of #162)
Signed-off-by: u33549 <[email protected]>

* Densify GPS paths before leaving the field frame

The densification step is in meters, but it ran after the path was
converted to the GPS frame, so swath lengths were in degrees and no
state was ever split.

(cherry picked from commit e7eb93b, part of #162)
Signed-off-by: u33549 <[email protected]>

* Fix the rolling CI build against nav2 main (#163)

* Use the ROS ompl that nav2 main builds against in CI

The CI dropped ros-rolling-ompl for the system libompl-dev 1.6 because
nav2 main was once written against the older ReedsShepp API. nav2 now
builds with the ROS ompl 2.x (and links its ompl::ompl target), so keep
it and drop libompl-dev.


* Include the ament_index_cpp header the navigator uses

coverage_navigator.cpp and its test call get_package_share_directory
but relied on nav2 headers to pull it in, which nav2 main no longer
does. Include it and declare the dependency.


* Build the navigator test's tf objects with the nav2 factories

Newer tf2_ros dropped the CreateTimerROS and TransformListener
constructors the test used. nav2::create_transform_buffer and
create_transform_listener pick the right ones for the installed rclcpp.


---------

Adapted for lyrical: the navigator's ament_index_cpp include and dependency are already on lyrical, so only the CI ompl change and the navigator test's tf2 factories apply. Lyrical's CI image, distro and launch_testing shim are kept.

(cherry picked from commit eb43d10)
Signed-off-by: u33549 <[email protected]>

* Build the lyrical CI against nav2's lyrical branch

nav2 main changed its TF API in ros-navigation/navigation2#6651
(FeedbackUtils::tf became tf_manager and tf2_factories.hpp is gone), so
the navigator no longer builds against it. Lyrical follows nav2's lyrical
branch, which keeps the API this package uses.

Signed-off-by: u33549 <[email protected]>

* Set headers on generated coverage path poses (#159)

* Set headers on generated coverage path poses


* Set pose headers in the PathState converter


---------

Adapted for lyrical: keeps lyrical's existing SWATH densify check in TesttoNavPathMsg.

(cherry picked from commit c4c1225)
Signed-off-by: Bram Odrosslij <[email protected]>
Signed-off-by: u33549 <[email protected]>

---------

Signed-off-by: u33549 <[email protected]>
Signed-off-by: Bram Odrosslij <[email protected]>
Co-authored-by: Bram O <[email protected]>
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.

2 participants