habitat-sim
habitat-sim copied to clipboard
Access semantic scene mesh directly
Motivation and Context
We have implemented the ability to directly access mesh data as discussed in issue #1081.
This required adding methods to the ResourceManager class and the Simulator class. We added python bindings to the methods in the Simulator class.
How Has This Been Tested
We added two new tests to tests/test_simulator.py, test_mesh_point_extraction and test_mesh_point_extraction_when_not_instance. The first one uses a datafile not present in the repository and is marked as skipped. It tests that the methods run and return vectors with the correct length.
The other test check that the methods throw an exception when the meshes are not of the GenericInstanceMeshData type.
Types of changes
- [ ] Docs change / refactoring / dependency upgrade
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the CONTRIBUTING document.
- [x] I have completed my CLA (see CONTRIBUTING)
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.
Sorry for loosing track of this for a long time. I'm updating it now to the current main.
You are going to need pull / rebase from master. Assigning @jturner65 to review since we now support more than just semantic meshes, but semantic textures / vertexes etc.
I rebased on main before making the requested changes.
Unfortunately I see some changes in the submodules in my PR branch. Any ideas on what I can do about this?
I rebased on main before making the requested changes.
Unfortunately I see some changes in the submodules in my PR branch. Any ideas on what I can do about this?
When you rebased you committed your local changes to the submodules, which reverted them to an older state. Always discard submodule changes when you rebase unless you explicitly are changing the submodules :).
@rantahar Hello, I also encounter the problem of accessing mesh directly. After cloning your repo https://github.com/AaltoRSE/habitat-sim, unfortunately, I cannot use APIs like sim.get_instance_mesh_keys()
shown in test_simulator.py. I wonder how the pr is going(it is not in the master branch yet) and also how I can use your code to access mesh. I will really appreciate it if you can provide some help!