-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
3732 costmap raw update msgs rebased (fixes github issues with PR #3948) #3965
3732 costmap raw update msgs rebased (fixes github issues with PR #3948) #3965
Conversation
Co-authored-by: Steve Macenski <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3965 +/- ##
==========================================
- Coverage 90.32% 90.08% -0.25%
==========================================
Files 415 415
Lines 18462 18513 +51
==========================================
+ Hits 16676 16677 +1
- Misses 1786 1836 +50 ☔ View full report in Codecov by Sentry. |
This is the continuation of work from #3948 |
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.
Otherwise, beyond tests, this looks good :-)
Overall looks good / done to me! The costmap publisher seems to be missing coverage in several entire functions though: https://app.codecov.io/gh/ros-planning/navigation2/pull/3965/blob/nav2_costmap_2d/src/costmap_2d_publisher.cpp The subscribers looks perfect though - a few lines missing but nothing major and all for error cases |
@SteveMacenski the lines that are missing coverage are not related to the functionality implemented in this issue (such as grid publishing and costmap service). I feel that lines were missing the coverage before my changes and the tests should be added in different PR |
OK - still heed the underscore comment above |
@emsko last thing to merge this: Add new feature to the migration guide! https://navigation.ros.org/migration/Iron.html Also, please do a run of the system and add some prints to make sure its working in production and not just sending the full costmap except on initialization (e.g. update callback is triggered at runtime mostly). Do you see any major computation changes in the runtime performance of the system? I suspect this change may actually be visible in metrics |
Any metrics changes? |
@SteveMacenski I have run the simulation with the default map for Turtlebot3 and unfortunately, I could not observe any noticeable change in performance.
Not navigating means that the robot was just standing still, navigating means that the robot was navigating to goals. These are the measurements for a composable node after collecting 100 samples for each case. Then with help from Alexey, I created a synthetic map of size 1000x1000 px, however, I was not able to collect the measurements because the simulation kept crashing on my laptop, but by just eyeballing the top command I would say that there still were not any observable changes. |
OK! Thanks for testing. Are you sure that the updates callbacks are being triggered in the subscription (and I guess by extension that they're being sent by the publisher)? The behavior server is the easiest testing point for this as that's an external user of the raw costmaps. I just want to make sure that functionally things are working as expected if there's no compute change. A few print statements can illustrate this easily. Then, happy to merge :-) |
I've checked the functionality with the ros2 topic echo command. It works as intended that is the full costmap is latched on the topic and only the updates are sent continuously. I also have implemented the helper node, as you suggested, that is converting the raw msgs into grid msgs to visualize it in rviz - it shows that everything is correct. From my analysis, I have found that it does not make sense to use the update msg for the local costmap. Due to the change of the origin while the robot is moving, the full costmap is sent and the updates are only sent when the robot is standing still. Also, the size of the full costmap is insignificantly larger than the update (3600 cells vs ~3300 cells). However, in the case of the global costmap, we are dealing with the decrease of the number of cells ~10 times (when running the simulation of the default turtlebot map/world, for larger maps the difference is larger). |
That makes sense for the local vs global - it is more geared towards global. Anything more we should do before merging? |
I have nothing to add at the moment. As for me, the changes can be merged at the current state. |
Great! Thanks so much for the contribution! This is really nice to have and probably not something I would have gotten to for a long, long time. Any interest in other projects potentially? We got a whole bunch of new tickets in the last couple of weeks or happy to hear about what you might be interested in working on / learning about to suggest something else 😄 |
Thank you, Steven, for all the comments and suggestions. |
…-navigation#3948) (ros-navigation#3965) * Adding CostmapUpdate msg * CostmapRawUpdate Publisher * remove test logs and typos * change data type to uint8 * pass unique ptr to raw costmap update publisher * adding subsriber for updates * -Werror=type-limits for update lower bounds checking * copy update msg * change code formatting * adding lock guards on costmap in footprint_collision_checker.cpp * adding lock guards for costmap subscriber clients * review suggestions implementation * fixing gtests errors * changes after second round of review * Update nav2_msgs/msg/CostmapUpdate.msg Co-authored-by: Steve Macenski <[email protected]> * Integration test for costmap subscriber draft * Change the current grid parameters in separate method * WIP int test * adding method in PublisherCostmap2D for OccupancyGridUpdate population * test full costmap and updates while generating results * Integration tests for subscribers * Expected number of msgs related to number of mapchanges in tests * next round of reviews * refactor names of Costmap2DPublisher * remove unnecessary costmap_received_ flag form CostmapSubscriber --------- Co-authored-by: Steve Macenski <[email protected]> Signed-off-by: gg <[email protected]>
…-navigation#3948) (ros-navigation#3965) * Adding CostmapUpdate msg * CostmapRawUpdate Publisher * remove test logs and typos * change data type to uint8 * pass unique ptr to raw costmap update publisher * adding subsriber for updates * -Werror=type-limits for update lower bounds checking * copy update msg * change code formatting * adding lock guards on costmap in footprint_collision_checker.cpp * adding lock guards for costmap subscriber clients * review suggestions implementation * fixing gtests errors * changes after second round of review * Update nav2_msgs/msg/CostmapUpdate.msg Co-authored-by: Steve Macenski <[email protected]> * Integration test for costmap subscriber draft * Change the current grid parameters in separate method * WIP int test * adding method in PublisherCostmap2D for OccupancyGridUpdate population * test full costmap and updates while generating results * Integration tests for subscribers * Expected number of msgs related to number of mapchanges in tests * next round of reviews * refactor names of Costmap2DPublisher * remove unnecessary costmap_received_ flag form CostmapSubscriber --------- Co-authored-by: Steve Macenski <[email protected]> Signed-off-by: enricosutera <[email protected]>
…-navigation#3948) (ros-navigation#3965) * Adding CostmapUpdate msg * CostmapRawUpdate Publisher * remove test logs and typos * change data type to uint8 * pass unique ptr to raw costmap update publisher * adding subsriber for updates * -Werror=type-limits for update lower bounds checking * copy update msg * change code formatting * adding lock guards on costmap in footprint_collision_checker.cpp * adding lock guards for costmap subscriber clients * review suggestions implementation * fixing gtests errors * changes after second round of review * Update nav2_msgs/msg/CostmapUpdate.msg Co-authored-by: Steve Macenski <[email protected]> * Integration test for costmap subscriber draft * Change the current grid parameters in separate method * WIP int test * adding method in PublisherCostmap2D for OccupancyGridUpdate population * test full costmap and updates while generating results * Integration tests for subscribers * Expected number of msgs related to number of mapchanges in tests * next round of reviews * refactor names of Costmap2DPublisher * remove unnecessary costmap_received_ flag form CostmapSubscriber --------- Co-authored-by: Steve Macenski <[email protected]>
…-navigation#3948) (ros-navigation#3965) * Adding CostmapUpdate msg * CostmapRawUpdate Publisher * remove test logs and typos * change data type to uint8 * pass unique ptr to raw costmap update publisher * adding subsriber for updates * -Werror=type-limits for update lower bounds checking * copy update msg * change code formatting * adding lock guards on costmap in footprint_collision_checker.cpp * adding lock guards for costmap subscriber clients * review suggestions implementation * fixing gtests errors * changes after second round of review * Update nav2_msgs/msg/CostmapUpdate.msg Co-authored-by: Steve Macenski <[email protected]> * Integration test for costmap subscriber draft * Change the current grid parameters in separate method * WIP int test * adding method in PublisherCostmap2D for OccupancyGridUpdate population * test full costmap and updates while generating results * Integration tests for subscribers * Expected number of msgs related to number of mapchanges in tests * next round of reviews * refactor names of Costmap2DPublisher * remove unnecessary costmap_received_ flag form CostmapSubscriber --------- Co-authored-by: Steve Macenski <[email protected]>
Basic Info
Description of contribution in a few bullet points
Description of documentation updates required from your changes
Future work that may be required in bullet points
For Maintainers: