Cartographer

Cartographer is a (Simultaneous Localization And Mapping) SLAM system from Google, capable of 2D or 3D SLAM. The Isaac SDK incorporates Cartographer to provide mapping capability.

Cartographer and other third-party SLAM systems may require tuning (independent of the Isaac SDK) to achieve useful results in certain applications.

Cartographer requires computational resources that may exceed those of edge devices. Thus the sample presented takes in recorded log data rather than running on edge devices directly. The sample application performs 2D mapping, assuming Carter robot hardware.

Data Requirement

  • Flat Lidar Scan as FlatRangeScanProto messages.
  • Lidar Pose in Odometry Frame. On the Carter robot it is provided by DifferentialBaseOdometry codelet from StateProto messages of type DifferentialBaseDynamics.

Please refer to Record and Replay for recording and replaying the log.

Configuration

See IsaacSDK/apps/carter/log_cartographer/log_cartographer.config.json for configuration of the Cartographer sample application.

Copy
Copied!
            

"cask_directory": "PATH/TO/LOGFILE", "tick_dt": 0.25, "num_visible_submaps": 100 "lua_configuration_basename": "carter.lua",

  • Ensure that the cask_directory points to the log that is of interest.
  • num_visible_submaps is the number of submaps to render during mapping. Reduce this number to save CPU cycles if needed.
  • tick_dt is the number of seconds between feeding Lidar data into Cartographer. Feeding data more frequently may increase the quality of the resulting map, with a corresponding increase in resource cost.
  • lua_configuration_basename points to the LUA script containing Cartographer parameters. For detailed information about the parameters please refer to Cartographer Configuration and Cartographer Tuning Guide. Check and modify the parameters in IsaacSDK/apps/carter/log_cartographer/carter.lua if necessary.

Starting the Cartographer Sample Application

Start the sample application with the following command:

Copy
Copied!
            

bazel run apps/carter/log_cartographer


Monitoring and Visualization

Open the following URL in a web browser:

Copy
Copied!
            

http://localhost:3000

cartographer_sight.png

Fig. 5Cartographer Application Sample Output

  • Results might degrade when the ticking time for the Cartographer codelet is longer than the pre-set ticking interval tick_dt. Decreasing num_visible_submaps or disabling visualization of submaps might help in this case.

Output

On exit, the sample application writes the final map as /tmp/submap_merged.png. Specify the output path with the following configuration parameter for the Cartographer codelet:

Copy
Copied!
            

"output_path": "PATH/TO/WRITE"


© Copyright 2019, NVIDIA Corporation. Last updated on Feb 1, 2023.