Skip to content

[Interactive Drive] Add physics via Physx - #423

Closed
ArielG-NV wants to merge 14 commits into
NVIDIA:mainfrom
ArielG-NV:physics-test
Closed

[Interactive Drive] Add physics via Physx#423
ArielG-NV wants to merge 14 commits into
NVIDIA:mainfrom
ArielG-NV:physics-test

Conversation

@ArielG-NV

@ArielG-NV ArielG-NV commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Fixes: #313
Changes:

  • Added physx to drive the backend of physics. This requires maintaining our own physx python bindings.
  • Removed Vulkan backend from ludus-renderer due to significant overhaul causing this backend to be a maintenance burden that requires a complete rewrite. If there is need for the backend in the future we will just rewrite the code then.
  • Physics are generally obeying physx as the main-controller, but some hacks are added to prevent out-of-distribution behavior (yaw-lock on vehicles, speed lock on non-ego vehicles, etc...)
  • Changed the BEV render to be an orthographic top-down view for reasons that it makes driving+navigation easier. Added a green car to identify the ego on the BEV.
  • Made all collision logic (and other game-like-frills) under the --game-mode flag for the interactive-drive demos
  • Added a new view when clicking 3, a physx-debug view. This view enabled viewing the colliders we setup on the backend of physx: vehicles, pedestrians, road-boundaries as walls, etc....
  • Added a visual-flare when hitting/getting-hit by objects with enough force.
  • Tried to fit all objects into a very 'hacked-up' scene graph structure for ease of future feature additions

@ArielG-NV ArielG-NV added the enhancement New feature or request label Aug 6, 2026
@copy-pr-bot

copy-pr-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ArielG-NV

Copy link
Copy Markdown
Collaborator Author

/ok to test

@copy-pr-bot

copy-pr-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

/ok to test

@ArielG-NV, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

@greptile-apps

greptile-apps Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds a PhysX-backed object graph and collision simulation to Interactive Drive, removes the Vulkan renderer, and updates the CUDA renderer, configuration, visualization, documentation, and tests.

  • Adds native PhysX bindings, scene synchronization, collision handling, debug visualization, and collision flares.
  • Makes game-like collision behavior opt-in through --game-mode.
  • Reworks BEV rendering and dynamic scene integration.
  • Removes the Vulkan backend and its associated shaders, bindings, examples, and tests.

Confidence Score: 5/5

The PR appears safe to merge because the previously reported buffer-lifetime and game-mode-default failures are both resolved.

No blocking failure remains.

Important Files Changed

Filename Overview
integrations/omnidreams/ludus-renderer/ludus_renderer/_cpp/physx/bindings.cpp Adds the native PhysX scene bindings and now correctly anchors exposed NumPy buffers to their NativeScene owner.
integrations/omnidreams/ludus-renderer/ludus_renderer/physx.py Implements the Python-facing PhysX world lifecycle, synchronization, and fixed-capacity state-buffer interface.
integrations/omnidreams/omnidreams/interactive_drive/config.py Centralizes game-mode defaults so programmatic and CLI construction consistently disable game-like behavior unless requested.
integrations/omnidreams/omnidreams/interactive_drive/simulation/game_physics.py Integrates collision-enabled PhysX simulation and game-mode-controlled behavior into Interactive Drive.
integrations/omnidreams/ludus-renderer/ludus_renderer/_cpp/bindings/torch_rasterize_cuda.cpp Extends and synchronizes the CUDA timestamped-rendering path while adding stricter tensor and scene metadata validation.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Input[Keyboard / controller] --> App[Interactive Drive app]
  App --> Config[AppConfig]
  Config -->|game mode enabled| Physics[PhysXWorld]
  App --> Graph[PhysicsObjectGraph]
  Graph --> Physics
  Physics --> State[Native state buffers]
  State --> Scene[MutableObjectSceneBuffer]
  Scene --> CUDA[CUDA renderer]
  CUDA --> Views[Camera / BEV / debug views]
  Physics --> Effects[Collision events and visual flare]
Loading

Reviews (6): Last reviewed commit: "clean up readme" | Re-trigger Greptile

Comment thread integrations/omnidreams/ludus-renderer/ludus_renderer/_cpp/physx/bindings.cpp Outdated
Comment thread integrations/omnidreams/omnidreams/interactive_drive/config.py
@ArielG-NV

Copy link
Copy Markdown
Collaborator Author

/ok to test b4b2d3e

@ArielG-NV

Copy link
Copy Markdown
Collaborator Author

/ok to test a5f9ead

@ArielG-NV

Copy link
Copy Markdown
Collaborator Author

/ok to test 79c8053

@ArielG-NV

Copy link
Copy Markdown
Collaborator Author

/ok to test 69c5f6e

@ArielG-NV

Copy link
Copy Markdown
Collaborator Author

/ok to test e6b1e6f

@jarcherNV jarcherNV left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ArielG-NV
ArielG-NV marked this pull request as draft August 8, 2026 00:53
@ArielG-NV

ArielG-NV commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator Author

cache invalidation for ludus renderer physx builds requires hardening (more eager to delete), making pr into draft. will likely close and branch off with fixes.

@ArielG-NV

Copy link
Copy Markdown
Collaborator Author

same as #430

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[interactive-drive] better physics

2 participants