Unable to build RTAB map using 2d rotating LiDAR [closed]
Hi,
I'm using a rotating 2d lidar and then using laser assembler package to get 3d point cloud. Video
I can see the point cloud but when I used in RTAB no map frame is generated neither it is able to map the data. Here is my launch file
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<!-- Mapping -->
<group ns="rtabmap">
<node pkg="rtabmap_ros" type="rtabmap" name="rtabmap">
<param name="subscribe_depth" type="bool" value="false"/>
<param name="subscribe_rgb" type="bool" value="false"/>
<param name="subscribe_scan_cloud" type="bool" value="true"/>
<remap from="scan_cloud" to="/laser_pointcloud"/> <!-- sensor_msgs/PointCloud2 -->
<remap from="odom" to="/odom"/> <!-- odometry from wheel encoders + IMU fusion -->
<!-- output -->
<remap from="grid_map" to="/map"/>
</node>
<!-- <node name="rviz" pkg="rviz" type="rviz" args="-d $(find rtabmap_ros)/launch/config/turtlebot_navigation.rviz"/> -->
</group>
</launch>
I'm not sure if it is because of the rotating laser transform to the base link is being received properly or not. You can see the tf tree as no map frame is published Frames
Can anyone help me?
[Updated]
If
/map -> /odom
frame is not published, it means rtabmap is not started because it didn't receive topics yet. Do you have warnings on terminal if you set<node pkg="rtabmap_ros" type="rtabmap" name="rtabmap" output="screen">
?@matlabbe Here is the Warning message as updated above
You can also look at my bag file. The issue what I think is since it is doing a vertical scan so it is not getting enough point cloud data to produce the 3d map. So eventually some accumulated laser scan has to be provided. I tried the same bag file with cartographer and there is a parameter in Cartographer to provide accumulated laser scan data. So when I set it to 40, I can get a 3d map. BAG
Thanks for your reply. Yeah, it works.No more warnings. Just wanted to know would it be ideal to make the /laser_pointcloud and /odom published at the same rate? I updated the rate figure above and changed the queue_size to 50.
And just last question, which point_cloud data in rviz you subscribed to get that map. I mean there are many point_cloud data and I'm getting this as updated above in the main question.
You could have kept it to 500Hz, but more time/memory would be used to manage the synchronization queue. My concern is if the queue could eventually have 500 scans at the same time, not sure if message_filters discard automatically older scan msgs if all 500 of odom are more recent. Maybe it is negligible too. Another way is to subscribe to TF for odometry instead, with
_odom_frame_id:="odom" _odom_tf_angular_variance:=0.0005 _odom_tf_angular_variance:=0.0001
For your last question, you seem using
cloud_map
topic, which is voxelized at 5 cm by default. I was showing the one built fromrtabmap_ros/MapCloud
rviz plugin (available only with latest version and check "Cloud from scan" checkbox).Yeah, will try. But the plots look eventually fine. Thanx a lot for your help
Hi, @tsdk00 could you send me your bag file? (it's not downloadable now)