The Controller Service (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.
VDCService) provides vehicle dynamics simulation and control. It propagates vehicle state forward in time using a controller and vehicle model.
Service Definition
Methods
start_session
Initialize a controller session with vehicle configuration.Unique identifier for this session
Vehicle and controller configuration
Empty message indicating session started successfully
run_controller_and_vehicle
Propagate vehicle state forward in time using the controller and vehicle model.Session identifier from
start_sessionCurrent vehicle state
state.pose: Active transform local→rig (rig frame origin)- Angular and linear rates resolved in rig frame
Desired trajectory expressed in rig frame at the timestamp of the first pose.
Each pose is relative to the rig origin.
Target timestamp (microseconds) at the end of propagation
During initialization/replay phase, match dynamic state in vehicle model to prevent drift.
Set to
true during the priming phase at simulation start.Ground-truth active transform local→rig after propagation
Estimated active transform local→rig after propagation (may include sensor noise)
Ground-truth velocity and acceleration in rig frame after propagation
Estimated velocity and acceleration in rig frame (may include sensor noise)
close_session
Release resources associated with a session.Session identifier to close
Usage Example
Fromalpasim_runtime/services/controller_service.py:
Configuration
The rig file specifies vehicle parameters such as:- Vehicle mass and inertia
- Wheel parameters
- Controller gains (MPC parameters)
- Actuator limits
configs/ directory for example rig files.
Coordinate Frames
The rig frame origin is at the mid-bottom rear edge of the vehicle bounding box.
- X: Forward (vehicle heading)
- Y: Left
- Z: Up
Related
- Runtime Python Module - Integrates controller service
- Driver Service - Provides planned trajectories