ADAS Software-in-the-Loop Debugging Tool

4 min read

ADAS SIL & Debugging Tool

Introduction

This project is a Software-in-the-Loop (SIL) tool that helps engineers simulate, test, and debug ADAS (Advanced Driver Assistance Systems) functions such as Lane Departure Warning (LDW), Adaptive Cruise Control (ACC), and so on. This program provides data playback, code debugging, and real-time visualization for a range of ADAS features. By using this tool, teams can validate algorithms more efficiently before deploying them in actual vehicles.

Core Purpose and Use Cases

Our SIL tool bridges the gap between virtual testing and on-road trials by playing back previously recorded data or synthetic scenarios. This allows engineers to see how ADAS algorithms respond to different conditions without scheduling expensive physical test drives. It’s particularly useful for:

  • Debugging ADAS code in an environment that supports step-through execution and breakpoints.
  • Replaying real-world data to ensure that new or updated algorithms behave correctly.
  • Visualizing sensor outputs, vehicle states, and control signals in ways that highlight potential bugs.

Key Functionalities

  1. ADAS Data Replay: Lets you load historical vehicle dynamics, sensor data, and commands, so you can observe how ADAS systems would react in different scenarios.
  2. Code Debugging: Integrates with VSCode and QtCreator for breakpoints, variable inspection, and real-time logging, which helps find and fix issues faster.
  3. Visualization: Provides real-time displays of vehicle state (wheel angles, velocities), sensor information (radar, camera), traffic data, and more. This gives a clear view of how the ADAS logic interprets its environment.
  4. User-Friendly Interface: Organizes playback controls, simulation settings, and debug tools in one place, so it’s easier for testers to navigate.
  5. Real-Time Simulation: Emulates real-world situations (e.g., sudden braking, lane changes) to see how the system behaves on the fly.

Advantages for ADAS Development

By relying on simulation, teams can catch most issues early in the software lifecycle. Testing is more efficient, especially since no physical track or on-road test time is needed just to check an algorithm’s basic functionality. The tool’s interface makes it simpler to manage different data sets, measurement periods, and debug sessions.

Key Challenges

Large Qt Tree Models Performance: One bottleneck was saving and restoring expanded states in a QTreeView with many items. Using model()->match(...) with a wildcard caused significant lag. Switching to a simpler recursive approach (avoiding wildcard matches) boosted performance and reduced UI freeze times by over 75%.

We also faced difficulties when jumping to a specific time in the simulation, because many data structures were statically defined. Re-initializing these in the middle of playback required rethinking how and when the objects were created.

Visualizing ADAS Data

Real-time data can be viewed in two main ways:

  • Real-Time Data View: Shows live input, output, and mid-process variables during simulation. You can pause playback and double-click signals to add them to a chart.
  • Real-Time Data Chart: Plots those signals over time so you can see how values change during playback. You can create tabs for different sets of signals or detach a chart into a floating window.

You can also zoom, pan, and select data points to get more information about specific variables at a particular moment.

Visualization Area

Displays the vehicle’s state, sensor readings, and any planning results (e.g., speed profiles, trajectories) in real-time. You can:

  • Look at a 2D or conceptual layout of radar and camera ranges.
  • Toggle various data layers (vehicle path, sensor coverage, etc.) for clarity.
  • Inspect planning outputs—such as road models or path curves—interactively.

Tech Stack

  • Language & Framework: Qt/C++
  • IDE Support: QtCreator, VSCode
  • Cross-Platform Compatibility: Linux and Windows

© 2024 Milad Sharbati. All Rights Reserved. Designed by HTML Codex