Skip to content

example: drive grl_snam_austin_drive's chase camera through the C++ Track controller - #46

Open
transfix wants to merge 2 commits into
masterfrom
feat/chase-camera-native
Open

transfix wants to merge 2 commits into
masterfrom
feat/chase-camera-native

Conversation

@transfix

@transfix transfix commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Swap from pycvc_gl.camera import ChaseCamera for NativeChaseCamera as ChaseCamera in scripts/examples/grl_snam_austin_drive.py, so this example runs
the SAME follow-camera as C++ instead of the parallel pure-Python implementation
(the unification from libcvc #381 / #391). Matches the grl-snam demo migration
(CVC-Lab/GRL-SNAM#81, CVC-DBG/grl-snam-dbg#82).

Pure drop-in: NativeChaseCamera has the identical constructor and
update(pos, dt) -> (eye, target, up) contract (the example only calls update), and
libcvc's cvcgl_track_parity (C++, 7.1e-15) and test_pycvc_gl_chase_parity (Python)
prove it returns the same pose as the pure-Python ChaseCamera. Behaviour is
unchanged.

NOTE: merge only once a pycvc-gl package that ships NativeChaseCamera (built
against a cvcGL with #381's push-feed: feedTrackTarget/get_pose) is installed —
the currently-installed pycvc_gl extension predates it. Prepared, not merged.

Release gate: met (2026-10-09)

The NOTE above is resolved; this was held only until a released pycvc-gl shipped NativeChaseCamera:

  • libcvc #391 (merged 2026-09-21) is an ancestor of v3.5.0; the catalog's latest pycvc-gl-cp312 is 3.5.0+cvc.2.
  • The released Linux bundle ships pycvc_gl/camera.py with class NativeChaseCamera, and its _pycvc_gl.so binds every method the shim calls: CameraController_{feedTrackTarget,get_pose,resetTracking,setUpAxis,setMode}.
  • Re-checked against today's base that every changed call site still only calls .update(), with up=(0,0,1) and the default widen_tau=0, the regime where parity is proven.
  • Parity at these exact constructor args: (34, 13, look_up 2.5) and (55, 42, look_up 3.0). I used the v3.5.0 shim over a local python-VTK pycvc_gl and drove 600 frames: curving, a full stop to hit the min_speed freeze, a reversal, and mixed dt. Max pose difference was 2.8e-14.
  • Branch updated from base; the diff is still the one-line import swap per file.
  • Sibling CVC-DBG/grl-snam-dbg#82 (the same swap in 3 DBG demos) merged 2026-10-09.
  • Note for this example only: it constructs the camera at module top level without app=, so NativeChaseCamera makes its own pycvc.make_app() for the controller's state tree (default path chase.camera). That tree is separate from volrover3's, so the two don't collide. Pass app= later if the camera knobs should be reachable from volrover3's state.

…rack controller

Swap `from pycvc_gl.camera import ChaseCamera` for `NativeChaseCamera as
ChaseCamera` in scripts/examples/grl_snam_austin_drive.py, so this example runs
the SAME follow-camera as C++ instead of the parallel pure-Python implementation
(the unification from libcvc #381 / #391). Matches the grl-snam demo migration
(CVC-Lab/GRL-SNAM#81, CVC-DBG/grl-snam-dbg#82).

Pure drop-in: NativeChaseCamera has the identical constructor and
update(pos, dt) -> (eye, target, up) contract (the example only calls update), and
libcvc's cvcgl_track_parity (C++, 7.1e-15) and test_pycvc_gl_chase_parity (Python)
prove it returns the same pose as the pure-Python ChaseCamera. Behaviour is
unchanged.

NOTE: merge only once a pycvc-gl package that ships NativeChaseCamera (built
against a cvcGL with #381's push-feed: feedTrackTarget/get_pose) is installed —
the currently-installed pycvc_gl extension predates it. Prepared, not merged.
@transfix
transfix marked this pull request as ready for review October 9, 2026 20:10
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.

1 participant