Data Generation

The GRID platform provides robust capabilities for generating and capturing data in various modalities. By leveraging the AirGen library, users can collect comprehensive sensor and image data from their simulations. This guide outlines the process for capturing and storing data using the GRID platform. A fully working example can be found in the sample notebooks inside any GRID workspace.

Overview

Data generation in GRID allows users to:

  • Capture sensor data, such as IMU, LiDAR, GPS, etc.

  • Capture image data in multiple modalities, including RGB, depth, and segmentation.

  • Store data in a structured and accessible HDF5 file format.

  • Log and visualize data on rerun.

Data Capture Process

GRID supports capturing both sensor and image data. The steps involve:

  1. Accessing the vehicle client to retrieve the data.

  2. Creating appropriate groups within the HDF5 file.

  3. Storing the data components in the HDF5 file.

Sensor Data

For example, capturing IMU (Inertial Measurement Unit) data involves recording timestamp, orientation, angular velocity, and linear acceleration.

# Example: Capturing IMU data
imu_data = car.getImuData()
imu_group.create_dataset("time_stamp", data=imu_data.time_stamp)
imu_group.create_dataset("orientation", data=[
    imu_data.orientation.w_val,
    imu_data.orientation.x_val,
    imu_data.orientation.y_val,
    imu_data.orientation.z_val
])
imu_group.create_dataset("angular_velocity", data=[
    imu_data.angular_velocity.x_val,
    imu_data.angular_velocity.y_val,
    imu_data.angular_velocity.z_val
])
imu_group.create_dataset("linear_acceleration", data=[
    imu_data.linear_acceleration.x_val,
    imu_data.linear_acceleration.y_val,
    imu_data.linear_acceleration.z_val
])

For detailed information on supported sensors and their data capture specifics, please refer to the sensors section.

Image Data

The process involves defining the capture types, mapping them to the corresponding image types supported by AirGen, capturing images from the vehicle's cameras, and storing them in the HDF5 file.

# Example: Capturing image data
capture_name_map = {
    "rgb": ImageType.Scene,
    "depth": ImageType.DepthPerspective,
    "segmentation": ImageType.Segmentation
}
capture_types = ['rgb', 'depth', 'segmentation']
image_types = [capture_name_map[capture_type] for capture_type in capture_types]
images = car.getImages("front_center", image_types)

For detailed information on supported image types and their capture specifics, please refer to the cameras section.

Logging and Visualization

During data capture, images can be logged using the rr_log_airgen_image function for real-time visualization and debugging.

# Example: Logging images in real-time
rr_log_airgen_image("grid", capture_name_map[capture_type], image[0])

Captured data can be visualized using the Rerun panel, allowing users to inspect the captured frames and sensor readings.

Data Storage

For GRID platform, please refer to the storage section for information on storing your generated data. For GRID Enterprise, the data is stored in the docker container that is running the session. Please refer to the docker section for more information on accessing and managing the data.