RTAM MAP NAV2 problem

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

RTAM MAP NAV2 problem

GGYU
Dear matlabbe
 

RTAB-Map does not create a MAP file and instead receives the /map topic and immediately performs navigation. However, NAV2's default settings require map.pgm and .yaml files. So, I put any map file and run NAV2, but when I look at the NAV2 parameters, the AMCL-related parameters are being applied, but the path is not smooth, and the robot moves strangely. I'm not sure how to properly set up NAV2.

How do others run NAV2?

To summarize my questions:

Is there a way to run NAV2 using the /map topic from RTAB-Map? Or do people just run NAV2 with any map .yaml file like I did?
I know that RTAB-Map localization and AMCL are different. However, I want to correct AMCL-based localization and also incorporate corrections from RTAB-Map’s camera loop closure.
The TurtleBot3 example simply runs navigation using nav2_bringup. How should I properly configure NAV2?
Reply | Threaded
Open this post in threaded view
|

Re: RTAM MAP NAV2 problem

matlabbe
Administrator
GGYU wrote
However, NAV2's default settings require map.pgm and .yaml files.
These files are used by map_server node. A map_server node would publish a map topic.

In the basic examples that we provide of nav2+rtabmap integration, we don't use AMCL and map_server, rtabmap publishes directly the map topic to global costmap and localization through TF map->odom.

If you want to run both AMCL and rtabmap at the same time, you will need to disable TF publisher from one or both (you can use publish_tf:=false for rtabmap node) and combine their output somehow (/rtabmap/localization_pose is published in localization mode after each rtabmap's update, containing the odom pose + slam correction) to republish the combined map->odom TF. AMCL could subscribe to rtabmap's map topic directly instead of using map_server.

You should not have to do it, but you can export the map from rtabmap as yaml and pgm with map_server's map_saver node.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: RTAM MAP NAV2 problem

GGYU
 I really appreciate your clear and detailed explanation.
Reply | Threaded
Open this post in threaded view
|

Re: RTAM MAP NAV2 problem

GGYU
In reply to this post by matlabbe
Dear Matlabbe

I have one more question.

When integrating RTAB-Map with the Nav2 stack, is it okay to use nav2_bringup's navigation_launch.py?

Also, do I need to explicitly specify the map .pgm and .yaml files using the map server and map saver?

What I want to do is run Nav2 after executing RTAB-Map SLAM, so I removed all the map saver, map server, and AMCL parts from the params.yaml file. However, when I launched nav2_bringup's navigation_launch.py, I encountered a BT Navigator symbol error.
Reply | Threaded
Open this post in threaded view
|

Re: RTAM MAP NAV2 problem

matlabbe
Administrator
I was looking at this particular example: https://github.com/introlab/rtabmap_ros/blob/ros2/rtabmap_demos/launch/turtlebot3/turtlebot3_sim_rgbd_demo.launch.py

It seems we launch nav2_bringup's navigation_launch.py with our own param file: https://github.com/introlab/rtabmap_ros/blob/ros2/rtabmap_demos/params/turtlebot3_rgbd_nav2_params.yaml

The AMCL node may have been removed from the original turtlebot3 nav2 config, though we still kept map_server here, but it is not used.

"symbol error" error sounds like a missing required module in the nav2 config, not sure if it is related to map_server or amcl.