Skip to content

[Interactive Drive] Add physics via Physx - #423

Open
ArielG-NV wants to merge 13 commits into
NVIDIA:mainfrom
ArielG-NV:physics-test
Open

[Interactive Drive] Add physics via Physx#423
ArielG-NV wants to merge 13 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 rendering backend, and expands the CUDA renderer and driving presentation.

  • Adds native PhysX scene bindings, runtime integration, collision effects, debug visualization, and traffic/vehicle physics.
  • Makes game-like collision behavior conditional on game mode, including for programmatic AppConfig construction.
  • Replaces the former Vulkan renderer with a CUDA-only rendering path and updates documentation, dependencies, and tests.
  • Correctly retains each native scene as the owner of NumPy views returned from the PhysX bindings.

Confidence Score: 5/5

The PR appears safe to merge because no blocking failure remains.

The native buffer views now retain their NativeScene owner, and AppConfig initialization now disables game-mode-only behavior unless game mode is enabled, so both previously reported failures are resolved.

Important Files Changed

Filename Overview
integrations/omnidreams/ludus-renderer/ludus_renderer/_cpp/physx/bindings.cpp Adds native PhysX scene management and stable NumPy buffer views whose base objects now retain their NativeScene owner.
integrations/omnidreams/ludus-renderer/ludus_renderer/physx.py Provides the Python-facing PhysX world lifecycle and synchronizes object-graph state with the native scene.
integrations/omnidreams/ludus-renderer/ludus_renderer/object_graph.py Introduces the physics object graph, body models, barriers, poses, and simulation state structures.
integrations/omnidreams/omnidreams/interactive_drive/config.py Adds game-mode configuration and normalizes speed limits, collisions, and visual flares so programmatic defaults remain disabled.
integrations/omnidreams/omnidreams/interactive_drive/simulation/game_physics.py Integrates PhysX collision behavior and game-mode effects into the driving simulation.
integrations/omnidreams/ludus-renderer/ludus_renderer/_cpp/bindings/torch_rasterize_cuda.cpp Extends timestamped CUDA rendering and adds device, shape, stream, and renderer-state synchronization checks.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Input[Keyboard / Driving Input] --> Loop[Interactive Drive Runtime]
  Loop --> Graph[Physics Object Graph]
  Graph --> PhysX[Native PhysX Scene]
  PhysX --> Buffers[Stable Scene State Buffers]
  Buffers --> CUDA[CUDA Rasterizer]
  CUDA --> Views[RGB / BEV / PhysX Debug Views]
  PhysX --> Effects[Collision Flare and Game Effects]
Loading

Reviews (5): Last reviewed commit: "fix failing tests" | 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

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

1 participant