Commit 4b587d1
authored
Fix NewtonManager scene data provider backend detection when _sim is unset (isaac-sim#5710)
## Summary
- `NewtonManager._backend_is_newton` returned `False` when
`PhysicsManager._sim` was `None`, even if a `SimulationContext`
instance existed — leaving backend detection inconsistent with
`update_visualization_state`, which already fell back to
`SimulationContext.instance()`.
- Introduce a shared `NewtonManager.get_scene_data_provider` classmethod
that prefers `PhysicsManager._sim` and falls back to
`SimulationContext.instance()`.
- Route both `_backend_is_newton` and `update_visualization_state`
through the new helper so they agree on the active scene-data
provider.
## Test plan
- [ ] Run the relevant `isaaclab_newton` physics tests:
`./isaaclab.sh -p -m pytest source/isaaclab_newton/test`
- [ ] Exercise a PhysX-backed scene where `PhysicsManager._sim` is unset
at the moment `get_state` is called and confirm visualization
transforms are populated.
- [ ] Confirm Newton-backed runs still short-circuit
`update_visualization_state` (no shadow model built).
- [ ] `./isaaclab.sh -f`1 parent 93e86f9 commit 4b587d1
4 files changed
Lines changed: 42 additions & 20 deletions
File tree
- source
- isaaclab_newton
- changelog.d
- isaaclab_newton/physics
- isaaclab
- changelog.d
- test/sim
Whitespace-only changes.
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| 156 | + | |
156 | 157 | | |
157 | 158 | | |
158 | 159 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
Lines changed: 29 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| |||
1534 | 1533 | | |
1535 | 1534 | | |
1536 | 1535 | | |
1537 | | - | |
| 1536 | + | |
1538 | 1537 | | |
1539 | 1538 | | |
1540 | 1539 | | |
| |||
1553 | 1552 | | |
1554 | 1553 | | |
1555 | 1554 | | |
1556 | | - | |
| 1555 | + | |
1557 | 1556 | | |
1558 | 1557 | | |
1559 | 1558 | | |
1560 | | - | |
1561 | | - | |
1562 | | - | |
1563 | | - | |
| 1559 | + | |
1564 | 1560 | | |
1565 | 1561 | | |
1566 | 1562 | | |
| |||
1762 | 1758 | | |
1763 | 1759 | | |
1764 | 1760 | | |
1765 | | - | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
1766 | 1778 | | |
1767 | 1779 | | |
1768 | 1780 | | |
| |||
1777 | 1789 | | |
1778 | 1790 | | |
1779 | 1791 | | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
1780 | 1798 | | |
1781 | 1799 | | |
1782 | 1800 | | |
1783 | 1801 | | |
1784 | 1802 | | |
1785 | | - | |
1786 | | - | |
1787 | | - | |
1788 | | - | |
1789 | | - | |
1790 | | - | |
1791 | | - | |
1792 | 1803 | | |
1793 | 1804 | | |
1794 | 1805 | | |
1795 | 1806 | | |
1796 | 1807 | | |
1797 | | - | |
| 1808 | + | |
1798 | 1809 | | |
1799 | 1810 | | |
1800 | | - | |
| 1811 | + | |
1801 | 1812 | | |
1802 | 1813 | | |
1803 | 1814 | | |
| |||
0 commit comments