-
Notifications
You must be signed in to change notification settings - Fork 500
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
[WIP][HitL] - add query for mapping between object placement point and Receptacle. #2051
base: main
Are you sure you want to change the base?
Conversation
…Integrated with hitl UI to prevent invalid placements
…ements and add info_text return for use in UI tooltips
print( | ||
f"Placed object on Receptacle '{_placement_receptacle}', confidence[0,1]={_confidence}. Info text: {_info_text}" | ||
) |
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.
Replace this with necessary event logic to cache the new object->Receptacle parenting
point, receptacle_object_id | ||
) | ||
if recepacle_name is None: | ||
# TODO: display the _info_text with failure message |
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.
TODO: UI hook needed here to tell the user why thir placement point isn't valid
@@ -720,6 +721,7 @@ def _create_recep_info( | |||
self, scene_id: str, ignore_handles: List[str] | |||
) -> Dict[str, Receptacle]: | |||
if scene_id not in self._receptacles_cache: | |||
# TODO: consume the filter file to limit loaded receptacle to the "active" set? |
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.
Doing this in a separate PR in case it breaks other parts of the codebase. Will link here when ready.
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.
PR: #2053
def get_place_obj_receptacle_and_confidence( | ||
self, | ||
bottom_point: np.ndarray, | ||
support_surface_id: int, | ||
max_dist_to_rec: float = 0.25, | ||
) -> Tuple[Optional[str], float, str]: |
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.
This utility should probably be moved somewhere like sim_utilities,py so it can be consumed elsewhere in the stack.
def point_to_tri_dist( | ||
self, point: np.ndarray, triangles: np.ndarray | ||
) -> Tuple[float, np.ndarray]: |
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.
This utility probably belongs in habitat-sim geometry utils.
local_point = t_form.inverted().transform_point(point) | ||
# iterate over the triangles, getting point to edge distances | ||
# NOTE: list of lists, each with 3 numpy arrays, one for each vertex | ||
# TODO: these could be cached since it doesn't require local->global transform |
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.
This could be done in receptacle.py
raise NotImplementedError( | ||
"TODO: add handling for other Receptacle types." | ||
) |
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.
Note the limitation. This will only be a problem for use with ReplicaCAD and other older AABBReceptacle types.
Looks good so far. Let me know when you're ready for another review pass. |
Motivation and Context
Also integrated with hitl UI to prevent invalid placements.
TODO: more details and some refactoring
How Has This Been Tested
locally in HitL deployment
Types of changes
Checklist