Commit 1d70296
committed
Eagerly construct OvPhysxSceneDataBackend in OvPhysxManager.initialize
SimulationContext.__init__ wires up the central SceneDataProvider with
the result of physics_manager.get_scene_data_backend() — when the
backend was lazy-constructed in _warmup_and_load, that capture happened
before warmup and the SDP held backend=None forever, breaking
NewtonManager.update_visualization_state on the first call to
visualizer.initialize().
Construct the backend instance in initialize() (matches PhysX's
pattern) so SimulationContext gets a real reference. setup() still
runs in _warmup_and_load when the wheel and USD stage are live; the
backend reports empty transform_paths until then, which create_mapping
already handles (returns None).
Also clear the singleton in close() so cached TensorBinding handles
don't survive a physx.reset() across SimulationContext restarts.
Matches Newton's lifecycle.1 parent d4855e4 commit 1d70296
1 file changed
Lines changed: 20 additions & 4 deletions
Lines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
261 | 269 | | |
262 | 270 | | |
263 | 271 | | |
| |||
299 | 307 | | |
300 | 308 | | |
301 | 309 | | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
302 | 315 | | |
303 | 316 | | |
304 | 317 | | |
| |||
339 | 352 | | |
340 | 353 | | |
341 | 354 | | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
346 | 362 | | |
347 | 363 | | |
348 | 364 | | |
| |||
0 commit comments