Rosanswers logo

If I understood it correctly, in RTABMap ROS tutorials mapping and autonomous navigation is a two step process. First mapping is done by driving robot manually and afterwards autonomous navigation can be accomplished using the previously created map.

Is is possible to make my robot autonomously navigate the unknown environment and simultaneously map the area?

I'm running Ubuntu 16.04.4 LTS on an x86 with ROS Kinetic.

Thank you!

Originally posted by Dox on ROS Answers with karma: 36 on 2018-04-05

Post score: 0


1 Answer 1


Rosanswers logo

In the tutorial, the example was to map, then do localization like the official turtlebot navigation tutorial using gmapping/amcl. However, like in the original tutorial, you can still send poses to navigation system (move_base) during the mapping phase. To automatically explore the environment, you would have to integrate an exploration package like frontier_exploration, hector_exploration_planner or explore_lite using the map published by rtabmap and remapping the goals sent by the exploration to move_base.


Originally posted by matlabbe with karma: 6409 on 2018-04-06

This answer was ACCEPTED on the original site

Post score: 4

Original comments

Comment by Dox on 2018-04-06:
@matlabbe Thanks for a quick response. Besides already mentioned explorers I've found cam_exploration. It is stated that it works along rtabmap_ros package. Is there any particular package that you would recommend using with RTABMap?

Comment by matlabbe on 2018-04-06:
Thx to link cam_exploration. If an exploration package is dependent of TF and a 2d occupancy grid map, then it is compatible with rtabmap and many other slam packages. I have limited experience myself with these exploration packages, so I cannot tell which is the best.

Comment by Dox on 2018-04-07:
Today I tried to publish 2D nav goal in rviz but got this

[ERROR] [1523105102.467464668]: Cannot connect to move_base action server!

RTABMap did start successfully. I'm testing with this launch file.I also consulted this. Any thoughts?

Comment by matlabbe on 2018-04-09:
Make sure the properties of the 2D nav goal button in RVIZ is set to correct goal topic of move_base. See http://wiki.ros.org/navigation/Tutorials/Using%20rviz%20with%20the%20Navigation%20Stack, looks like in your launch file that the goal topic would be /planner/move_base_simple/goal

Comment by Dox on 2018-04-09:
Great, I did manage to do it, and also with the help of this now I can see:

Planning: Path successfully created (size=1)

but robot still wouldn't move. Could it be that remapping from /planner/cmd_vel to rosaria/cmd_vel is needed? I'm not able to test it atm...

Comment by matlabbe on 2018-04-10:
Yes, you should remap cmd_vel from move_base to rosaria's cmd_vel. You can do rostopic echo /planner/cmd_vel to see if move_base is actually sending commands

Comment by Dox on 2018-04-10:
Tnx! Finally, the robot is navigating! :) If I would like to do it remotely, do you know if move_base can also be remotely run with rtabmap?

Comment by matlabbe on 2018-04-10:
Yes, http://wiki.ros.org/rtabmap_ros/Tutorials/RemoteMapping, though you will have network latency issues. At least keeping move_base on the robot would be more safe.

Comment by Dox on 2018-04-12:
Ok. Are azimuth launch files still relevant if I want to use them as a reference, combining az3_nav.launch and az3_remote_mapping_* ?

Comment by matlabbe on 2018-04-12:
az3_nav.launch is the most recent. I would split az3_nav.launch for robot and client, then check to throttle/compress image topics in a way similar to az3_remote_mapping_* launch files.

Comment by Dox on 2018-04-13:
@matlabbe I've managed to run it, but mapped environment without running in localization mode afterward looks like this. Is there a way to improve it? In Rviz I also noticed that frame rate drops from 28 at start to 1 as map grows and that drastically slows my screen..

Comment by matlabbe on 2018-04-13:
How do you display the point clouds? Is the rtabmap_ros/MapCloud display? If so, increase decimation or the voxel size of the plugin to show less points.

Comment by Dox on 2018-04-16:
Yes MapCloud display. After increasing the mentioned parameters, the screen slowness is gone, but point cloud still has many errors. Should I try modifying the values of RTAB-Map's parameters for Kinect + Odometry + Fake 2D laser setup? Or recalibrate my Kinect? I'm using freenect_stack.

Comment by matlabbe on 2018-04-16:
Maybe it would be better to ask a new question with screenshot of the errors + launch parameters. This can be caused by wrong TF transform between robot and camera, odometry drift or depth scale error (uncalibrated camera).

Comment by Dox on 2018-04-18:
Ok, big thanks for all your help! I'll try to find the cause and rectify it. In case I need some more advice I'll open a new question.

Comment by Delbina on 2021-07-20:
Dear Dox,

i also want to implement mapping and localization based on rtabmap at the same time. but i am confused what should i do. now if we should use autonomous exploration, in which mode we should run rtabmap? mapping mode or localization mode?? how we can have localization and mapping at the same time, while doing autonomus navigation? do you have any document or github that shows the procedure? Thanks a lot

Comment by Delbina on 2021-07-28:
Dear @matlabbe, what about if we want the robot to do mapping and at the same time doing navigation for reaching a specific goal. I intend the vehicle to go from A point to B point autonomously, while do simultaneously mapping. what about this situation?!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.