4.1. Migrating Rosbags¶
Since our system keeps changing it is important to have a utility to migrate rosbags so the newest version can still use rosbags recorded with an older system version.
4.1.1. migrator¶
migrator [OPTIONS] INPUT_ROSBAG
Options
- -o, --output-rosbag-suffix <output_rosbag_suffix>¶
suffix to append to input rosbag name for the output rosbag
- -t, --delete-transforms, -T, --keep-transforms¶
delete transform messages to recreate them
- -v, --delete-visualization, -V, --keep-visualization¶
delete visualization topics to recreate them
- -l, --delete-lidar-points, -L, --keep-lidar-points¶
delete lidar points to reduce bag size
- -i, --delete-images, -I, --keep-images¶
delete images to reduce bag size
- -u, --uncompress-images¶
uncompress compressed images
- -ci, --compress-images <compress_images>¶
compress compressed images
- Options:
jpeg | png | qoi
- -p, --delete-pipeline <delete_pipeline>¶
Delete pipeline output after
- Options:
PER | LOMA | SLAM | PAPL | MOPLA | CTRL
- -m, --migration-strategy <migration_strategy>¶
Migration stragety for migration messages
- Options:
V1_to_V2
- -f, --fixing-strategy <fixing_strategy>¶
Fixing stragety for fixing messages like wrongfully scaled values
- Options:
rear_wheelspeed | inverse_rl_wheelspeed | fix_lidar_time
- -s, --start <start>¶
relative start time of the new bag
- -d, --duration <duration>¶
maximal duration of the new bag
- -e, --end <end>¶
relative end time of the new bag
- -c, --can-time-offset <can_time_offset>¶
offset between header and receive timeof can message to be corrected
- -rv, --rename-vehicle <rename_vehicle>¶
rename the vehicle with the specified name
- -fc, --fix-clock¶
fix clock messages that are in wrong order
- -g, --gps¶
Migrate gps_common/GPSFix to sensors_msgs/NavSatFix
- -htdt, --header-time-delta-topics <header_time_delta_topics>¶
List of topics to process for header delta time correction
- -htd, --header-time-deltas <header_time_deltas>¶
Time deltas in ms to be applied onto message headers from -htdt
Arguments
- INPUT_ROSBAG¶
Required argument
4.1.2. Prerequisites¶
You have to place rosbags which should be migrated inside the
as_ros/rosbags
directory.
4.1.3. Usage¶
Execute the rosbag merger utility (within the docker container, see Start a console session inside the docker container), see explanation below and options below:
migrator [INPUT_ROSBAG] -l/L -t/T -i/I -v/V
You may want to specify to delete (
-l
) or keep (-L
) LIDAR point clouds.You may want to specify to delete (
-i
) or keep (-I
) images.You may want to specify to delete (
-t
) or keep (-t
) transforms.You may want to specify to delete (
-v
) or keep (-v
) visualization.You may want to specify to uncompress compresses images (
-u
).You may want to specify to migrate messages from one version to another (
-m
).You may want to specify to fix messages, e.g. wrong signal scaling (
-f
).You may want to specify a start time, duration and end time for the output rosbag (
-s
,-d
and-e
).You may want to specify to migrate
gps_common/GPSFix
tosensors_msgs/NavSatFix
gps messages so they can be visualized in foxglove (-g
).You may want to specify to rename a vehicle (as part of a vehicle marker messages) (
-rv
).You may want to specify to delete a part of the pipeline starting from the specified module (
-p
).You may want to specify an offset for fixing the header of messages received via can messages (
-c
).You may want to specify to fix a recorded clock, which has been recorded in the wrong order (
-fc
).
4.1.4. Migrating Rosbags for pipeline testing purposes¶
4.1.4.1. Data recorded with Eva in May ‘22¶
For the data recorded with Eva in May 40 22’, you need to
Migrate the ROS messages from AS ROS v1 to the ROS messages from AS ROS v2, especially (and currently solely) the received CAN Messages (
-m V1_to_V2
, seemigrator --migration-strategy
)Fix the rear wheelspeed (
-f inverse_rl_wheelspeed
, seemigrator --fixing-strategy
)Uncompress the input images, e.g. if you want to run the perception module (
migrator --uncompress-images
)Delete the part of the pipeline you want to simulate (
migrator --delete-pipeline
)Keep the images and lidar points (
migrator --keep-images
andmigrator --keep-lidar-points
)Delete lidar points, transforms and visualization (
migrator --delete-transforms
andmigrator --delete-visualization
)
Use the following base command. Choose other options like start time and duration according to your preferences.
migrator path/to/rosbag.bag -t -u -I -L -v -o _m -m V1_to_V2 -p PER
4.1.4.2. Data recorded with Emma in KW 40 ‘22¶
For the data recorded with Emma in the KW 40 22’, you need to
Fix the rear wheelspeed (
-f rear_wheelspeed
, seemigrator --fixing-strategy
)Fix the rear wheelspeed (
-f inverse_rl_wheelspeed
, seemigrator --fixing-strategy
)Uncompress the input images, e.g. if you want to run the perception module (
migrator --uncompress-images
)Delete the part of the pipeline you want to simulate (
migrator --delete-pipeline
)Keep the images (
migrator --keep-images
)Delete lidar points, transforms and visualization (
migrator --delete-lidar-points
,migrator --delete-transforms
,migrator --delete-visualization
)
Use the following base command. Choose other options like start time and duration according to your preferences.
migrator path/to/rosbag.bag -t -u -I -l -v -o _m -f rear_wheelspeed -f inverse_rl_wheelspeed -p PER
4.1.4.3. Data recorded with Emma in KW 44 ‘22¶
For the data recorded with Emma in the KW 44 22’, you need to
Fix the rear wheelspeed (
-f rear_wheelspeed
, seemigrator --fixing-strategy
)Uncompress the input images, e.g. if you want to run the perception module (
migrator --uncompress-images
)Delete the part of the pipeline you want to simulate (
migrator --delete-pipeline
)Keep the images (
migrator --keep-images
)Delete lidar points, transforms and visualization (
migrator --delete-lidar-points
,migrator --delete-transforms
,migrator --delete-visualization
)
Use the following base command. Choose other options like start time and duration according to your preferences.
migrator path/to/rosbag.bag -t -u -I -l -v -o _m -f rear_wheelspeed -p PER
4.1.4.4. Data recorded with Emma in KW 05 ‘23¶
For the data recorded with Emma in the KW 05 23’, you need to
Fix the timestamps of ouster messages (
-f lidar_time
, seemigrator --fixing-strategy
)Uncompress the input images, e.g. if you want to run the perception module (
migrator --uncompress-images
)Delete the part of the pipeline you want to simulate (
migrator --delete-pipeline
)Keep the images (
migrator --keep-images
) and lidar points (migrator --keep-lidar-points
)Delete transforms and visualization (
migrator --delete-transforms
andmigrator --delete-visualization
)
Use the following base command. Choose other options like start time and duration according to your preferences.
migrator path/to/rosbag.bag -t -u -I -L -v -o _m -f lidar_time -p PER