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