Overview
AlpaSim’s data pipeline centers around ASL (AlpaSim Log) files, which capture the complete state of a simulation for analysis, evaluation, and replay.ASL Log Files
What are ASL Logs?
ASL files are size-delimited protobuf streams with a custom schema defined in logging.proto. Location:rollouts/{scene_id}/{batch_uuid}/rollout.asl
Each rollout creates its own ASL file containing the full simulation history.
Message Types
ASL files contain three types of messages:1. Metadata Header (RolloutMetadata)
1. Metadata Header (RolloutMetadata)
Provides reproducibility and bookkeeping information:Session Metadata:
session_uuid- Unique identifier for the rolloutscene_id- Scene identifier (e.g.,clipgt-026d6a39...)batch_size- Number of rollouts in the batchn_sim_steps- Total simulation steps (e.g., 120 for 20s at 10Hz)start_timestamp_us- Scenario start timestampcontrol_timestep_us- Control frequency in microseconds
runtime_version- Runtime version, git hash, API versionegodriver_version- Driver version and API compatibility- Other service versions (physics, controller, etc.)
- Initial actor configurations and properties
2. Actor Poses (ActorPoses)
2. Actor Poses (ActorPoses)
Location of all actors (including
'EGO') in global coordinate space:Per Actor:- Position (x, y, z) in global frame
- Orientation (quaternion)
- Velocity (linear and angular)
- Timestamp (microseconds)
- Trajectory analysis
- Collision detection validation
- Visualization and video rendering
3. Microservice Requests & Responses
3. Microservice Requests & Responses
Enables reproducing behavior of services in replay mode:Request Types:
RolloutCameraImage- Camera frame requests (used to create MP4 videos)DriverPlanRequest- Driver planning inputsPhysicsUpdateRequest- Physics simulation callsSensorsimRenderRequest- Neural rendering requests
- Corresponding
*_returnmessages with service outputs
- Debugging service behavior
- Replaying stimuli without full simulator
- Validating determinism
Reading ASL Logs
Async Stream Reading
alpasim-grpc provides async_read_pb_log for reading ASL logs as a stream of messages.
async_read_pb_log is an async function - it must be executed from a Jupyter notebook or submitted to an async runtime loop.Example Output
When you print log entries, you’ll see protobuf messages:Replaying Stimuli
ASL logs enable replay debugging - reproducing driver behavior without running the full simulator.Replay Workflow
Replay Notebook Example
The replay_logs_alpamodel.ipynb notebook demonstrates:- Reading an ASL log
- Extracting driver stimuli (camera frames, ego poses)
- Replaying them on a driver instance
- Reproducing behavior with a debugger attached
- Debug non-deterministic driver behavior
- Test driver changes on historical logs
- Validate driver outputs match expectations
Evaluation Data Pipeline
Per-Rollout Metrics
Location:rollouts/{scene_id}/{batch_uuid}/metrics.parquet
Parquet file containing driving quality metrics for the rollout:
- Safety metrics (collisions, offroad)
- Performance metrics (trajectory deviation, duration)
- Incident rates
Aggregated Metrics
Location:aggregate/metrics_unprocessed.parquet
Combined metrics from all rollouts, used to generate:
aggregate/metrics_results.txt- Formatted statistics tableaggregate/metrics_results.png- Visual summary plots
Video Generation
Evaluation videos are created from ASL logs usingRolloutCameraImage messages.
Per-rollout videos:
rollouts/{scene_id}/{batch_uuid}/{clipgt_id}_{batch_id}_{rollout_id}.mp4
aggregate/videos/all/- All rollout videosaggregate/videos/violations/collision_at_fault/- At-fault collision videosaggregate/videos/violations/offroad/- Off-road violation videosaggregate/videos/violations/dist_to_gt_trajectory/- Large deviation videos
Videos in
violations/ folders are symlinks to videos in all/ for easy filtering by failure type.Indexed Rollouts
RCLog Format
Some rollouts generate indexed logs for easier random access: Location:rollouts/{scene_id}/{batch_uuid}/rollout_indexed/
Contents:
rclog-all-indexed.log- Indexed log datarclog-all.index- Index for random accessmanifest.json- Metadata about indexed datacamera_front_tele_30fov.mp4- Per-camera video streamscamera_front_wide_120fov.mp4
Data Processing Examples
Batch Process All Rollouts
Combine with Metrics
Data Schema Reference
All protobuf message schemas are defined insrc/grpc/alpasim_grpc/v0/:
- logging.proto - ASL log message types
- common.proto - Shared types (poses, trajectories, timestamps)
- egodriver.proto - Driver request/response schemas
- sensorsim.proto - Rendering request/response schemas
- physics.proto - Physics update schemas
- controller.proto - Controller interface schemas