ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.3k stars 1.2k forks source link

[nav2_costmap_2s]: free correctly the memory in the InflationLayer #4424

Closed facontidavide closed 3 weeks ago

facontidavide commented 3 weeks ago

Basic Info

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

Description of contribution in a few bullet points

When using very large maps ( we are talking about maps in the order of 200 Mb), we noticed that the InflationLayer would consume a VERY large amount of memory.

After investigation, we realized that:

See the difference before and after:

Before

2024-06-12_11-27

After

2024-06-12_11-31

The impact in terms of performance (CPU usage) should be negligible

Description of documentation updates required from your changes

None


Future work that may be required in bullet points

None

For Maintainers: