Commit abbf838
authored
Rename IMU sensor to PVA and add real IMU sensor (#5247)
## Summary
- Renamed the existing IMU sensor (pose + velocity + acceleration) to
**PVA** (`Pva`, `PvaCfg`, `PvaData`, `BasePva`, `BasePvaData`) across
both `isaaclab` and `isaaclab_physx` packages.
- Created a new lightweight **IMU** sensor (`Imu`, `ImuCfg`, `ImuData`,
`BaseImu`, `BaseImuData`) that only provides the two physical quantities
a real inertial measurement unit measures: **angular velocity**
(gyroscope) and **linear acceleration** (accelerometer).
- Updated all consumers: observation functions (`pva_orientation`,
`pva_projected_gravity`, `imu_ang_vel`, `imu_lin_acc`), mock interfaces,
tests, demo scripts, and changelogs.
### Why
The old "IMU" sensor was a misnomer — it provided full pose, velocity,
and acceleration data, far more than a real IMU measures. The rename
clarifies the API:
- **PVA** = full state sensor (pose, velocity, acceleration) for
simulation use
- **IMU** = realistic sensor model (angular velocity + linear
acceleration only)
### What changed
| Area | Change |
|------|--------|
| `isaaclab/sensors/imu/` → `isaaclab/sensors/pva/` | Renamed all
classes, factory, config |
| `isaaclab_physx/sensors/imu/` → `isaaclab_physx/sensors/pva/` |
Renamed PhysX impl, kernels |
| New `isaaclab/sensors/imu/` | Lightweight IMU base classes |
| New `isaaclab_physx/sensors/imu/` | PhysX IMU impl with simplified
Warp kernels |
| `observations.py` | `imu_orientation`→`pva_orientation`,
`imu_projected_gravity`→`pva_projected_gravity` |
| Mock interfaces | Split `MockImu` (2 fields) / `MockPva` (8 fields) |
| Tests | `test_pva.py` (8 tests), `test_imu.py` (8 tests), mock tests
updated |
| Demos | `pva_sensor.py` + `imu_sensor.py` |
## Test plan
- [x] `test_pva.py` — 8 tests pass (constant velocity, constant
acceleration, pendulum, indirect attachment, offset, validity, env_ids,
print)
- [x] `test_imu.py` — 8 tests pass (same test suite adapted for IMU-only
fields)
- [x] `test_mock_sensors.py` — 29 tests pass (IMU + PVA + contact +
frame transformer mocks)
- [x] `test_mock_data_properties.py` — 254 tests pass
- [x] Pre-commit hooks all pass
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent 50b6ccc commit abbf838
42 files changed
Lines changed: 2518 additions & 844 deletions
File tree
- docs/source/migration
- scripts/demos/sensors
- source
- isaaclab_physx
- config
- docs
- isaaclab_physx/sensors
- imu
- pva
- test/sensors
- isaaclab
- config
- docs
- isaaclab
- envs/mdp
- sensors
- imu
- pva
- test/mock_interfaces
- sensors
- utils
- test/test_mock_interfaces
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
121 | 129 | | |
122 | 130 | | |
123 | 131 | | |
| |||
126 | 134 | | |
127 | 135 | | |
128 | 136 | | |
| 137 | + | |
129 | 138 | | |
130 | 139 | | |
131 | 140 | | |
| |||
156 | 165 | | |
157 | 166 | | |
158 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
159 | 238 | | |
160 | 239 | | |
161 | 240 | | |
162 | 241 | | |
163 | | - | |
| 242 | + | |
164 | 243 | | |
165 | 244 | | |
166 | 245 | | |
| |||
787 | 866 | | |
788 | 867 | | |
789 | 868 | | |
790 | | - | |
| 869 | + | |
791 | 870 | | |
792 | 871 | | |
793 | 872 | | |
| |||
851 | 930 | | |
852 | 931 | | |
853 | 932 | | |
| 933 | + | |
| 934 | + | |
854 | 935 | | |
855 | 936 | | |
856 | 937 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | 76 | | |
80 | 77 | | |
81 | 78 | | |
| |||
93 | 90 | | |
94 | 91 | | |
95 | 92 | | |
96 | | - | |
97 | 93 | | |
98 | | - | |
99 | 94 | | |
100 | | - | |
101 | 95 | | |
102 | 96 | | |
103 | 97 | | |
| |||
110 | 104 | | |
111 | 105 | | |
112 | 106 | | |
113 | | - | |
114 | 107 | | |
115 | 108 | | |
116 | | - | |
117 | 109 | | |
118 | 110 | | |
119 | | - | |
120 | 111 | | |
121 | 112 | | |
122 | | - | |
123 | 113 | | |
124 | 114 | | |
125 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
4 | 44 | | |
5 | 45 | | |
6 | 46 | | |
| |||
0 commit comments