Skip to content

Rosbag replay simulation#

Steps#

  1. Download and unpack a sample map.

    • You can also download the map manually.
    gdown -O ~/autoware_map/ 'https://docs.google.com/uc?export=download&id=1A-8BvYRX3DhSzkAnOcGWFw5T30xTlwZI'
    unzip -d ~/autoware_map/ ~/autoware_map/sample-map-rosbag.zip
    
  2. Download the sample rosbag files.

    gdown -O ~/autoware_map/ 'https://docs.google.com/uc?export=download&id=1VnwJx9tI3kI_cTLzP61ktuAJ1ChgygpG'
    unzip -d ~/autoware_map/ ~/autoware_map/sample-rosbag.zip
    
  3. Check if you have ~/autoware_data folder and files in it.

    $ cd ~/autoware_data
    $ ls -C -w 30
    image_projection_based_fusion
    lidar_apollo_instance_segmentation
    lidar_centerpoint
    tensorrt_yolo
    tensorrt_yolox
    traffic_light_classifier
    traffic_light_fine_detector
    traffic_light_ssd_fine_detector
    yabloc_pose_initializer
    

    If not, please, follow Manual downloading of artifacts.

Note#

  • Sample map and rosbag: Copyright 2020 TIER IV, Inc.
  • Due to privacy concerns, the rosbag does not contain image data, which will cause:
    • Traffic light recognition functionality cannot be tested with this sample rosbag.
    • Object detection accuracy is decreased.

How to run a rosbag replay simulation#

!!! info Using Autoware Launch GUI

If you prefer a graphical user interface (GUI) over the command line for launching and managing your simulations, refer to the `Using Autoware Launch GUI` section at the end of this document for a step-by-step guide.
  1. Launch Autoware.

    source ~/autoware/install/setup.bash
    ros2 launch autoware_launch logging_simulator.launch.xml map_path:=$HOME/autoware_map/sample-map-rosbag vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit
    

    Note that you cannot use ~ instead of $HOME here.

    after-autoware-launch

  2. Play the sample rosbag file.

    source ~/autoware/install/setup.bash
    ros2 bag play ~/autoware_map/sample-rosbag/sample.db3 -r 0.2 -s sqlite3
    

    after-rosbag-play

  3. To focus the view on the ego vehicle, change the Target Frame in the RViz Views panel from viewer to base_link.

    change-target-frame

  4. To switch the view to Third Person Follower etc, change the Type in the RViz Views panel.

    third-person-follower

Reference video tutorials

Using Autoware Launch GUI#

This section provides a step-by-step guide for using the Autoware Launch GUI to launch and manage your rosbag replay simulation. offering an alternative to the command-line instructions provided in the previous section.

Getting Started with Autoware Launch GUI#

  1. Installation: Ensure you have installed the Autoware Launch GUI. Installation instructions.

  2. Launching the GUI: Open the Autoware Launch GUI from your applications menu. GUI_screenshot_for_launching

Launching a Logging Simulation#

  1. Set Autoware Path: In the GUI, set the path to your Autoware installation. GUI_screenshot_for_setting_Autoware_path
  2. Select Launch File: Choose logging_simulator.launch.xml for the lane driving scenario. GUI screenshot for selecting launch file
  3. Customize Parameters: Adjust parameters such as map_path, vehicle_model, and sensor_model as needed.

    GUI screenshot for customizing parameters GUI screenshot for customizing parameters

  4. Start Simulation: Click the launch button to start the simulation and have access to all the logs.

    GUI screenshot for starting simulation

  5. Play Rosbag: Move to the Rosbag tab and select the rosbag file you wish to play.

    GUI screenshot for selecting rosbag file

  6. Adjust Playback Speed: Adjust the playback speed as needed and any other parameters you wish to customize.

    GUI screenshot for adjusting playback speed

  7. Start Playback: Click the play button to start the rosbag playback and have access to settings such as pause/play, stop, and speed slider5.

    GUI screenshot for starting playback

  8. View Simulation: Move to the RViz window to view the simulation.

    after-rosbag-play

  9. To focus the view on the ego vehicle, change the Target Frame in the RViz Views panel from viewer to base_link.

    change-target-frame

  10. To switch the view to Third Person Follower etc, change the Type in the RViz Views panel.

    third-person-follower