Skip to content
Snippets Groups Projects
Commit 12a37607 authored by Abhishek Kadian's avatar Abhishek Kadian
Browse files

use depth in metres

parent b224609c
No related merge requests found
...@@ -186,8 +186,8 @@ _C.PYROBOT.RGB_SENSOR.TYPE = "PyRobotRGBSensor" ...@@ -186,8 +186,8 @@ _C.PYROBOT.RGB_SENSOR.TYPE = "PyRobotRGBSensor"
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
_C.PYROBOT.DEPTH_SENSOR = PYROBOT_SENSOR.clone() _C.PYROBOT.DEPTH_SENSOR = PYROBOT_SENSOR.clone()
_C.PYROBOT.DEPTH_SENSOR.TYPE = "PyRobotDepthSensor" _C.PYROBOT.DEPTH_SENSOR.TYPE = "PyRobotDepthSensor"
_C.PYROBOT.DEPTH_SENSOR.MIN_DEPTH = 0 _C.PYROBOT.DEPTH_SENSOR.MIN_DEPTH = 0.0
_C.PYROBOT.DEPTH_SENSOR.MAX_DEPTH = 5 _C.PYROBOT.DEPTH_SENSOR.MAX_DEPTH = 5.0
_C.PYROBOT.DEPTH_SENSOR.NORMALIZE_DEPTH = True _C.PYROBOT.DEPTH_SENSOR.NORMALIZE_DEPTH = True
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# ACTIONS LOCOBOT # ACTIONS LOCOBOT
......
...@@ -96,6 +96,8 @@ class PyRobotDepthSensor(DepthSensor): ...@@ -96,6 +96,8 @@ class PyRobotDepthSensor(DepthSensor):
), ),
) )
obs = obs / 1000 # convert from mm to m
obs = np.clip(obs, self.config.MIN_DEPTH, self.config.MAX_DEPTH) obs = np.clip(obs, self.config.MIN_DEPTH, self.config.MAX_DEPTH)
if self.config.NORMALIZE_DEPTH: if self.config.NORMALIZE_DEPTH:
# normalize depth observations to [0, 1] # normalize depth observations to [0, 1]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment