Skip to content

Dashcam telemetry v0.1.0-alpha.1 for comma 3/3X and comma 4 - #1

Draft
spanconstant5 wants to merge 2885 commits into
masterfrom
feature/dashcam-telemetry-v1
Draft

spanconstant5 wants to merge 2885 commits into
masterfrom
feature/dashcam-telemetry-v1

Conversation

@spanconstant5

Copy link
Copy Markdown
Owner

Summary

Adds a read-only dashcam and telemetry platform while preserving openpilot vehicle-control behavior. The feature branch is rebased from the fork's February 2025 base onto current commaai/openpilot master because official comma four (mici) support postdates the old base.

Implemented

  • 20 Hz segmented SQLite recorder with WAL, one-second commits, 30-minute rotation, atomic manifests, crash recovery, and schema v1
  • metadata-only association to existing openpilot fcamera.hevc segments; no second encode and no burned-in source HUD
  • shared dark HUD with device-specific geometry for comma 3/3X and comma 4
  • bottom-center speed, bottom-left Throttle/Brake bars, bottom-right steering scale, driver state, compact numeric RPM, footer, and assistance state
  • Toyota provider using only existing opendbc fields for TSS cruise and stock AEB; orange driver-override warnings
  • PySide6 desktop viewer with scrubbing, video segment switching, event markers, summaries, GPS trace, and telemetry-only fallback
  • resumable Windows ADB importer that selects completed segments, copies associated video, preserves timestamps, verifies size, and never deletes device data
  • synthetic sample generator and complete contributor/user documentation
  • tskdash release branch and v0.1.0-alpha.1 tag

Checks run

  • Python compileall over recorder, both HUD integrations, viewer, and importer
  • Ruff over all new/changed Python modules: passed
  • 13 focused unit tests: passed (schema, rotation, recovery, manifest, association, synchronization, summaries, importer selection, and HUD providers)
  • synthetic three-second drive generation/load smoke test: 60 samples
  • PySide6 offscreen viewer construction/render smoke test: passed

Hardware validation still required

No comma 3, comma 3X, comma 4, or in-vehicle validation is claimed. Owners must verify UI geometry, daylight/night readability, thermal and write overhead, normal shutdown/recovery, 31+ minute rotation, GPS source selection, HEVC alignment at boundaries, and unchanged control behavior. The install guide contains separate comma 4 compact-layout checks.

Known limitations

  • ordinary stock TSS throttle/brake command magnitude is not exposed by generic CarState, so the bars show decoded driver input and confirmed Toyota stock AEB only
  • hybrid battery charge, EV mode, and power flow remain hidden
  • RPM and analog throttle/brake may be unavailable by vehicle
  • desktop HEVC support depends on the OS/Qt media backend
  • import resume uses file size rather than a checksum
  • no automatic telemetry cleanup policy in v1

Exact Toyota TODOs

  1. Add a reviewed, source-tagged opendbc signal for stock longitudinal acceleration/braking magnitude across supported Toyota platforms.
  2. Add validated hybrid battery state of charge with scaling, units, validity, and coverage.
  3. Add EV-mode and signed hybrid power-flow fields with explicit unavailable states.
  4. Define any additional TSS lane/PCS status that can be labeled without overstating subsystem activity.
  5. Add route-based opendbc tests before mapping any new field into the provider.

No speculative CAN addresses were added.

Installation and testing

  • Development branch: feature/dashcam-telemetry-v1
  • Alpha tag: v0.1.0-alpha.1
  • Installer-facing branch: tskdash
  • Requested device URL after the repository is named or mirrored as spanconstant5/openpilot: installer.comma.ai/spanconstant5/tskdash
  • Current repository name is comma4TSKdashcam, so use the documented SSH install until it is renamed/mirrored
  • Windows import: tools\telemetry_importer\Import.bat
  • Viewer: install tools\telemetry_viewer\requirements.txt, then run tools\telemetry_viewer\ReplayViewer.bat
  • Synthetic test data: python -m openpilot.tools.telemetry_viewer.generate_sample sample_telemetry

See docs/INSTALL_COMMA.md for the complete hardware checklist.

adeebshihadeh and others added 30 commits May 30, 2026 13:06
* tools/setup: skip native package managers if we can

* revert that
* remove CarState.brake refs

Intending to deprecate this field since it's set incorrectly by
most car implementations, and (essentially) unused in openpilot.
Everything should be using CarState.brakePressed.
See commaai/opendbc#3338.

* fix test_models.py
* check angle matches safety

* add to fuzzy

* explicit

* fix tesla

* just real data for now, fix toyota

* clean up
Update Python packages

Co-authored-by: Vehicle Researcher <user@comma.ai>
* bitrate controller

* ability to set the quality so a certain level, make message handler a switch case

* distinct bitrate levels and exponential backoff of raising bitrate

* add med level threshold

* fix

* fix

* simplify

* clean
* deep pre-req

* modeld changes

* fix parsing

* comment

* fix reporter
* Revert "modeld: fix capnp memory leak (commaai#38117)"

This reverts commit 0f17a98.

* Revert "fix memory leak from pycapnp 2.2+ (commaai#38001)"

This reverts commit 294cb68.

* downgrade

* agnos 18.4
* modeld: RL driving model with 3-file split

Split the driving model into vision + off_policy + on_policy ONNX
files and wire up the RL policy:

- 3-file model split (vision / off_policy / on_policy), replacing the
  combined big_driving_policy/vision models
- compiler updates for the split models
- actually consume the policy action in modeld
- add desire state to the driving model
- model iterations (smoothness, off/on-policy weight updates)

* modeld: update driving model

* 1e72cf5a-785f-45ea-888f-28cdb14785de/100

* tinygrad hack

* fix parsing

* looser timing

* big

* Remove unnecessary modeld rebase changes

* Tighten modeld split cleanup

---------

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Armandpl <adpl33@gmail.com>
…ized Kalman filter time (commaai#38124)

* locationd: require finite filter time for valid livePose

* cast to bool and rename
* Higher min vego

* Use CV

* Bump speed in simulated tests
usbgpu: pin modeld to core 7
* undeprecate curvature

* use pid_log

* bump

* fix test

* bump

* bump

* fix

* tune saturation

* bump

* fix torque bar

* bump

* rm redundant

* reduce sesitivity

* pid

* bump

* reset opendbc

* preserve sorting

* bump opendbc
op.sh: don't eval CMD, run argv directly so special chars work

Previously op_run_command joined "$@" into a single string and eval'd
it, which broke on inputs containing shell metacharacters. For example,
'op esim --download "LPA:1$[rsp.truphone.com]($url)$QRF-SPEEDTEST" name'
would fail with a syntax error on the unquoted parens. Run "$@" instead
and only use $* for the printed display string. Also quote the unquoted
$@ in the other op_run_command callers.
elkoled and others added 29 commits July 23, 2026 09:57
* tools: decompress in the python downloader

* and zstd
show big model loading as permanent alert
* webrtc timeout after 5 mins

* omit timeout for body
* bump version

* update AGNOS 18.7

* update to production
* remove test_models

* rm that

* update test_models docs

* restore car model test tool

* leave dependencies unchanged
Revert "bump teleoprtc (commaai#38443)"

This reverts commit 171f271.
* lint: check indentation

* cleanup

* happy

* that was too much

* happy
@github-actions

Copy link
Copy Markdown

Process replay diff report

Replays driving segments through this PR and compares the behavior to master.
Please review any changes carefully to ensure they are expected.

✅ 0 changed, 66 passed, 0 errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.