Skip to content

General ncore_vis updates and fixes#53

Merged
janickm merged 5 commits intoNVIDIA:mainfrom
janickm:dev/janickm/push-qmuklunqwwvq
Mar 18, 2026
Merged

General ncore_vis updates and fixes#53
janickm merged 5 commits intoNVIDIA:mainfrom
janickm:dev/janickm/push-qmuklunqwwvq

Conversation

@janickm
Copy link
Collaborator

@janickm janickm commented Mar 18, 2026

This pull request introduces several improvements and refactors to the visualization components for camera, lidar, and cuboid overlays. The main focus is on improving the accuracy of projections (especially for cuboids), standardizing frame index naming, and enhancing code clarity and maintainability. The changes also add new Bazel build targets for testing and modularization.

Projection and interpolation improvements

  • Cuboid overlays now interpolate each track to the camera frame's mid-of-frame timestamp, ensuring that the projected position reflects the object's estimated location during exposure. The projection uses the shared mode (rolling-shutter, mean, start, end) for consistency. (tools/ncore_vis/components/camera.py) [1] [2]
  • The _project_points helper now supports a return_all_projections argument and passes it through to projection calls, allowing more flexible projection results. (tools/ncore_vis/components/camera.py) [1] [2]

Frame index naming and consistency

  • All references to frame are renamed to frame_idx in camera and lidar components, clarifying intent and reducing confusion between frame numbers and indices. (tools/ncore_vis/components/camera.py, tools/ncore_vis/components/lidar.py) [1] [2] [3] [4] [5] [6] [7]

API and method updates

  • The cuboid observation query now explicitly specifies the interpolation mode ("end-of-interval") for improved clarity and correctness. (tools/ncore_vis/components/cuboids.py)
  • Lidar point cloud fusion and transformation methods are updated to use frame_idx and more descriptive argument names, improving parallel loading and clarity. (tools/ncore_vis/components/lidar.py)

Build system enhancements

  • Added a new py_library target for tracks.py and a corresponding pytest_test target for tracks_test.py in the Bazel build file, improving modularity and testability. (tools/ncore_vis/BUILD.bazel) [1] [2]

Code cleanup

  • Removed unused import of se3_inverse in the camera component, streamlining dependencies. (tools/ncore_vis/components/camera.py)

janickm added 5 commits March 18, 2026 13:37
…n lidar projection

Use cam.get_frames_T_source_sensor() which directly returns T_world_camera,
instead of se3_inverse(cam.get_frames_T_sensor_target()) which computes
T_camera_world and then inverts it. Removes the unnecessary se3_inverse
import.
Replace the incorrect per-observation-timestamp projection approach with proper
cuboid track interpolation. Group all CuboidTrackObservations into CuboidTrack
objects (built once globally, cached in DataLoader), then interpolate each
track's bbox3 to the camera frame's mid-of-exposure timestamp using linear
translation + SLERP rotation via PoseInterpolator. All cuboids are projected
using a single camera pose evaluated at the same mid-frame time.

- Add ncore/impl/data/tracks.py: CuboidTrack dataclass with interpolate_at()
  and from_observations() factory
- Add ncore/impl/data/tracks_test.py: 20 unit tests (pass on 3.8 and 3.11)
- Update ncore/impl/data/BUILD.bazel: pylib_tracks + pytest_tracks targets
- Update tools/ncore_vis/data_loader.py: get_cuboid_tracks() lazy cache
- Update tools/ncore_vis/BUILD.bazel: add pylib_tracks dep
- Update tools/ncore_vis/components/camera.py: _overlay_cuboids_on_image now
  receives frame_idx, computes mid_timestamp_us, and uses interpolated tracks
…ization

- Move CuboidTrack and tests from ncore/impl/data/ to tools/ncore_vis/
- Transform interpolated observations to world coordinates before projection
- Restore cuboid source filter (dropdown was non-functional)
- Use rolling-shutter-aware projection via shared projection mode dropdown
- Add return_all_projections parameter to _project_points
- Build cuboid tracks eagerly in DataLoader.__init__ (fixes thread-safety)
- Add max_clamp_us parameter to interpolate_at for bounded clamping
- Use reference-time range as clamp boundary to avoid false positives
- Remove float64 type annotations from tracks.py
@janickm janickm force-pushed the dev/janickm/push-qmuklunqwwvq branch from 789c1ca to 70d2423 Compare March 18, 2026 16:22
@janickm janickm merged commit 4c3d50f into NVIDIA:main Mar 18, 2026
5 checks passed
@janickm janickm deleted the dev/janickm/push-qmuklunqwwvq branch March 19, 2026 14:27
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