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

[Bug Fix] change the snap point to be attached the largest island id #1371

Merged
merged 8 commits into from
Jul 19, 2023

Conversation

jimmytyyang
Copy link
Contributor

Motivation and Context

This PR ensures that the snap point of the object is always in the largest island. Previously it was checked by computing the largest island radius, which is not stable.

This is the joint work with Alex!

How Has This Been Tested

Run the script, and it generates the episode.

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 May 23, 2023
@jimmytyyang jimmytyyang requested a review from aclegg3 May 23, 2023 13:14
Copy link
Contributor

@aclegg3 aclegg3 left a comment

Choose a reason for hiding this comment

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

API suggestion. This should be faster and more accurately capture the largest island.

Copy link
Contributor

@aclegg3 aclegg3 left a comment

Choose a reason for hiding this comment

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

Looking good. Small efficiency idea.

@jimmytyyang jimmytyyang requested a review from aclegg3 May 30, 2023 18:32
Copy link
Contributor

@aclegg3 aclegg3 left a comment

Choose a reason for hiding this comment

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

Looks good to me overall.

My only remaining consideration is that the largest island may not always be the correct one. For example if the scene has a large pool/yard then that may be a larger navmesh than the interior.

Possible improvements:

  1. Make this configurable. Allow users to turn off this check (maybe already done?)
  2. Check if the navmesh is outdoors (raycast upwards does not hit a ceiling). This won't work for all scenes, but should work for some.

We should have a way to validate this logic for any scenes we want to use. Maybe a script to highlight the largest navmesh island in a topdown view or map.

@jimmytyyang
Copy link
Contributor Author

Hi @aclegg3! I have added the flag for checking the largest island ID. Please let me know if we want to do raycast. I think I know how to do it but want to check if you still think it is needed. Thank you!

Copy link
Contributor

@aclegg3 aclegg3 left a comment

Choose a reason for hiding this comment

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

LGTM

@jimmytyyang jimmytyyang merged commit ef8d6e7 into main Jul 19, 2023
1 check passed
aclegg3 added a commit that referenced this pull request Aug 2, 2023
…tached the largest island id (#1371)

* allow the users to set if the snapped point in the largest island id

* clean-up, document, pass variable through from config

---------

Co-authored-by: Jimmy Yang <jimmytyyang@meta.com>
Co-authored-by: aclegg3 <alexanderwclegg@gmail.com>
dannymcy pushed a commit to dannymcy/habitat-lab that referenced this pull request Jul 8, 2024
…acebookresearch#1371)

* change the snap point to be arrached the largest island id

* based on Alex and Aaron suggestion

* change it to list format

* add back list map trick

* cahce

* allow the users to set if the snapped point in the largest island id

* clean-up, document, pass variable through from config

---------

Co-authored-by: Jimmy Yang <jimmytyyang@meta.com>
Co-authored-by: aclegg3 <alexanderwclegg@gmail.com>
HHYHRHY pushed a commit to SgtVincent/habitat-lab that referenced this pull request Aug 31, 2024
…acebookresearch#1371)

* change the snap point to be arrached the largest island id

* based on Alex and Aaron suggestion

* change it to list format

* add back list map trick

* cahce

* allow the users to set if the snapped point in the largest island id

* clean-up, document, pass variable through from config

---------

Co-authored-by: Jimmy Yang <jimmytyyang@meta.com>
Co-authored-by: aclegg3 <alexanderwclegg@gmail.com>
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