ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

We cannot combine both, you have to generate the map either with the lidar, or from projecting the depth image. It is not trivial to do both to avoid scan ray tracing over obstacles on previous nodes added to map by the depth camera. A not super efficient approach would be to convert the scan to a point cloud, then combine that cloud with the one created from the depth camera (rtabmap_ros/point_cloud_aggregator nodelet could be used for that). You would then feed the combined point cloud (subscribe_scan_cloud) to rtabmap to create the grid. However, to have the same ray tracing effect with laser scan in 2D, you would have to enable 3D ray tracing, which is quite expensive in term of computation time (an OctoMap is created).

For that kind of setup, I generally use the scan for the grid map, and use the point cloud of the depth camera in the local costmap of move_base. That way, you have a nice global static map created from laser scans, then for security when moving around, the local costmap will make the robot avoid obstacles that lidar cannot see.