The slamlab_offline_importer section configures the slamlab-offline-importer executable: the bag, the output directory, and the topics to import.
All paths support the $CONFIG_DIRPATH$ token, which is replaced with the parent directory of the config file. All parameters are mandatory and unknown parameters are an error: a config states every setting. A list without topics is []. The template shows typical values.
| Parameter | Type | Description |
|---|
bag_path | path | ROS 2 bag: a directory with .mcap or .db3 files (split bags are read in the order of their index) or a single file. |
output_dirpath | path | Directory of the output files. |
clouds | list | Point cloud topics, see clouds. |
imu | list | IMU topics, see imu. |
gnss | list | GNSS topics, see gnss. |
trajectories | list | Odometry topics, see trajectories. |
images | list | Image topics, see images. |
Each entry of a list needs a topic; each topic may appear once per list.
| Parameter | Type | Description |
|---|
topic | string | Topic of sensor_msgs/PointCloud2 or point_cloud_interfaces/CompressedPointCloud2 messages. |
point_stamps | map | Per-point stamps, see point stamps. |
intensity_field | string | Field with the intensity, truncated to an integer. "": the intensity is 0. |
stamp_filter | map | Skips clouds whose header stamp is outside a range. |
stamp_filter.enabled | bool | |
stamp_filter.min_stamp_sec | float | Absolute stamp. Unit: s. |
stamp_filter.max_stamp_sec | float | Absolute stamp. Unit: s. |
distance_filter | map | Removes points outside a distance range from the sensor. |
distance_filter.enabled | bool | |
distance_filter.min_distance | float | Unit: m. |
distance_filter.max_distance | float | Unit: m. |
voxel_filter | map | Keeps one point per voxel. |
voxel_filter.enabled | bool | |
voxel_filter.voxel_size | float | Unit: m. |
voxel_filter.method | string | first: the earliest point of the voxel. centroid: one point at the centroid, with the mean stamp and intensity. |
min_num_points | int | Clouds with fewer points after the filters are skipped. |
Points that are not finite are always removed. Of several clouds with the same header stamp, only the first is written; the same holds for images. The points are sorted by stamp; points with the same stamp keep their order. The reference stamp of a cloud is its header stamp, or the stamp of its first point if that is earlier.
| Parameter | Type | Description |
|---|
fields | list | One field with the stamp, or two fields with seconds and nanoseconds (absolute). |
unit | string | Unit of a single field: sec or nanosec. |
relative_to_header | bool | The single field holds offsets to the header stamp, as with most drivers; they can be negative. Two fields are absolute and need false. Same meaning as sub.cloud_time_is_relative_to_header of the ROS node, which reads point stamps with the same code. |
Settings for field layouts seen in recordings:
| Point field | fields | unit | relative_to_header |
|---|
Ouster t (UINT32) | [t] | nanosec | true |
Livox offset_time (UINT32) | [offset_time] | nanosec | true |
Livox timestamp (FLOAT64, absolute) | [timestamp] | nanosec | false |
Velodyne time (FLOAT32, negative before the header) | [time] | sec | true |
| Parameter | Type | Description |
|---|
topic | string | Topic of sensor_msgs/Imu messages. |
time_offset_sec | float | Added to the header stamps. |
accelerometer_axes | list | Entry i names the input axis, with an optional sign, that becomes output axis i, e.g. [x, -y, -z]. Must be a rotation. |
gyroscope_axes | list | As accelerometer_axes, for the angular velocity. |
| Parameter | Type | Description |
|---|
topic | string | Topic of sensor_msgs/NavSatFix or gps_msgs/GPSFix messages. |
time_offset_sec | float | Added to the header stamps. |
require_fix | bool | Skips messages without a fix (status < 0). This includes STATUS_UNKNOWN (-2), the default of sensor_msgs/NavSatStatus: for a driver that never sets the status, set require_fix: false. |
max_sigma | [x, y, z] | Skips messages with a larger 1-sigma uncertainty along an axis. Unit: m. A finite limit also skips messages with an unknown variance. |
utm_shift.first_point | bool | The shift moves the first written point to the origin. |
utm_shift.shift | [x, y, z] | Added to the UTM coordinates, unless first_point is set. Unit: m. |
All points are projected into the UTM zone of the first written point. Messages with a position outside the UTM range (latitude outside [-80, 84] deg, or NaN) are skipped. A GPSFix message without covariance gets a diagonal covariance from err_horz and err_vert.
| Parameter | Type | Description |
|---|
topic | string | Topic of nav_msgs/Odometry messages. |
format | string | tum or kitti. |
first_pose_to_identity | bool | Writes the poses relative to the first pose. |
child_T_frame.translation | [x, y, z] | Transform from the output frame to the child frame of the messages: the output pose is map_T_child * child_T_frame. Unit: m. |
child_T_frame.rotation | [qx, qy, qz, qw] | |
time_offset_sec | float | Added to the header stamps. Only for tum: the KITTI format has no stamps. |
| Parameter | Type | Description |
|---|
topic | string | Topic of sensor_msgs/Image or sensor_msgs/CompressedImage messages. |
time_offset_sec | float | Added to the header stamps. |
stride | int | Writes every nth decoded image. |
grayscale | bool | |
scale | float | Scale factor in (0, 1]. |
rotation_deg | int | Counter-clockwise rotation: -180, -90, 0, 90 or 180. |
For H.264 and H.265 streams, packets before the first keyframe are skipped.