MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / rangefinder

Method rangefinder

dm_control/suite/quadruped.py:203–208  ·  view source on GitHub ↗

Returns scaled rangefinder sensor readings.

(self)

Source from the content-addressed store, hash-verified

201 return self.named.data.sensordata[imu_sensors]
202
203 def rangefinder(self):
204 """Returns scaled rangefinder sensor readings."""
205 rf_sensors = self._get_sensor_names(enums.mjtSensor.mjSENS_RANGEFINDER)
206 rf_readings = self.named.data.sensordata[rf_sensors]
207 no_intersection = -1.0
208 return np.where(rf_readings == no_intersection, 1.0, np.tanh(rf_readings))
209
210 def origin_distance(self):
211 """Returns the distance from the origin to the workspace."""

Callers 1

get_observationMethod · 0.80

Calls 1

_get_sensor_namesMethod · 0.95

Tested by

no test coverage detected