turtlebot / turtlebot4

Turtlebot4 common packages.
Apache License 2.0
101 stars 45 forks source link

Map cannot be saved #253

Closed joergwunsch closed 1 year ago

joergwunsch commented 1 year ago

Please provide the following information:

To Reproduce Followed the instructions from the tutorial to start the SLAM algorithm, RViz2 shows something. Tried in a different terminal to save the map, consistently failed, even across robot reboots. Failure was independent of whether the mapping was run on the Raspberry Pi or on the host Ubuntu. All this used to work before, but now it is consistently failing, without more explanation than shown above.

hilary-luo commented 1 year ago

@joergwunsch My understanding is that you are using namespacing. Please see details here about a current bug in the slam toolbox https://github.com/turtlebot/turtlebot4/issues/231. If indeed this is the issue that you are running into you can either use the work around listed there, or if you have time I would encourage you to test out the fix https://github.com/SteveMacenski/slam_toolbox/pull/613 and then comment on the PR whether or not it worked. Once there is confirmation that the fix works then it can be merged in.

joergwunsch commented 1 year ago

Well, all I have been doing was to follow the tutorial: https://turtlebot.github.io/turtlebot4-user-manual/tutorials/generate_map.html#save-the-map That commandline uses namespace – I just copy&pasted it.

joergwunsch commented 1 year ago

I can confirm, removing -r __ns:=/namespace from the commandline can successfully save the map. Maybe it should just be omitted from the tutorial then?

hilary-luo commented 1 year ago

@joergwunsch that makes sense, if you are not using namespacing you should remove that part of the command. I see what you mean that part of the tutorial does not account for namespacing while other parts do. I have made note of this for a future update to offer clarification.

sdobbelaere commented 1 year ago

I also ran into the same trap with the copy/pasting of the command.
Since the entire tutorial kinda avoids using namespaces, this command really shouldn't contain that param. Or at the very least provide some more clarity in the name of consistency.

hilary-luo commented 1 year ago

@sdobbelaere There is a PR for this change already here