Skip to content
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

AnyObjectReceptacle #1924

Merged
merged 5 commits into from
Apr 29, 2024
Merged

AnyObjectReceptacle #1924

merged 5 commits into from
Apr 29, 2024

Conversation

aclegg3
Copy link
Contributor

@aclegg3 aclegg3 commented Apr 25, 2024

Motivation and Context

This PR introduces the AnyObjectReceptacle. This allows any object in the simulation to be used as a Receptacle by implementing the Receptacle API in a generic way:

  • The top surface of the global bounding box of the object in its current state is used as the sampling region for snap_down placements.
  • Can support RigidObject, ArticulatedObject, ArticulatedLink
  • Can be added to the world at any time
  • Can debug draw itself
  • supports a required "up" direction (Y+ axis) preventing placement when the object is upside down or sideways

Future Improvements/iterative work:

  • TODO: optionally disable "up" direction to support stacking objects in any orientation
  • TODO: option to pre-generate a discrete set of candidate points in object local space instead of using the global AABB.
  • TODO: bounds attribute cannot be computed because Receptacle does not expect access to sim for this.
  • TODO: transform caching and dirty check could prevent wasted cycles when the object has not moved between queries.

How Has This Been Tested

Added a unit test.

Local testing in example app. The video below takes place in a ReplicaCAD scene. Pre-configured AABBReceptacles already exist in the scene. Some objects do not have Receptacles configured. When the user clicks such an object, an AnyObjectReceptacle is added. This can then be used to sample snap_down placements.

Notice that these placements are not very good (especially with dynamic simulation stability). That's why we annotate Receptacles instead of using this approach in general. However, this is better than nothing and should serve for kinematic use cases.

any_object_receptacle-2024-04-25_15.38.22.mp4

Types of changes

  • [Development] A pull request that add new features to the habitat-lab task and environment codebase. Development Pull Requests must be small (less that 500 lines of code change), have unit testing, very extensive documentation and examples. These are typically new tasks, environments, sensors, etc... The review process for these Pull Request is longer because these changes will be maintained by our core team of developers, so make sure your changes are easy to understand!

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation if required.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes if required.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 25, 2024
@aclegg3 aclegg3 changed the title [WIP] AnyObjectReceptacle AnyObjectReceptacle Apr 26, 2024
@aclegg3 aclegg3 marked this pull request as ready for review April 26, 2024 19:41
Copy link

@rutadesai rutadesai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Excited to integrate this when ready :)

@aclegg3 aclegg3 merged commit c3b4eed into main Apr 29, 2024
3 of 4 checks passed
@aclegg3 aclegg3 deleted the alex-04_24-any_object_receptacle branch April 29, 2024 15:36
dannymcy pushed a commit to dannymcy/habitat-lab that referenced this pull request Jun 26, 2024
* add AnyObjectReceptacle initial implementation
dannymcy pushed a commit to dannymcy/habitat-lab that referenced this pull request Jul 8, 2024
* add AnyObjectReceptacle initial implementation
dannymcy pushed a commit to dannymcy/habitat-lab that referenced this pull request Jul 8, 2024
* add AnyObjectReceptacle initial implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants