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

update padFootprint() function #4832

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

Conversation

Nisarg236
Copy link

@Nisarg236 Nisarg236 commented Jan 8, 2025


Basic Info

Info Please fill out this column
Ticket(s) this addresses (add tickets here #1)
Primary OS tested on (Ubuntu, MacOS, Windows)
Robotic platform tested on (Steve's Robot, gazebo simulation of Tally, hardware turtlebot)
Does this PR contain AI generated software? (No; Yes and it is marked inline in the code)

Description of contribution in a few bullet points

  • Footprint gets distorted when the origin of the footprint is not at the centroid of the footprint.
  • Negative values of padding will shrink the footprint

Case 1: (0,0), (0,2), (2,2), (2,0)
image
Case 2: (10,10), (10,12), (12,12) , (12,10)
image

Description of documentation updates required from your changes


Future work that may be required in bullet points

For Maintainers:

  • Check that any new parameters added are updated in docs.nav2.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists

Copy link
Contributor

mergify bot commented Jan 8, 2025

@Nisarg236, your PR has failed to build. Please check CI outputs and resolve issues.
You may need to rebase or pull in main due to API changes (or your contribution genuinely fails).

@Nisarg236 Nisarg236 marked this pull request as draft January 8, 2025 06:20
@Nisarg236 Nisarg236 changed the title pad wrt centroid and shrink when padding is -ve update padFootprint() function Jan 8, 2025
Copy link
Contributor

mergify bot commented Jan 8, 2025

@Nisarg236, your PR has failed to build. Please check CI outputs and resolve issues.
You may need to rebase or pull in main due to API changes (or your contribution genuinely fails).

@SteveMacenski
Copy link
Member

Please fix build, linting, and DCO issues before we give this a review :-)

// pad footprint in place
for (unsigned int i = 0; i < footprint.size(); i++) {
geometry_msgs::msg::Point & pt = footprint[i];
pt.x += sign0(pt.x) * padding;
Copy link
Member

Choose a reason for hiding this comment

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

Please point out to me the error in the code here - I don't see any immediately.

Is the issue the case where you have a coordinate exactly at 0.0? 0.0 for the footprint would be the center of your robot, since that is the 0.0, 0.0 w.r.t. your base_link or base_footprint frame -- which is almost always the center of your robot or aligned with some axle that wouldn't then be a corner of a robot. That would point to me more an issue in your configuration

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@Nisarg236 should this be closed?

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