(self)
return np.where(rf_readings == no_intersection, 1.0, np.tanh(rf_readings))
Returns scaled rangefinder sensor readings.
Returns scaled rangefinder sensor readings.
Returns scaled rangefinder sensor readings .
def rangefinder(self):
    """Returns scaled rangefinder sensor readings."""
    rf_sensors = self._get_sensor_names(enums.mjtSensor.mjSENS_RANGEFINDER)
    rf_readings = self.named.data.sensordata[rf_sensors]
    no_intersection = -1.0
    return np.where(rf_readings == no_intersection, 1.0, np.tanh(rf_readings))
def rangefinder ( self ) : rf_sensors = self . _get_sensor_names ( enums . mjtSensor . mjSENS_RANGEFINDER ) rf_readings = self . named . data . sensordata [ rf_sensors ] no_intersection = - 1.0 return np . where ( rf_readings == no_intersection , 1.0 , np . tanh ( rf_readings ) )