7. ORB_SLAM2 Octomap Map Building

This example is implemented on Orin NX, and cannot be implemented on a virtual machine. It just explains how the process is implemented. If you want to implement this function on your own motherboard, you need to compile the entire function package and connect related peripherals.

octomap official website: http://octomap.github.io/

octomap source code: https://github.com/OctoMap/octomap

octomap wiki: http://wiki.ros.org/octomap

octomap_server: http://wiki.ros.org/octomap_server

The operating environment and reference configuration of software and hardware are as follows:

7.1, Introduction

Octomap is an octree-based 3D map creation tool that can display complete 3D graphics including barrier-free areas and unmapped areas, and sensor data based on occupancy grids can be fused and updated in multiple measurements; Maps are available in multiple resolutions, data can be compressed, and storage is compact. In fact, the code of octomap mainly consists of two modules: octomap, a 3D map creation tool, and octovis, a visualization tool. Compared with point clouds, it can save a lot of space. The map created by octomap looks like this: (different resolutions from left to right)

image-20230418105440406

7.2 , octomap map based on camera

Execute the following launch file in the terminal:

  1. Start the camera

  1. Start octomap_server map

  1. Start rviz in docker or virtual machine [recommended]:

  1. Use the remote control or keyboard to control the node to slowly move the robot to build the map. Losing key frames may cause the map to fail.

image-20230419155015007

7.3, Octomap construction based on orbslam and pointcloud_mapping

1, Start the camera

2, Start orbslam to publish the camera pose, color map and depth map. Depending on the performance of different master controllers, the waiting time here is about 10 seconds

image-20230418094624816

3, Start octomap_server to build a map

  1. Start rviz:

  1. Use the remote control or keyboard to control the node to slowly move the robot to build a map. Losing key frames may cause the map to fail.

image-20230419164316466

7.4、Node analysis

7.3.1、Display calculation graph

7.3.2、Details of each node

image-20230419121854299

image-20230419162344199

7.3.3、TF transformation

image-20230419162522062