habitat-sim
habitat-sim copied to clipboard
[WIP] Python Sensor Refactor Version 2 (I messed up first time)
Motivation and Context
Refactoring sensor code in python to mirror what the C++ code does. Continuing work from pull requests #1118 and #1151 (and this improves upon the work in the branch correlating to PR #1849).
#1118 introduced SensorSuites and SubtreeSensorSuites in scene nodes.
#1151 attempted to deprecate simulator.Sensor and SensorSuites.
My code has eliminated simulator.Sensor, and works with a lot of tests, as well as viewer.py, but it still fails two CI tests. One seems to have to do with Cuda, and also I think torch is a problem, at least on my machine. I don't believe I have it installed
There are still some things depending on SensorSuites in the python code. As I read more, I think there is a use to being able to get the sensors directly without the sensor suite wrapper, as it is less memory transferred, while still having a use for the sensor suite itself.
I think in future, sensors should have references to their agent (if not None) and their scene node. Agents should have references to their node and sensor suite, and scene nodes should have references to their agents and maybe their own adapted sensor suite. Those are just simple changes we can make without rearranging the entire sensor architecture
How Has This Been Tested
It has not so far. I just merged the old code in PR #1151 with origin/main
Types of changes
- [x] Docs change / refactoring / dependency upgrade
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [x] My code follows the code style of this project.
- [x] 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)
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.