Skip to content

slamlab_offline_importer

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.

ParameterTypeDescription
bag_pathpathROS 2 bag: a directory with .mcap or .db3 files (split bags are read in the order of their index) or a single file.
output_dirpathpathDirectory of the output files.
cloudslistPoint cloud topics, see clouds.
imulistIMU topics, see imu.
gnsslistGNSS topics, see gnss.
trajectorieslistOdometry topics, see trajectories.
imageslistImage topics, see images.

Each entry of a list needs a topic; each topic may appear once per list.

ParameterTypeDescription
topicstringTopic of sensor_msgs/PointCloud2 or point_cloud_interfaces/CompressedPointCloud2 messages.
point_stampsmapPer-point stamps, see point stamps.
intensity_fieldstringField with the intensity, truncated to an integer. "": the intensity is 0.
stamp_filtermapSkips clouds whose header stamp is outside a range.
stamp_filter.enabledbool
stamp_filter.min_stamp_secfloatAbsolute stamp. Unit: s.
stamp_filter.max_stamp_secfloatAbsolute stamp. Unit: s.
distance_filtermapRemoves points outside a distance range from the sensor.
distance_filter.enabledbool
distance_filter.min_distancefloatUnit: m.
distance_filter.max_distancefloatUnit: m.
voxel_filtermapKeeps one point per voxel.
voxel_filter.enabledbool
voxel_filter.voxel_sizefloatUnit: m.
voxel_filter.methodstringfirst: the earliest point of the voxel. centroid: one point at the centroid, with the mean stamp and intensity.
min_num_pointsintClouds 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.

ParameterTypeDescription
fieldslistOne field with the stamp, or two fields with seconds and nanoseconds (absolute).
unitstringUnit of a single field: sec or nanosec.
relative_to_headerboolThe 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 fieldfieldsunitrelative_to_header
Ouster t (UINT32)[t]nanosectrue
Livox offset_time (UINT32)[offset_time]nanosectrue
Livox timestamp (FLOAT64, absolute)[timestamp]nanosecfalse
Velodyne time (FLOAT32, negative before the header)[time]sectrue
ParameterTypeDescription
topicstringTopic of sensor_msgs/Imu messages.
time_offset_secfloatAdded to the header stamps.
accelerometer_axeslistEntry i names the input axis, with an optional sign, that becomes output axis i, e.g. [x, -y, -z]. Must be a rotation.
gyroscope_axeslistAs accelerometer_axes, for the angular velocity.
ParameterTypeDescription
topicstringTopic of sensor_msgs/NavSatFix or gps_msgs/GPSFix messages.
time_offset_secfloatAdded to the header stamps.
require_fixboolSkips 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_pointboolThe 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.

ParameterTypeDescription
topicstringTopic of nav_msgs/Odometry messages.
formatstringtum or kitti.
first_pose_to_identityboolWrites 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_secfloatAdded to the header stamps. Only for tum: the KITTI format has no stamps.
ParameterTypeDescription
topicstringTopic of sensor_msgs/Image or sensor_msgs/CompressedImage messages.
time_offset_secfloatAdded to the header stamps.
strideintWrites every nth decoded image.
grayscalebool
scalefloatScale factor in (0, 1].
rotation_degintCounter-clockwise rotation: -180, -90, 0, 90 or 180.

For H.264 and H.265 streams, packets before the first keyframe are skipped.