Skip to content

openpilot: send the cameras' calibration in the hello - #21

Open
ernestchu wants to merge 1 commit into
zoompilot:mainfrom
ernestchu:hello-camera-calibration
Open

ernestchu wants to merge 1 commit into
zoompilot:mainfrom
ernestchu:hello-camera-calibration

Conversation

@ernestchu

Copy link
Copy Markdown

I'm working on a plugin to jetlink that needs the comma's camera calibration on the server side.

Once calibrationd has a calibrated CalibrationParams, the hello now carries:

camera: {wide_from_device_euler: [roll, pitch, yaw], height}

It's read once per link and omitted until the comma is calibrated. A server that predates the key ignores it.

  • ModelSide.camera_calibration() is a new optional adapter method. link.py reads it with getattr, so adapters without it are unaffected.
  • Stock.camera_calibration() reads CalibrationParams. It handles upstream's liveCalibration and a fork's extrinsicsCalibration (zoompilot's), and never raises.
  • JetlinkClient.hello(camera=...), plus a note in docs/link-protocol.md.
  • Tests for each piece.

Overhead: negligible. The work happens once per link, when the comma connects, and never per frame. Reading and decoding CalibrationParams takes about 16 µs (measured on x86, well under 1 ms on a comma). No new imports: openpilot.cereal.log is already loaded in modeld. The hello grows by 119 bytes, once per connection.

🤖 Generated with Claude Code

Once calibrationd has saved a calibrated CalibrationParams, the link's
hello sends the wide road camera's rotation from the device and the
camera's height (`camera`: wide_from_device_euler, height), read once a
link, for server-side code that needs to place what the cameras saw.
An optional adapter method, camera_calibration(), reads it; Stock's works
for upstream's liveCalibration and a fork's extrinsicsCalibration. A
server that predates the key ignores it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ernestchu added a commit to ernestchu/zoompilot that referenced this pull request Nov 3, 2026
@zephleggett

Copy link
Copy Markdown
Collaborator

Hi, could you share what this is needed for? @ernestchu

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.

2 participants