-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ManagedObject to Receptacle matching #2074
Conversation
…ered by triangle mesh to point distance util
# TODO: This hack is the solution to the Bullet physics raycast margin bug. It should be migrated into every raycast from habitat-sim and then removed here. | ||
y_buffer = 0.08 | ||
raycast_results = sim.cast_ray( | ||
habitat_sim.geo.Ray( | ||
center + mn.Vector3(0, y_buffer, 0), grav_vector | ||
) | ||
) | ||
if raycast_results.has_hits(): | ||
for hit in raycast_results.hits: | ||
if hit.object_id != obj.object_id: | ||
support_surface_id = hit.object_id | ||
# print(f"first_hit true dist = {hit.ray_distance - y_buffer}") | ||
if hit.ray_distance >= y_buffer: | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this is the fix/hack which impacts the "above" check. Not integrated there yet, but be on the lookout for a habitat-sim PR.
@jacobkrantz @akshararai
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The feature appears to work well in HITL, but has some usability caveats.
Left some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I tested the feature extensively and it looks robust.
This one is ready, thanks for the suggestions. |
done |
Motivation and Context
This PR adds a set of utils targeting the application of matching an object or candidate object placement location to nearby Receptacles.
The util involves a few primary components:
point_to_tri_dist
- a vectorized 3D point to triangle mesh distance computation utildist_to_rec
- a function for Receptacles (only implemented forTriangleMeshReceptacle
currently) to get distance to the receptacle from a pointget_obj_receptacle_and_confidence
- a utility function for matching objects to receptacles. Includes logic for "floor" receptacles and region matching. Returns matches, a distance based confidence score, and a info_text string with a message explaining failure if applicable.The util is then integrated with HitL ui to constraint object placements to active Receptacles for better alignment with oracle skills.
How Has This Been Tested
Initially tested in HitL app.
This version tested in episode validation work.
TODO: no unit tests for this functionality yet.
Types of changes
Checklist