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

Improve KeepoutFilter mask receiving performance #3420

Conversation

AlexeyMerzlyakov
Copy link
Collaborator

Do not copy OccupancyGrid mask -> to Costmap2D in mask receiving callback. Directly store and use OccupancyGrid mask instead.


Basic Info

Info Please fill out this column
Ticket(s) this addresses #3419
Primary OS tested on Ubuntu 22.04
Robotic platform tested on TB3 simulation, colcon test, local code coverage

Description of contribution in a few bullet points

  • Do not copy OccupancyGrid mask -> to Costmap2D. Directly store and use OccupancyGrid mask instead:
-  std::unique_ptr<Costmap2D> mask_costmap_;
+  nav_msgs::msg::OccupancyGrid::SharedPtr filter_mask_;
  • Add new unsigned char CostmapFilter::getMaskCost(OccupancyGrid::SharedPtr filter_mask, & mx, & my) routine to CostmapFilter, which will convert OccupancyGrid values to Costmap2D ones; and will be called each time, when we need to update master costmap cell in the rolling window during KeepoutFilter::process()
  • Other code to be changed to use OccupancyGrid instead of Costmap

Description of documentation updates required from your changes

  • No documentation changed required

Additional notes

For Maintainers:

  • Check that any new parameters added are updated in navigation.ros.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

@mergify
Copy link
Contributor

mergify bot commented Feb 21, 2023

This pull request is in conflict. Could you fix it @AlexeyMerzlyakov?

@SteveMacenski SteveMacenski merged commit 99f7ff6 into ros-navigation:main Feb 22, 2023
andrewlycas pushed a commit to StratomInc/navigation2 that referenced this pull request Feb 23, 2023
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