habitat-sim
habitat-sim copied to clipboard
Python Sensor debug_draw
Motivation and Context
It can be useful to define custom debug drawing methods with a derived Simulator class (e.g. in Habitat-lab). This PR adds a hook to a debug_draw() function stub which is called in simulator.get_sensor_observations() and can be overridden for application specific debugging visualizations.
For example,
How Has This Been Tested
Overrode this in a Habitat-lab task and added DebugLineRender commands for an evaluation camera sensor.
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)
- [ ] I have added tests to cover my changes.
- [x] All new and existing tests passed.