Re: Problem fusing LiDAR and depth (hector_slam)
Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Problem-fusing-LiDAR-and-depth-hector-slam-tp4115p4122.html
Hi,
so you are not using hector_mapping anymore, right? The State class should publish TF between /odom and /base_footprint, not /map to /base_footprint. You would want to send only one time the TF, not one time just orientation, then another time just position... merge orientation of IMU and pose from rgbd_odometry in one callback (like an approximate synchronizer). When another node publishes odometry TF, you should set "publish_tf" to false for rgbd_odometry node. Global "frame_id" should be base_footprint (the root of the robot).
For the map disappearing, it is because rtabmap would have received an odometry with covariance over 9999, which is published only when lost and if Odom/ResetCountdown is set (which is set to 1 here) or "publish_null_when_lost" is set. Currently rtabmap seems connected to /rtabmap/odom topic coming from rgbd_odometry (which is default), but to use TF for odometry from your IMUEstimate node, set "odom_frame_id" to odom and /rtabmap/odom topic will be ignored.
Note that with robot_localization package, you can also do fusion of only position from an odometry topic and only orientation from IMU topic, similar to
sensor_fusion.launch example.
In your current setup, only one scan per node will be saved. You may want to use laser_assembler like in the
link of my previous post. Unless you use the laser_assembler approach
publishing assembled scans at 1 or 2 Hz, you may not want to set Rtabmap/DetectionRate to 0 (to avoid large memory and computation usage).
cheers,
Mathieu