Pylot: A Modular Platform for Exploring Latency-Accuracy Tradeoffs in Autonomous Vehicles

Ionel Gog, Sukrit Kalra, Peter Schafhalter, Matthew A. Wright, Joseph E. Gonzalez, Ion Stoica · DOI

Introduction

Autonomous vehicle (AV) research traditionally evaluates components like object detectors or motion planners in isolation, often prioritizing raw accuracy (e.g., mAP) on static datasets. However, in real-world driving, computational latency is as critical as accuracy. A highly precise model that takes 200ms to process a frame may be less safe than a faster, slightly less accurate model because the vehicle's state changes significantly during that processing time. Pylot is an open-source, modular platform designed to study these "latency-accuracy tradeoffs" by providing a high-performance dataflow engine that allows researchers to observe how component runtime impacts end-to-end driving safety.

System Architecture and Methods

Pylot is built on a dataflow programming model using the ERDOS framework. The system represents the AV pipeline as a directed graph of operators (nodes) connected by timestamped message streams (edges).

Pylot's modular architecture, showing the flow from sensors to control.

Key features of the architecture include:

  • Modularity: Researchers can easily swap perception, tracking, or planning modules to compare different algorithms.
  • Deterministic Execution: By using "watermark" messages for synchronization, Pylot ensures reproducible results, which is vital for debugging edge cases and "near-miss" scenarios.
  • Ground-Truth Integration: Pylot provides "perfect" reference implementations that pull data directly from simulators like CARLA, allowing for isolated testing of specific pipeline stages.
  • Portability: A shim layer facilitates the transition from simulation to real-world hardware, such as a Lincoln MKZ, with minimal code changes.

The Latency-Accuracy Tradeoff

The core contribution of Pylot is the formalization of "Timely Accuracy." Unlike standard metrics that evaluate a model's output against the frame it received, timely accuracy measures the output against the current state of the world at the moment the computation completes.

Impact of runtime and vehicle speed on timely accuracy metrics for semantic segmentation and pedestrian detection.

As shown in the experimental results, both runtime and vehicle speed significantly degrade timely performance. For instance, an object detector's timely performance can drop by 50% if its runtime increases by just 35ms. Similarly, as vehicle speed increases, the "staleness" of a slow model's output becomes more dangerous; at 40 m/s, timely mIoU for semantic segmentation is nearly 30% lower than at 10 m/s for the same model.

Key Insights and Results

  • Context-Dependent Optimization: There is no universally "best" model. For example, the SORT tracker's low latency makes it superior for emergency maneuvers, whereas DeepSORT's higher accuracy in handling occlusions makes it better for steady-state driving.
  • Communication Efficiency: Pylot’s underlying dataflow system achieves 30% lower communication latency than standard ROS by utilizing zero-copy shared memory queues.
  • End-to-End Impact: Evaluation using NHTSA pre-crash scenarios demonstrated that the choice of motion planner (e.g., FOT vs. RRT*) directly affects ride comfort (lateral jerk) and the maximum speed at which a vehicle can safely avoid obstacles.

Conclusion and Future Work

Pylot provides a robust framework for bridging the gap between offline model accuracy and online driving safety. While it significantly eases the transition to real hardware, future work will focus on narrowing the simulation-to-reality gap regarding sensor noise and integrating reinforcement learning interfaces to support end-to-end autonomous driving research.

Summary updated

BibTeX
@inproceedings{gog2021pylot,
  author = {Ionel Gog and Sukrit Kalra and Peter Schafhalter and Matthew A. Wright and Joseph E. Gonzalez and Ion Stoica},
  title = {{Pylot: A Modular Platform for Exploring Latency-Accuracy Tradeoffs in Autonomous Vehicles}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2021},
  doi = {10.1109/icra48506.2021.9561747},
}
Figure