Skip to content

Add boost padding - #114

Merged
renan028 merged 9 commits into
develfrom
rs/padding
Aug 19, 2025
Merged

Add boost padding#114
renan028 merged 9 commits into
develfrom
rs/padding

Conversation

@renan028

@renan028 renan028 commented Aug 1, 2025

Copy link
Copy Markdown

Use boost library to compute correct polyline offset.
When we use footprint_padding of 0.06 (6cm), for instance, the old behavior adds around 2cm only, and the polygon is distorted:

Screenshot from 2025-08-01 16-34-30 Screenshot from 2025-08-01 16-34-47

After changing to boost:
image

@renan028
renan028 marked this pull request as ready for review August 1, 2025 07:38

@vsamy vsamy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Last time I did this it was working fine

https://github.com/rapyuta-robotics/rr_perception/blob/devel/experimental%2Frr_pcl_ros%2Fsrc%2Ffootprint_cropper.cpp#L291-L291

Do we need a new dependency just for polygon inflation?

@renan028

renan028 commented Aug 5, 2025

Copy link
Copy Markdown
Author

Last time I did this it was working fine

https://github.com/rapyuta-robotics/rr_perception/blob/devel/experimental%2Frr_pcl_ros%2Fsrc%2Ffootprint_cropper.cpp#L291-L291

Do we need a new dependency just for polygon inflation?

I have checked some solutions like the one you proposed, but they all have some corner cases missing.
Usually when working with concave polygons, or when padding is large it degenerates.
I will try to use boost geometry, maybe there is something available there.

The library is very known though, with ~500 stars. And it looks more complete than boost. Maybe we can replace boost geometry in Nav by this one, if boost cannot handle the case.

@renan028

renan028 commented Aug 5, 2025

Copy link
Copy Markdown
Author

yes, boost looks pretty good:
image

I will update the PR with it.

And I can control to have sharp edges:
image

@renan028 renan028 changed the title Add cavalier padding Add boost padding Aug 5, 2025
@renan028
renan028 requested a review from Nisarg236 August 8, 2025 06:56
Comment thread costmap_2d/src/footprint.cpp Outdated
@renan028
renan028 requested a review from Nisarg236 August 18, 2025 08:22
@renan028
renan028 merged commit a57c1be into devel Aug 19, 2025
1 check passed
@renan028
renan028 deleted the rs/padding branch August 19, 2025 12:40
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.

3 participants