dart
dart copied to clipboard
Fix HeightmapShape visual/collision mismatch (ODE)
Fixes #1658
HeightmapShape visual rendering and collision geometry were misaligned (most visible with ODE heightfields). This series aligns the visual mesh and collision origin, and tightens heightmap bounds handling.
- Center heightmap render vertices around the origin and align the ODE heightfield transform so visual/collision match.
- Compute HeightmapShape bounding box using sample spacing (
(N-1) * scale) and add a regression test. - Fix ODE heightfield AABB bounds for
scale.z < 1by passing unscaled min/max heights; add an ODE regression test. - Update the gz-physics integration patch to compute heightmap spacing using
(vertSize-1)so Gazebo Physics tests match DART's heightmap semantics.
Before creating a pull request
- [x] Run
pixi run test-allto lint, build, and test your changes - [x] Add unit tests for new functionality
- [ ] Document new methods and classes
- [ ] Add Python bindings (dartpy) if applicable