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

[CostmapTopicCollisionChecker] Alternative constructor with footprint string #4926

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

doisyg
Copy link
Contributor

@doisyg doisyg commented Feb 17, 2025


Basic Info

Info Please fill out this column
Ticket(s) this addresses
Primary OS tested on Ubuntu
Robotic platform tested on Dexory Robot
Does this PR contain AI generated software?

Description of contribution in a few bullet points

I needed to use the CostmapTopicCollisionChecker but with a custom footprint, NOT one served from a topic with FootprintSubscriber. So I added a constructor building a footpring from a string (same format as everywhere else).

Description of documentation updates required from your changes

Don't see any.

Description of how this change was tested

Dexory robot for a few days.


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

@SteveMacenski
Copy link
Member

All the system tests failed, so rerunning CI to see if that fixes it

Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

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

Otherwise, just waiting to make sure CI passes that it wasn't just a fluke (but now I"m actually wondering if all the CI tests failed due to this issue I mention below)

@@ -90,10 +99,11 @@ class CostmapTopicCollisionChecker
// Name used for logging
std::string name_;
CostmapSubscriber & costmap_sub_;
FootprintSubscriber & footprint_sub_;
std::shared_ptr<FootprintSubscriber> footprint_sub_;
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason for this change? The sub itself could be the memory address of a shared pointer, so adding it to another shared pointer would give 2 different shared pointers control over the memory to delete when the reference counter goes to zero. I think this could cause exit-time seg faults to some users of this code in that case, since you cannot delete previously deleted memory.

So, I think this should be reverted (unless there's a technical reason for this change?)

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