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

  1. You have to place rosbags which should be migrated inside the as_ros/rosbags directory.

4.1.3. Usage

  1. 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
    
    1. You may want to specify to delete (-l) or keep (-L) LIDAR point clouds.

    2. You may want to specify to delete (-i) or keep (-I) images.

    3. You may want to specify to delete (-t) or keep (-t) transforms.

    4. You may want to specify to delete (-v) or keep (-v) visualization.

    5. You may want to specify to uncompress compresses images (-u).

    6. You may want to specify to migrate messages from one version to another (-m).

    7. You may want to specify to fix messages, e.g. wrong signal scaling (-f).

    8. You may want to specify a start time, duration and end time for the output rosbag (-s, -d and -e).

    9. You may want to specify to migrate gps_common/GPSFix to sensors_msgs/NavSatFix gps messages so they can be visualized in foxglove (-g).

    10. You may want to specify to rename a vehicle (as part of a vehicle marker messages) (-rv).

    11. You may want to specify to delete a part of the pipeline starting from the specified module (-p).

    12. You may want to specify an offset for fixing the header of messages received via can messages (-c).

    13. 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

  1. 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, see migrator --migration-strategy)

  2. Fix the rear wheelspeed (-f inverse_rl_wheelspeed, see migrator --fixing-strategy)

  3. Uncompress the input images, e.g. if you want to run the perception module (migrator --uncompress-images)

  4. Delete the part of the pipeline you want to simulate (migrator --delete-pipeline)

  5. Keep the images and lidar points (migrator --keep-images and migrator --keep-lidar-points)

  6. Delete lidar points, transforms and visualization (migrator --delete-transforms and 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 -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

  1. Fix the rear wheelspeed (-f rear_wheelspeed, see migrator --fixing-strategy)

  2. Fix the rear wheelspeed (-f inverse_rl_wheelspeed, see migrator --fixing-strategy)

  3. Uncompress the input images, e.g. if you want to run the perception module (migrator --uncompress-images)

  4. Delete the part of the pipeline you want to simulate (migrator --delete-pipeline)

  5. Keep the images (migrator --keep-images)

  6. 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

  1. Fix the rear wheelspeed (-f rear_wheelspeed, see migrator --fixing-strategy)

  2. Uncompress the input images, e.g. if you want to run the perception module (migrator --uncompress-images)

  3. Delete the part of the pipeline you want to simulate (migrator --delete-pipeline)

  4. Keep the images (migrator --keep-images)

  5. 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

  1. Fix the timestamps of ouster messages (-f lidar_time, see migrator --fixing-strategy)

  2. Uncompress the input images, e.g. if you want to run the perception module (migrator --uncompress-images)

  3. Delete the part of the pipeline you want to simulate (migrator --delete-pipeline)

  4. Keep the images (migrator --keep-images) and lidar points (migrator --keep-lidar-points)

  5. Delete transforms and visualization (migrator --delete-transforms and 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 lidar_time -p PER