Documentation Index
Fetch the complete documentation index at: https://mintlify.com/NVlabs/alpasim/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Level 3 debugging in AlpaSim enables breakpoint debugging of individual components while running a full simulation. This allows you to debug complex interactions between microservices with your favorite debugger attached.This section covers debugging simulation components (controller, runtime, driver), not vehicle behavior within simulation. For basic configuration debugging, see the Quickstart Guide.
Breakpoint Debugging Workflow
The basic approach to enable breakpoint debugging:Generate config files without running
Use the wizard to create configuration files but skip execution:
Start the component manually
Launch the component you want to debug from your IDE or terminal with breakpoints set
Debugging the Controller
The controller manages ego vehicle trajectory tracking and pose estimation.Terminal-Based Debugging
Note the allocated port
Check
tutorial_dbg/docker-compose.yaml for the controller port. Look for components in the sim profile: controller-0, driver-0, physics-0, runtime-0, sensorsim-0.Example: controller-0 might be allocated port 6003.VSCode Debugger Configuration
For a better debugging experience, use VSCode’s built-in debugger:Debugging the Runtime
Debugging the runtime requires a different approach since other services must be running before the runtime starts.Key Differences
- Start order: Other services must be up before launching the runtime
- Speed iteration: Set
runtime.endpoints.do_shutdown=Falseto keep containers running between runs
Terminal-Based Debugging
VSCode Debugger Configuration
ASL Log Analysis
What are ASL Logs?
ASL (AlpaSim Log) files contain most messages exchanged during simulation as size-delimited protobuf messages. They’re stored inrollouts/{scene_id}/{batch_uuid}/rollout.asl.
Use cases:
- Debugging model behavior
- Replaying stimuli on a driver instance
- Reproducing bugs with a debugger attached
- Creating evaluation videos
Reading ASL Logs
Use theasync_read_pb_log utility to stream messages:
Message Types
ASL files contain three types of messages:RolloutMetadata
RolloutMetadata
Metadata header for reproducibility and bookkeeping:
- Session UUID and scene ID
- Batch size and simulation steps
- Timestamp and control frequency
- Version information (runtime, driver, API)
- Actor definitions
ActorPoses
ActorPoses
Location of all actors (including
'EGO') in global coordinate space:- Position (x, y, z)
- Orientation (quaternion)
- Velocity
- Timestamp
Service Requests/Responses
Service Requests/Responses
Microservice RPC calls enable replay mode:
RolloutCameraImage- Camera frame requests (used to create MP4 videos)- Driver planning requests/responses
- Physics update calls
- Sensor simulation requests
Replaying Stimuli
The replay_logs_alpamodel.ipynb notebook shows how to:- Read an ASL log
- Extract driver stimuli (camera frames, ego poses)
- Replay them on a driver instance
- Reproduce behavior with a debugger attached
ASL logs don’t specify the USDZ file UUID - you’ll need to match by scene_id from metadata.
Console Log Analysis
The docker-compose console contains logs from all microservices and is the first place to look when something goes wrong.Basic Troubleshooting
Find first error
Scroll to find where the first errors occurred - subsequent errors are often cascading failures