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
AlpaSim’s microservice architecture allows you to customize or replace any component. This guide covers:- Making code changes during development
- Building custom container images
- Understanding service interfaces via protocol buffers
Code Changes
During development, code changes in the repository are automatically mounted into docker containers at runtime.Quick Iteration Workflow
Example: Adding Debug Logging
Try adding logging statements to the driver:driver/ logs to see your output.
Custom Container Images
The simulation is split into multiple microservices, each running in its own docker container:- sensorsim - Neural rendering engine for camera images
- driver - Driving policy (VaVAM, Alpamayo-R1, etc.)
- controller - Trajectory tracking and pose estimation
- physics - Physics simulation and collision detection
- runtime - Orchestration and scenario execution
- trafficsim - Background traffic simulation
Service Interface Requirements
The primary requirement for a custom container image is that it exposes a gRPC endpoint compatible with the expected service interface.Overriding Default Images
Default images are specified instable_manifest/oss.yaml. Override them using:
Example: Custom Driver Image
Replace the default driver with a custom image:Your custom driver must implement the gRPC interface defined in
src/grpc/alpasim_grpc/v0/egodriver.proto.Example: Custom Model Weights
Mount a custom model directory for the VaVAM driver:data/vavam-driver/ (in repository root)
The wizard mounts defines.vavam_driver as /mnt/vavam_driver in the container.
Protocol Buffer Definitions
All microservice APIs are defined using Protocol Buffers insrc/grpc/alpasim_grpc/v0/.
Available Service Interfaces
| Service | Proto File | Description |
|---|---|---|
| Sensorsim | sensorsim.proto | Neural rendering for camera images |
| Driver | egodriver.proto | Driving policy interface |
| Controller | controller.proto | Trajectory tracking and pose |
| Physics | physics.proto | Physics simulation |
| Runtime | runtime.proto | Orchestration (internal) |
| Traffic | traffic.proto | Background traffic |
| Common | common.proto | Shared types (poses, trajectories) |
| Logging | logging.proto | ASL log format |
Using gRPC APIs
After compiling protos withuv run compile-protos from src/grpc/:
Compiling Protocol Buffers
Coordinate Frame Conventions
When implementing custom services, follow AlpaSim’s coordinate frame conventions:Frame Naming Convention
Frame Naming Convention
Format:
{quantity}_{source_frame}_to_{target_frame}Examples:pose_local_to_rig- Pose from local to rig framevelocity_vehicle_in_local- Velocity in local frametransform_camera_to_vehicle- Transform from camera to vehicle
Standard Frames
Standard Frames
- global - World coordinate system
- local - Scene-local coordinates
- vehicle - Ego vehicle body frame
- camera - Camera sensor frame
- rig - Sensor rig mounting frame
Building Custom Images
Example Dockerfile
Multi-Replica Services
If your service will run with multiple replicas (for scaling), ensure:- Thread-safe state management - Each replica handles concurrent requests
- GPU assignment - Configure
services.<service>.gpusif using GPUs - Port allocation - Docker compose auto-assigns ports per replica