Skip to content

Lane Detection Dynamic Qt Animation #819

Description

@melaniereis

Summary / Description

Integrate the lane detection telemetry (lateral offset and road heading/curvature) from the Hailo AI pipeline (stanley.py) into the Qt dashboard to create dynamic, real-time vehicle movement animations. The UI must smoothly animate the car's lateral shift and the road's curvature.
Crucial Performance Requirement: To prevent UI stuttering and maintain a stable 60 FPS on the dashboard, the QML layer must use property interpolations (Behavior with NumberAnimation) to mask any lower frame rates or jitter originating from the AI inference engine.

Type / Category

  • task
  • bug
  • docs
  • infra
  • spike / research

Dependencies

Blocked by

Sub-issues

Tasks

  • Update vss_v6.json to include new paths for lane telemetry (e.g., Vehicle.ADAS.LaneKeepAssist.Offset and Vehicle.ADAS.LaneKeepAssist.Heading).
  • Update Python AI (main.py) to publish the Stanley controller outputs (closes_front_point_y and path_heading) to the KUKSA Databroker via gRPC.
  • Update KuksaReader (C++) to subscribe to the new VSS paths and expose them to QML via VehicleData.
  • In ClusterScreen.qml, bind the carImg horizontal translation to the laneOffset property.
  • In ClusterScreen.qml, apply a transform or mask to the road grid to warp/curve based on the laneHeading property.
  • Wrap both QML properties in a Behavior block with a NumberAnimation to guarantee 60 FPS visual smoothness regardless of the KUKSA update rate.

Acceptance Criteria (AC)

  • The Qt C++ backend safely receives float values for offset and heading without crashing or leaking memory.
  • The vehicle image (carImg) moves laterally on the screen proportionally to the physical offset calculated by the Stanley controller.
  • The QML UI maintains a smooth; there is absolutely no visual "snapping" or "stuttering" of the car or road.

Definition of Done (DoD)

Checklist describing repository/process conditions for merging (docs updated, tests added, CI green, etc.).

  • Code reviewed and approved
  • CI checks pass
  • Documentation updated (if applicable)

How to validate / Test steps

  1. Host: Compile the updated application using bitbake -c cleansstate qt-app && bitbake qt-app.
  2. Target (RPi5): Stop the service, install the RPM, and restart drivapi-dashboard.
  3. Start the KUKSA Databroker and the Python inference script (main.py).
  4. Validation:
  • Move the camera physically left and right off the lane center. Verify the car icon on the dashboard glides smoothly to the corresponding side.
  • Rotate the camera to simulate a curve. Verify the QML road grid bends/skews smoothly.
  • Monitor the Qt Dashboard visually to confirm the animation runs smooth without snapping.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions