Lua configuration reference documentation

Note that Cartographer’s ROS integration uses tf2, thus all frame IDs are expected to contain only a frame name (lower-case with underscores) and no prefix or slashes. See REP 105 for commonly used coordinate frames.

Note that topic names are given as base names (see ROS Names) in Cartographer’s ROS integration. This means it is up to the user of the Cartographer node to remap, or put them into a namespace.

The following are Cartographer’s ROS integration top-level options, all of which must be specified in the Lua configuration file:

The ROS frame ID to use for publishing submaps, the parent frame of poses, usually “map”.
The ROS frame ID of the frame that is tracked by the SLAM algorithm. If an IMU is used, it should be at its position, although it might be rotated. A common choice is “imu_link”.
The ROS frame ID to use as the child frame for publishing poses. For example “odom” if an “odom” frame is supplied by a different part of the system. In this case the pose of “odom” in the map_frame will be published. Otherwise, setting it to “base_link” is likely appropriate.
Only used if provide_odom_frame is true. The frame between published_frame and map_frame to be used for publishing the (non-loop-closed) local SLAM result. Usually “odom”.
If enabled, the local, non-loop-closed, continuous pose will be published as the odom_frame in the map_frame.
If enabled, the published pose will be restricted to a pure 2D pose (no roll, pitch, or z-offset). This prevents potentially unwanted out-of-plane poses in 2D mode that can occur due to the pose extrapolation step (e.g. if the pose shall be published as a ‘base-footprint’-like frame)
If enabled, subscribes to nav_msgs/Odometry on the topic “odom”. Odometry must be provided in this case, and the information will be included in SLAM.
If enabled, subscribes to sensor_msgs/NavSatFix on the topic “fix”. Navigation data must be provided in this case, and the information will be included in the global SLAM.
If enabled, subscribes to cartographer_ros_msgs/LandmarkList on the topic “landmarks”. Landmarks must be provided, as cartographer_ros_msgs/LandmarkEntry within cartographer_ros_msgs/LandmarkList. If cartographer_ros_msgs/LandmarkEntry data is provided the information will be included in the SLAM according to the ID of the cartographer_ros_msgs/LandmarkEntry. The cartographer_ros_msgs/LandmarkList should be provided at a sample rate comparable to the other sensors. The list can be empty but has to be provided because Cartographer strictly time orders sensor data in order to make the landmarks deterministic. However it is possible to set the trajectory builder option “collate_landmarks” to false and allow for a non-deterministic but also non-blocking approach.
Number of laser scan topics to subscribe to. Subscribes to sensor_msgs/LaserScan on the “scan” topic for one laser scanner, or topics “scan_1”, “scan_2”, etc. for multiple laser scanners.
Number of multi-echo laser scan topics to subscribe to. Subscribes to sensor_msgs/MultiEchoLaserScan on the “echoes” topic for one laser scanner, or topics “echoes_1”, “echoes_2”, etc. for multiple laser scanners.
Number of point clouds to split each received (multi-echo) laser scan into. Subdividing a scan makes it possible to unwarp scans acquired while the scanners are moving. There is a corresponding trajectory builder option to accumulate the subdivided scans into a point cloud that will be used for scan matching.
Number of point cloud topics to subscribe to. Subscribes to sensor_msgs/PointCloud2 on the “points2” topic for one rangefinder, or topics “points2_1”, “points2_2”, etc. for multiple rangefinders.
Timeout in seconds to use for looking up transforms using tf2.
Interval in seconds at which to publish the submap poses, e.g. 0.3 seconds.
Interval in seconds at which to publish poses, e.g. 5e-3 for a frequency of 200 Hz.
Enable or disable providing of TF transforms.
Enable publishing of tracked pose as a geometry_msgs/PoseStamped to topic “tracked_pose”.
Interval in seconds at which to publish the trajectory markers, e.g. 30e-3 for 30 milliseconds.
Fixed ratio sampling for range finders messages.
Fixed ratio sampling for odometry messages.
Fixed ratio sampling for fixed frame messages.
Fixed ratio sampling for IMU messages.
Fixed ratio sampling for landmarks messages.