-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Changed logic for when to resize layered costmap in static layer #792
Conversation
-Now the master layered costmap should no longer get resized when isSizeLocked returns true
The issue solved by this pull request has also been solved in #795. Please advice as to the steps to get either of these pull requests approved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic LGTM. Let's fix up the formatting though. I would suggest
if (!layered_costmap_->isRolling() &&
!layered_costmap_->isSizeLocked() &&
(master->getSizeInCellsX() != size_x ||
master->getSizeInCellsY() != size_y ||
master->getResolution() != new_map->info.resolution ||
master->getOriginX() != new_map->info.origin.position.x ||
master->getOriginY() != new_map->info.origin.position.y))
aaronhoy, thank you for suggesting corrections, appreciate the pointers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Changed logic for when to resize layered costmap in static layer -Now the master layered costmap should no longer get resized when isSizeLocked returns true * Fixing format for if loop
Hi, navigation/costmap_2d/plugins/static_layer.cpp Lines 182 to 185 in d99320a
To test this theory, I set it to false, and my costmap updated correctly. The log file shown below (taken with the
The log file is here:
The log file after setting the parameter to false is shown below:
I'm wondering if anything can be done to fix this issue - I'm assuming setting that parameter to false is not a good long-term solution for those people who want the size locked. I do realize that this is really only an issue for doing mapping since in localization, the map is static from the getgo and is not changing. Maybe the correct solution is just to use a rolling-window for my global costmap. EDIT It seems that this "temporary fix" of changing the size_locked parameter to false actually breaks the system when I want to load a pre-made map such as for localization purposes. The global costmap does not seem to load at all. In order for me to get it to load, I have to launch the map server, kill it, and then launch it again (which effectively publishes the map twice), which is not ideal. |
…yer (ros-planning#792)" This reverts commit f2d12a9.
thank you very much. I will flow your advice to modify my code, and I hope it will work |
* clear area in layer for melodic * Added publishZeroVelocity() before starting planner (ros-planning#751) Edit for Issue ros-planning#750 * Changed logic for when to resize layered costmap in static layer (ros-planning#792) * Changed logic for when to resize layered costmap in static layer -Now the master layered costmap should no longer get resized when isSizeLocked returns true * Fixing format for if loop * Provide different negative values for unknown and out-of-map costs (ros-planning#833) * Add force_updating and affected_maps parameters to tailor clear costmaps recovey (ros-planning#838) behavior * Costmap_2d plugin universal parameters and pre-hydro warnings (ros-planning#738) * Comment and description clarification * Renamed resetOldParameters to loadOldParameters * Upscaled pre-hydro parameter info message to warning and added costmap-name * Warn user when static_map or map_type is set but not used while plugins are used * Added function that copies parent parameters inside each layer (makes it possible to set a global inflation_radius) * use parameter magic * Fixes ros-planning#782 (ros-planning#892) * Drop Parameter Magic (ros-planning#893) * Fix typo in amcl_laser model header (ros-planning#918) * Cherry pick ros-planning#914 (ros-planning#919) * update changelogs * 1.16.3 Co-authored-by: Steven Macenski <[email protected]> Co-authored-by: SUNIL SULANIA <[email protected]> Co-authored-by: David V. Lu!! <[email protected]> Co-authored-by: Jorge Santos Simón <[email protected]> Co-authored-by: Martin Ganeff <[email protected]> Co-authored-by: Hadi Tabatabaee <[email protected]> Co-authored-by: Michael Ferguson <[email protected]>
-Now the master layered costmap should no longer get resized by static layer when
isSizeLocked returns true
fixes #768