4.2. Creating Visualization for recorded Rosbags

4.2.1. visualizer

visualizer [OPTIONS] INPUT_ROSBAG

Options

-o, --output-rosbag-suffix <output_rosbag_suffix>

suffix to append to input rosbag name for the output rosbag

-h, --header-time, -r, --receive-time

Whether to use header or receive time for visualization markers

-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

-td, --test-day <test_day>

maximal duration of the new bag

-tl, --track-layout <track_layout>

relative end time of the new bag

-t, --transforms

whether to create transforms

-stddev, --standard-deviation <n_stddev>

number of standard deviations to vizualize

-lmpc, --local-motion-planning-color-scale <local_motion_planning_color_scale>

Which metric to use to color the motion planning path splices

Options:

TOTAL | LENGTH | ASC | PSC

-v, --vehicle <vehicle>

current vehicle

Options:

eva | emma | rennate

-iv, --image-visualization

generate visualization onto recorded images

-cms, --calibration-matrices-subdirectory <calibration_matrices_subdirectory>

subdirectory for camera calibration matrices

-g, --gps

Migrate gps_common/GPSFix to sensors_msgs/NavSatFix

-D, --generate-detection-image

Generate detection images from uncompressed images and bounding boxes

-r, --recording <recording>

ros topics to generate a mp4 recording from.

Options:

/perception/detection_image | /visualization/image | /zed2i/zed_node/right/image_rect_color | /zed2i/zed_node/left/image_rect_color | /zed2i/zed_node/right/image_rect_color/qoi | /zed2i/zed_node/left/image_rect_color/qoi | /zed2i/zed_node/right/image_rect_color/compressed | /zed2i/zed_node/left/image_rect_color/compressed

Arguments

INPUT_ROSBAG

Required argument

4.2.2. Prerequisites

  1. You have to place rosbags for which visualizations should be generated for inside the as_ros/rosbags directory

  2. You may have to migrate the input rosbag beforehand with the Migrating Rosbags CLI so that the rosbag is up to date with the newest Autonomous System and its messages

4.2.3. Usage

  1. Execute the visualizer script (within the docker container, see Start a console session inside the docker container), see explanation below and options above:

    visualizer [INPUT_ROSBAG] -v <vehicle_name>
    
    1. You may want to specify that tf tree transformations should be added to the output bag file (-t)

    2. You may want to specify the suffix for the output rosbag (-o).

    3. You may want to specify the test day and track layout a ground truth map is saved under to generate visualization for it (-td and -tl)

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

    5. You may want to specify the number of standard deviations that should be visualized for uncertainty visualizations (-stddev)

    6. You may want to specify that visulization on images should be generated (-iv).

      You may want to specify in which subdirectory the correct calibration matrices lie (-cms) (just the name of the subdirectory under src/local_mapping/scripts/matrices without slashes at the start and finish).

    7. You may want to specify that detection images for the detected bounding boxes should be generated (-p).

    8. You may want to specify image topics for which an video file (mp4) should be recorded (-r).

    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 which metric should be used to color local motion planning trajectory path slices (-lmpc)

    11. You may want to specify that the receive time rather than a logical header time should be used for the generating of the visualization (probably not useful and not supported yet!)