slam
Core SLAM node that subscribes sensor data, runs the SLAM pipeline, and publishes SLAM results as ROS messages.
Subscribed topics
Section titled “Subscribed topics”| Parameter | Message type | Default | Description |
|---|---|---|---|
sub.cloud_topic | sensor_msgs/PointCloud2 | /cloud | Point cloud topic (required) |
sub.imu_topic | sensor_msgs/Imu | "" | IMU measurements (optional) |
sub.absolute_position_topic | geometry_msgs/PoseWithCovarianceStamped | "" | Absolute position measurements, e.g. from gnss_to_utm_pose (optional) |
sub.visualization_image_topic | sensor_msgs/Image | "" | Image for visualization (optional) |
Set a topic to "" to disable the subscription.
Published topics
Section titled “Published topics”| Parameter | Message type | Default | Description |
|---|---|---|---|
pub.processed_cloud_topic | sensor_msgs/PointCloud2 | /slamlab/processed_cloud | Current filtered and deskewed point cloud in sensor frame |
pub.deskewed_cloud_topic | sensor_msgs/PointCloud2 | "" | Current original (i.e. non-filtered) and deskewed point cloud in map frame |
pub.local_map_cloud_topic | sensor_msgs/PointCloud2 | /slamlab/local_map | Voxel-plane centroids of local map |
pub.global_map_cloud_topic | sensor_msgs/PointCloud2 | /slamlab/global_map | Accumulated global map |
pub.correspondences_cloud_topic | sensor_msgs/PointCloud2 | /slamlab/correspondences | ICP correspondences between processed point cloud and local map |
pub.path_topic | nav_msgs/Path | /slamlab/path | Estimated trajectory |
pub.cloud_queue_size_topic | std_msgs/UInt32 | "" | Current point cloud queue size |
Set a topic to "" to disable the publication.
TF parameters
Section titled “TF parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
pub.base_frame_tf | bool | true | Publish map_T_base transform |
map_frame_id | string | slamlab_map | ID of map frame |
base_frame_id | string | slamlab_base | ID of base frame |
get_initial_base_pose_from_tf | bool | false | Get initial map_T_base transform from TF tree |
initial_base_frame_id | string | slamlab_base_initial | ID of base frame (only used if get_initial_base_pose_from_tf is true) |
get_static_transforms_from_tf | bool | false | Override static transforms between frames (e.g. between IMU and base frame) from TF tree |
Point cloud parameters
Section titled “Point cloud parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
sub.cloud_time_field | string | "" | Per-point timestamp field name |
sub.cloud_time_field_unit | string | nanosec | sec or nanosec |
sub.cloud_time_is_relative_to_header | bool | true | The 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_field | string | "" | Intensity field name |
Configuration
Section titled “Configuration”| Parameter | Type | Description |
|---|---|---|
config_filepath | string | Path to SLAMLab pipeline configuration file (required) |
Launch
Section titled “Launch”As a composable node:
from launch_ros.actions import ComposableNodeContainerfrom 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:
ros2 run slamlab slam --ros-args \ -p sub.cloud_topic:=/lidar/points \ -p config_filepath:=/path/to/config.yaml