Trouble localising with RTAB-Map
I have recorded a map using an Intel Realsense camera(D435i) and RTAB-maps. This is the command I am using to record the map
roslaunch rtabmap_ros rtabmap.launch
rtabmap_args:="--delete_db_on_start"
depth_topic:=/camera/aligned_depth_to_color/image_raw
rgb_topic:=/camera/color/image_raw
camera_info_topic:=/camera/color/camera_info
It seems to have worked fine, I can load up the saved database file into the rtabmap GUI tool and see the 3d map.
Now I would like to localize and navigate using the recorded db. For this, I modified the launch file I used above to the following: https://docs.google.com/document/d/1g...
Here are what I think are the relevant bits:
<arg name="stereo" default="false"/>
<!-- Choose visualization -->
<arg name="rtabmapviz" default="false" />
<arg name="rviz" default="true" />
<!-- Localization-only mode -->
<arg name="localization" default="true"/>
<!-- RGB-D related topics -->
<arg name="rgb_topic" default="/camera/color/image_raw" />
<arg name="depth_topic" default="/camera/aligned_depth_to_color/image_raw" />
<arg name="camera_info_topic" default="/camera/color/camera_info" />
<arg name="depth_camera_info_topic" default="$(arg camera_info_topic)" />
<!-- Visualisation RTAB-Map -->
<node if="$(arg rtabmapviz)" pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" args="-d $(arg gui_cfg)" output="$(arg output)" launch-prefix="$(arg launch_prefix)">
<param if="$(arg stereo)" name="subscribe_depth" type="bool" value="false"/>
<param unless="$(arg stereo)" name="subscribe_depth" type="bool" value="true"/>
<param name="subscribe_rgbd" type="bool" value="$(arg subscribe_rgbd)"/>
<param name="subscribe_stereo" type="bool" value="$(arg stereo)"/>
<param name="subscribe_scan" type="bool" value="$(arg subscribe_scan)"/>
<param name="subscribe_scan_cloud" type="bool" value="$(arg subscribe_scan_cloud)"/>
<param if="$(arg visual_odometry)" name="subscribe_odom_info" type="bool" value="true"/>
<param if="$(arg icp_odometry)" name="subscribe_odom_info" type="bool" value="true"/>
<param name="frame_id" type="string" value="$(arg frame_id)"/>
<param name="odom_frame_id" type="string" value="$(arg odom_frame_id)"/>
<param name="wait_for_transform_duration" type="double" value="$(arg wait_for_transform)"/>
<param name="queue_size" type="int" value="$(arg queue_size)"/>
<param name="approx_sync" type="bool" value="$(arg approx_sync)"/>
<remap from="rgb/image" to="$(arg rgb_topic_relay)"/>
<remap from="depth/image" to="$(arg depth_topic_relay)"/>
<remap from="rgb/camera_info" to="$(arg camera_info_topic)"/>
<remap if="$(arg rgbd_sync)" from="rgbd_image" to="$(arg rgbd_topic)"/>
<remap unless="$(arg rgbd_sync)" from="rgbd_image" to="$(arg rgbd_topic)_relay"/>
<remap from="left/image_rect" to="$(arg left_image_topic_relay)"/>
<remap from="right/image_rect" to="$(arg right_image_topic_relay)"/>
<remap from="left/camera_info" to="$(arg left_camera_info_topic)"/>
<remap from="right/camera_info" to="$(arg right_camera_info_topic)"/>
<remap from="scan" to="$(arg scan_topic)"/>
<remap from="scan_cloud" to="$(arg scan_cloud_topic)"/>
<remap from="odom" to="$(arg odom_topic)"/>
<remap from="grid_map" to="/map"/>
</node>
I know RTAB-maps in localization mode only publishes the map after it has localized, so I drove the rover around a bit... and then a little more .... and then the entire route that was mapped. It still hasn't localized or published anything onto the /map topic.
How would I go about debugging this?
Please note that I am new to ROS, so it is entirely possible that I have missed a step somewhere.
Let me know if you need any more info about my setup.