slam_toolbox icon indicating copy to clipboard operation
slam_toolbox copied to clipboard

RViz crashes when attempting map merging

Open kokkalisko opened this issue 3 years ago • 3 comments

Required Info:

  • Operating System:
    • Ubuntu 20.04
  • Installation type:
    • binaries
  • ROS Version
    • ROS2, galactic

Steps to reproduce issue

Load robot, open RViz2 and run slam_toolbox in localization or SLAM modes. Run merge_maps_kinematic node in another terminal and add SlamToolboxPlugin panel.

Expected behavior

Add a submap given its filename and/or merge the submaps using RViz.

Actual behavior

RViz2 crashes as soon as the panel is open (when merge_maps_kinematic node is already) open.

Additional information

It can be seen in the source code that the plugin calls non-existing services for map merging i.e. /map_merging/add_submap and /map_merging/merge_submaps.

Warning messages when merge_maps_kinematic is initially opened:

[planner_server-7] [WARN] [1634830879.212986482] [global_costmap.global_costmap]: New publisher discovered on topic '/map', offering incompatible QoS. No messages will be sent to it. Last incompatible policy: DURABILITY_QOS_POLICY
[rviz2-5] [WARN] [1634830879.222376955] [rviz2]: New publisher discovered on topic '/map', offering incompatible QoS. No messages will be sent to it. Last incompatible policy: DURABILITY_QOS_POLICY
[merge_maps_kinematic-1] [WARN] [1634830879.236825783] [slam_toolbox]: New subscription discovered on topic '/map', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: DURABILITY_QOS_POLICY

kokkalisko avatar Oct 21 '21 15:10 kokkalisko

PRs are appreciated, but yes, rviz and slam toolbox manual offline tooling are expected to be setup at the same time. These are not online tools meant to be stable during fault tolerant situations.

SteveMacenski avatar Oct 22 '21 18:10 SteveMacenski

@SteveMacenski Ok I may create a PR for this since I am working on it already. However, I wanted to use these map merging RViz feature to understand the process of map merging during online. I doubt that it exists, but any examples or pieces of code from other repositories (or any help in general) on the map merging process would help me understand and offer a fix also to this issue.

kokkalisko avatar Oct 23 '21 17:10 kokkalisko

OK, sounds good, I'd appreciate that! I'd make sure to put in alot of logging to see what's going on where and resolve based on that. GDB is the better bet, but recompiling rviz with GDB sounds like a pain in the butt, but it probably the more "right" solution (though I'd try lots of logging first for my own sanity).

SteveMacenski avatar Oct 25 '21 18:10 SteveMacenski