SteveMacenski / slam_toolbox

Slam Toolbox for lifelong mapping and localization in potentially massive maps with ROS
GNU Lesser General Public License v2.1
1.68k stars 525 forks source link

RViz crashes when attempting map merging #442

Open kokkalisko opened 3 years ago

kokkalisko commented 3 years ago

Required Info:

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
SteveMacenski commented 3 years ago

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.

kokkalisko commented 3 years ago

@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.

SteveMacenski commented 3 years ago

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).