-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix for #1363 - use clearMap instead of reset to clear costmaps #1412
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
Conversation
mlherd
commented
Dec 5, 2019
- This PR is a fix for Planner and Controller server die with message - [PARTICIPANT Error] Type : sensor_msgs::msg::dds_::PointCloud2_ Not Registered #1363.
- Created clearMap function for each layer
- Use clearMap() instead of reset() to clear the costmaps because reset is costly since it does so many unnecessary stuff
|
I think this is going to start getting more involved than you bargained for. Why not remove the unsubscribe/resubscribe & replace with a flag in the callbacks to ignore incoming information or something? That seems to accomplish the same thing but without changing the structure of clear/resets |
|
@SteveMacenski Are you ok with these changes now? |
|
No, I really do not think this is the right way to go, I think it adds complexity and ambiguity. This issue you're trying to solve is not toggling the subscribers, that should be what is directly solved by replacing that behavior using the enabled characteristics |
I don't understand. I don't see a simpler way to do this other than deleting the old reset function and replacing with these new clearMap functions. Basically, @mlherd has taken the old function and deleted out the subscribe/unsubscribe and fixed a few bugs in the process. |
|
Lets follow the trail of how it worked before, and how its changed. In costmap 2d ROS we'd have a Then if we look into a specific layer, lets say the static layer, the reset method resets the subscribers undeclares and sets up the plugin again. Now in this PR, we replace In the static layer, the Ok. So now we have this In the voxel layer, we're renaming Finally, the tl;dr |
I agree. We should delete the old methods.
This is the part that is fixing some bugs. The old voxel layer was not resetting things cleanly. It bypassed the obstacle layer it was based on, preventing it from properly cleaning up. I believe the new behavior here is much more correct. I'd like to keep the new voxel layer implementation. I believe the old one was broken. I'm hearing we need to delete the old reset functions and rename the new clearMap functions as reset. This preserves the old interface. This will have the effect that reset only clears data structures, triggers a refresh of the costmap layer and no longer mucks with the topic subscription. |
Yes, just change the things happening in the existing methods.
I don't disagree it may be a benefit, but that may have been done on purpose in ROS1, I really just don't know. I think that needs to be stress tested.
Yes, but should be stress tested with clearing a bunch to make sure it doesnt have some weird artifacts happening |
@mlherd We tested this didn't we? Before the changes, the voxel layer wasn't getting cleared properly. Afterwards it worked, as I recall. I might be getting mixed up with obstacle layer though. Can you confirm? |
|
FYI: Making the change to alter the existing reset method instead of creating a new one will conflict with #1431. Be careful during the merge. |
Codecov Report
@@ Coverage Diff @@
## master #1412 +/- ##
==========================================
- Coverage 40.33% 40.08% -0.26%
==========================================
Files 229 229
Lines 11739 11731 -8
Branches 5057 5059 +2
==========================================
- Hits 4735 4702 -33
- Misses 3614 3644 +30
+ Partials 3390 3385 -5
Continue to review full report at Codecov.
|
|
Since you've had a chance to look at the changes, I'm going to rebase the branch to get it to pass CI. |
…er. -use clearMap instead of reset to clear the costmaps
…p a pure virtual function
* -fix for #1363. -created clearMap function for each layer. -use clearMap instead of reset to clear the costmaps * -function name change -infilation layer clearMap change -make resetMap a pure virtual function * Changing clearMaps back to reset * Fix uncrustify error * Fixing lifecycle transitions and tests now that reset doesn't act as a cleanup function * Updating this based on the approach taken in PR #1431 * Moving voxel_grid reset to the resetMaps function. * Missed adding resetMaps back to header. * Adding some comments to help navigate the inheritance hierarchy