Skip to content

Commit

Permalink
Add UUID config to simulator visual sensors (facebookresearch#472)
Browse files Browse the repository at this point in the history
* Add UUID config to simulator visual sensors

* Add comments about UUID and add to BumpSensor

* Incorporate suggestions

* Remove unused code

* Make base sensor have overidable UUID
  • Loading branch information
Skylion007 authored Sep 4, 2020
1 parent b525867 commit 71f4a2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion habitat/core/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ class Sensor:

def __init__(self, *args: Any, **kwargs: Any) -> None:
self.config = kwargs["config"] if "config" in kwargs else None
self.uuid = self._get_uuid(*args, **kwargs)
if hasattr(self.config, "UUID"):
# We allow any sensor config to override the UUID
self.uuid = self.config.UUID
else:
self.uuid = self._get_uuid(*args, **kwargs)
self.sensor_type = self._get_sensor_type(*args, **kwargs)
self.observation_space = self._get_observation_space(*args, **kwargs)

Expand Down

0 comments on commit 71f4a2c

Please sign in to comment.