Libpanda: A High Performance Library for Vehicle Data Collection

Jan 1, 2021·
Matt Bunting
Matt Bunting
Rahul Bhadani
Rahul Bhadani
Jonathan Sprinkle
Jonathan Sprinkle
· 2 min read
DOI
Type
Publication
Proceedings of the Workshop on Data-Driven and Intelligent Cyber-Physical Systems
publications

Cyber-Physical Systems (CPS) generally involve time-critical components due to physical dynamics, therefore necessitating high-performance subsystems. This is also true in data collection scenarios to infer physical phenomena. This paper covers Libpanda as an example of a component that has been designed to address performance issues in CPS implementations. Libpanda is a C++ library that interfaces software with a Comma.ai Panda device. Pandas are used for installation in modern vehicles to read the vehicle CAN bus, providing rich sensor data and limited vehicle control through message injection. The motivation to design lib-panda stems from the lack of performance in Python-based code that runs on inexpensive hardware like a Raspberry Pi. In such situations, Python code would result in utilizing 92% CPU while also dropping around 40% of the CAN packet due to bottlenecks. Without using different tools, inconsistent data collection means a loss of time-based vehicle state interpretation. Libpanda addresses these issues through implementation in a different language and implementation of different design paradigms involving asynchronous calls and multithreading. The Panda also features a GPS module that allows multiple instances to synchronize clocks for large-scale data collection scenarios. Libpanda has been designed with time-synchronization in mind to aid in the measurement of inter-vehicle dynamics. The performance improvements of libpanda have resulted in it becoming an important component in automotive dynamics research that requires a higher technical performance in large-scale experiments.

Matt Bunting
Authors
Research Scientist
Dr. Matthew Bunting is a Research Scientist at the Institute for Software Integrated Systems at Vanderbilt University. He joined Vanderbilt in 2022 having previously been a postdoctoral scholar at the University of Arizona from 2020-2022. His research is in embedded control software and visualization for cyber-physical systems.
Rahul Bhadani
Authors
PhD Student
Jonathan Sprinkle
Authors
Professor and Chair of Computer Science
Professor of Computer Science at Vanderbilt University. Research in cyber-physical systems, autonomous vehicles, and domain-specific modeling.