Skip to content

slam

Core SLAM node that subscribes sensor data, runs the SLAM pipeline, and publishes SLAM results as ROS messages.

ParameterMessage typeDefaultDescription
sub.cloud_topicsensor_msgs/PointCloud2/cloudPoint cloud topic (required)
sub.imu_topicsensor_msgs/Imu""IMU measurements (optional)
sub.absolute_position_topicgeometry_msgs/PoseWithCovarianceStamped""Absolute position measurements, e.g. from gnss_to_utm_pose (optional)
sub.visualization_image_topicsensor_msgs/Image""Image for visualization (optional)

Set a topic to "" to disable the subscription.

ParameterMessage typeDefaultDescription
pub.processed_cloud_topicsensor_msgs/PointCloud2/slamlab/processed_cloudCurrent filtered and deskewed point cloud in sensor frame
pub.deskewed_cloud_topicsensor_msgs/PointCloud2""Current original (i.e. non-filtered) and deskewed point cloud in map frame
pub.local_map_cloud_topicsensor_msgs/PointCloud2/slamlab/local_mapVoxel-plane centroids of local map
pub.global_map_cloud_topicsensor_msgs/PointCloud2/slamlab/global_mapAccumulated global map
pub.correspondences_cloud_topicsensor_msgs/PointCloud2/slamlab/correspondencesICP correspondences between processed point cloud and local map
pub.path_topicnav_msgs/Path/slamlab/pathEstimated trajectory
pub.cloud_queue_size_topicstd_msgs/UInt32""Current point cloud queue size

Set a topic to "" to disable the publication.

ParameterTypeDefaultDescription
pub.base_frame_tfbooltruePublish map_T_base transform
map_frame_idstringslamlab_mapID of map frame
base_frame_idstringslamlab_baseID of base frame
get_initial_base_pose_from_tfboolfalseGet initial map_T_base transform from TF tree
initial_base_frame_idstringslamlab_base_initialID of base frame (only used if get_initial_base_pose_from_tf is true)
get_static_transforms_from_tfboolfalseOverride static transforms between frames (e.g. between IMU and base frame) from TF tree
ParameterTypeDefaultDescription
sub.cloud_time_fieldstring""Per-point timestamp field name
sub.cloud_time_field_unitstringnanosecsec or nanosec
sub.cloud_time_is_relative_to_headerbooltrueThe time field holds offsets to the header stamp, which can be negative (e.g. Velodyne). Same as point_stamps of slamlab-offline-importer
sub.cloud_intensity_fieldstring""Intensity field name
ParameterTypeDescription
config_filepathstringPath to SLAMLab pipeline configuration file (required)

As a composable node:

from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode
ComposableNodeContainer(
name="slamlab_container",
executable="component_container_isolated",
composable_node_descriptions=[
ComposableNode(
package="slamlab",
plugin="slamlab_ros::Slam",
name="slamlab_ros",
parameters=[{
"sub.cloud_topic": "/lidar/points",
"config_filepath": "/path/to/config.yaml",
}],
),
],
)

Or standalone:

Terminal window
ros2 run slamlab slam --ros-args \
-p sub.cloud_topic:=/lidar/points \
-p config_filepath:=/path/to/config.yaml