Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add support for Boost >= 1.76 #27

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

esteve
Copy link
Contributor

@esteve esteve commented Jan 27, 2025

Description

Boost.Geometry removed the convex_hull::graham_andrew strategy (see https://www.boost.org/doc/libs/1_87_0/libs/geometry/doc/html/geometry/release_notes.html#geometry.release_notes.boost_1_76)

This PR has an alternate code path to support both Boost.Geometry < 1.76 (for Ubuntu 22.04, ROS Humble and Iron) and Boost.Geometry >= 1.76 (for Ubuntu 24.04, ROS Jazzy)

How was this PR tested?

Notes for reviewers

None.

Effects on system behavior

None.

Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>
Copy link

github-actions bot commented Jan 27, 2025

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@esteve
Copy link
Contributor Author

esteve commented Jan 27, 2025

@JianKangEgon @mitsudome-r @youtalk This is a demonstration for how we can support multiple versions of Boost (via compile definitions and CMake) without having to create a separate branch, which increases maintenance work much more. I've had a look at how to port existing code to Boost >= 1.76, but couldn't find anything straightforward, though I'm sure it's possible, I'm not familiar with the current codebase in autoware_utils.

Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>
@Timple
Copy link

Timple commented Mar 4, 2025

Random bystander here. But this looks nice!

Much better than the multiple branches approach. As that will probably introduce mergebots and a flood of pull-requests and notifications.

I too ran into this issue with Boost. But I never proposed a fix as the boost documentation does not suggest a new alternative 🙁

#include <boost/geometry/strategies/agnostic/hull_graham_andrew.hpp>
#else
#error TODO: add support for Boost 1.76 or later (Ubuntu 24.04, ROS Jazzy)
Copy link

Choose a reason for hiding this comment

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

Due to the lack of boost documentation I've asked around:

Chatgpt recommends using the default strategy.
Perplexity suggests to use the robust cartesian strategy: auto robust_strategy = strategies::convex_hull::cartesian<>( strategies::side::side_robust<double, strategies::side::fp_equals_policy>());

Perhaps it's only a matter of verification 🙂.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants