facebookresearch / habitat-sim

A flexible, high-performance 3D simulator for Embodied AI research.
https://aihabitat.org/
MIT License
2.58k stars 419 forks source link

[bugfix] - raycast buffer distance #2466

Closed aclegg3 closed 3 weeks ago

aclegg3 commented 3 weeks ago

Motivation and Context

This PR fixes a long-standing raycasting bug related to the behavior of Bullet physics raycasting within the collision margin of a convex shape.

TL;DR: we add a hidden "buffer distance" to the raycast to avoid missing an object from within its margin.

Context:

Solution:

How Has This Been Tested

CI raycast tests still pass as before with expected global hit points and distances, despite the buffer. Added new unit tests to specifically target this bug and demonstrate the solution.

Types of changes

Checklist