I have a turtlebot 2 with a kinect v1 and a rplidar a2.
When launching the rtabmap demo launch with kinect, the map is created and the obstacle avoidance works flawlessly, its amazing!
When switching to lidar, I removed the /scan part on the 3dsensor.launch of the turtlebot bringup and I'm able to generate a nice map, the lidar works nicely. But the problem is that obstacle avoidance is not working... if a new object (I use a garbage can) is in front of the robot path it will go straight and crash to it, while with the kinect only the robot replans in order to avoid the garbage can...
Hi,
Do you see the obstacle in rtabmap's occupancy grid map? If yes, you may check if move_base connects to new scan topic to update the local costmaps.
To help to debug, show the local and global costmaps in rviz. You will see if the global costmap matches the map of rtabmap, and also see if the local costmap sees the same obstacles.