Issue Getting Map from Rtabmap
Posted by
Joel_A on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Issue-Getting-Map-from-Rtabmap-tp6068.html
Hi again, I decided not to post this in my previous thread because its not the same robot or setup, this time its a 3D lidar but it is the same problem as before. I've been getting some pretty maps vizualized in RVIZ by setting the decay time for the pointcloud2 topic high and using Rtabmap as an odometry node using my realsense camera and a velodyne lidar.
The image above is what I get after i'm done using it, it doesn't save any map in the database nor does it give me any errors about not receiving data or making sure I'm subscribed to certain topics. It seems to function fine but as just a very nice odometry node. Here is my launch file:
<launch>
<arg name="rgbd" default="false"/>
<arg name="pm" default="false"/>
<arg name="nodelet" default="false"/>
<group ns="camera">
<group if="$(arg nodelet)">
<node unless="$(arg rgbd)" pkg="nodelet" type="nodelet" name="rgbd_odometry" args="load rtabmap_ros/rbgd_odometry camera_nodelet_manager" output="screen">
<remap from="depth/image" to="/camera/aligned_depth_to_color/image_raw"/>
<remap from="rgb/camera_info" to="/camera/color/camera_info"/>
<remap from="rgb/image" to="/camera/color/image_raw"/>
<param name="subscribe_rgbd" type="bool" value="true"/>
<param name="frame_id" type="string" value="base_link"/>
<param name="Odom/GuessMotion" type="string" value="true"/>
<param name="Odom/ResetCountdown" type="string" value="1"/>
</node>
</group>
<group unless="$(arg nodelet)">
<node unless="$(arg rgbd)" pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry" output="screen">
<remap from="depth/image" to="/camera/aligned_depth_to_color/image_raw"/>
<remap from="rgb/camera_info" to="/camera/color/camera_info"/>
<remap from="rgb/image" to="/camera/color/image_raw"/>
<param name="frame_id" type="string" value="base_link"/>
<param name="Odom/GuessMotion" type="string" value="true"/>
<param name="Odom/ResetCountdown" type="string" value="1"/>
<!-- 0=Frame-to-Map (F2M) 1=Frame-to-Frame (F2F) -->
<param name="Odom/Strategy" value="0"/>
<!-- Correspondences: 0=Features Matching, 1=Optical Flow -->
<param name="Vis/CorType" value="0"/>
</node>
<param name="GFTT/MinDistance" type="string" value="2"/> <!-- default 5 pixels -->
<!-- maximum features map size, default 2000 -->
<param name="OdomF2M/MaxSize" type="string" value="5000"/>
<!-- maximum features extracted by image, default 3000 -->
<param name="Vis/MaxFeatures" type="string" value="1000"/>
</group>
</group>
<node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
<param name="frame_id" type="string" value="base_link"/>
<param name="subscribe_depth" type="bool" value="false"/>
<param name="subscribe_rgbd" type="bool" value="false"/>
<param name="subscribe_scan" type="bool" value="false"/>
<param name="subscribe_scan_cloud" type="bool" value="true"/>
<remap from="odom" to="/odom1"/>
<remap from="scan_cloud" to="/velodyne_points"/>
<remap from="depth/image" to="/camera/aligned_depth_to_color/image_raw"/>
<remap from="rgb/camera_info" to="/camera/color/camera_info"/>
<remap from="rgb/image" to="/camera/color/image_raw"/>
<param name="queue_size" type="int" value="10"/>
<param name="approx_sync" type="bool" value="false"/>
<!-- RTAB-Map's parameters -->
<param name="RGBD/AngularUpdate" type="string" value="0.01"/>
<param name="RGBD/LinearUpdate" type="string" value="0.01"/>
<param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>
</node>
</launch>
Any help would be greatly appreciated!
Oh real quick edit! The reason I remapped the odom in the launch file above to /odom1 near the end there is because I am using robot_localization package to take rtabmap's visual odometry and fuse it with a nice IMU I have and it spits out that as odom1 so it doesn't conflict with rtabmap's /odom.