Skip to content

[Nav] - Islands topdown map#1903

Merged
aclegg3 merged 5 commits intomainfrom
islands-topdown-map
Oct 24, 2022
Merged

[Nav] - Islands topdown map#1903
aclegg3 merged 5 commits intomainfrom
islands-topdown-map

Conversation

@aclegg3
Copy link
Copy Markdown
Contributor

@aclegg3 aclegg3 commented Oct 19, 2022

Motivation and Context

It can be very useful to get a topdown map with island annotations and now after #1866 this is pretty easy.
In addition to binary maps of navigability (PathFinder.get_topdown_view), the API now provides PathFinder.get_topdown_island_view which returns an integer array containing island indices or -1 for non-navigable cells.

How Has This Been Tested

New pytests.

See the examples below for a scene with multiple islands due to low doorways:
image

6AGcGQf2wof_topdown_islands npy

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@aclegg3 aclegg3 requested a review from Skylion007 October 19, 2022 18:23
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Oct 19, 2022
Comment thread src/esp/nav/PathFinder.cpp Outdated
Comment thread src/esp/nav/PathFinder.cpp
Comment thread src_python/habitat_sim/utils/viz_utils.py
Comment thread src/esp/nav/PathFinder.h Outdated
Comment thread src/esp/bindings/ShortestPathBindings.cpp Outdated
Comment thread tests/test_navmesh.py Outdated
Comment thread tests/test_navmesh.py Outdated
return topdownMap;
}

typedef Eigen::Matrix<int, Eigen::Dynamic, Eigen::Dynamic> MatrixXi;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should be use using, not typedef.

@aclegg3 aclegg3 merged commit e98c124 into main Oct 24, 2022
@aclegg3 aclegg3 deleted the islands-topdown-map branch October 24, 2022 15:30
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.

5 participants