Skip to content

Fix nav2_smac_planner robin_hood Windows build - #92

Merged
traversaro merged 1 commit into
RoboStack:mainfrom
Tobias-Fischer:codex/nav2-smac-planner-robinhood-probe
Jul 21, 2026
Merged

Fix nav2_smac_planner robin_hood Windows build#92
traversaro merged 1 commit into
RoboStack:mainfrom
Tobias-Fischer:codex/nav2-smac-planner-robinhood-probe

Conversation

@Tobias-Fischer

@Tobias-Fischer Tobias-Fischer commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

This updates the kilted nav2_smac_planner Windows patch after the upstream Navigation2 review feedback on ros-navigation/navigation2#6276.

The first CI probe showed that removing RoboStack's std::unordered_map fallback exposed the actual Windows failure: MSVC could not parse the vendored robin_hood.h macro because a // NOLINT comment followed a macro-continuation backslash.

This PR now keeps robin_hood::unordered_node_map on Windows and applies the same macro-continuation fix proposed upstream, while keeping the nav2_smac_planner build-number bump so CI rebuilds the package.

Validation:

  • Patch applies cleanly against the exact kilted release tag used by CI: release/kilted/nav2_smac_planner/1.4.2-1.
  • No local build was run.

@Tobias-Fischer

Copy link
Copy Markdown
Contributor Author

This probe did what we needed:

  • Linux and macOS passed.
  • Windows failed while compiling a_star.cpp.
  • The first MSVC errors are in the vendored robin_hood.h macro body:
robin_hood.h(151,17): error C2059: syntax error: 'return'
robin_hood.h(152,67): error C2059: syntax error: 'constant'
robin_hood.h(153,13): error C2059: syntax error: '}'
robin_hood.h(153,13): error C2143: syntax error: missing ';' before '}'

The cause appears to be the // NOLINT comment after a macro-continuation backslash in ROBIN_HOOD_COUNT_TRAILING_ZEROES. I amended the upstream Navigation2 PR to fix that macro continuation instead of switching Windows to std::unordered_map: ros-navigation/navigation2#6276

Keep the Windows rebuild for nav2_smac_planner, but include the actual MSVC fix identified by the probe: move the NOLINT suppression in the vendored robin_hood.h macro body off the macro-continuation backslash.

This preserves robin_hood::unordered_node_map on Windows while avoiding the MSVC syntax errors seen when compiling a_star.cpp. The build number bump remains to force a rebuild.
@Tobias-Fischer
Tobias-Fischer force-pushed the codex/nav2-smac-planner-robinhood-probe branch from c6509db to 742ed39 Compare July 20, 2026 22:37
@Tobias-Fischer Tobias-Fischer changed the title Probe nav2_smac_planner Windows robin_hood build Fix nav2_smac_planner robin_hood Windows build Jul 20, 2026
@Tobias-Fischer

Copy link
Copy Markdown
Contributor Author

Can we merge this @traversaro or could there be ABI issues?

@traversaro

Copy link
Copy Markdown
Member

Can we merge this @traversaro or could there be ABI issues?

The header is installed, by the library is actually a plugin that is loaded at runtime, so I think it is actually safe to merge.

@traversaro
traversaro merged commit f19ea93 into RoboStack:main Jul 21, 2026
5 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.

2 participants