(self,
               channels: typing.Iterable[typing.Text] = None,
               noisy_reading: bool = True,
               lower_bound: _FLOAT_OR_ARRAY = None,
               upper_bound: _FLOAT_OR_ARRAY = None,
               name: typing.Text = "IMU",
               dtype: typing.Type[typing.Any] = np.float64)
Constructs IMUSensor.

    It generates separate IMU value channels, e.g. IMU_R, IMU_P, IMU_dR, ...

    Args:
      channels: value channels wants to subscribe. A upper letter represents
        orientation and a lower letter represents angular velocity. (e.g. ['R',
        'P', 'Y', 'dR', 'dP', 'dY'] or ['R', 'P', 'dR', 'dP'])
      noisy_reading: whether values are true observations
      lower_bound: the lower bound IMU values
        (default: [-2pi, -2pi, -2000pi, -2000pi])
      upper_bound: the lower bound IMU values
        (default: [2pi, 2pi, 2000pi, 2000pi])
      name: the name of the sensor
      dtype: data type of sensor value
Constructs IMUSensor.
Constructs IMUSensor .
def __init__(self,
               channels: typing.Iterable[typing.Text] = None,
               noisy_reading: bool = True,
               lower_bound: _FLOAT_OR_ARRAY = None,
               upper_bound: _FLOAT_OR_ARRAY = None,
               name: typing.Text = "IMU",
               dtype: typing.Type[typing.Any] = np.float64) -> None:
    """Constructs IMUSensor.

    It generates separate IMU value channels, e.g. IMU_R, IMU_P, IMU_dR, ...

    Args:
      channels: value channels wants to subscribe. A upper letter represents
        orientation and a lower letter represents angular velocity. (e.g. ['R',
        'P', 'Y', 'dR', 'dP', 'dY'] or ['R', 'P', 'dR', 'dP'])
      noisy_reading: whether values are true observations
      lower_bound: the lower bound IMU values
        (default: [-2pi, -2pi, -2000pi, -2000pi])
      upper_bound: the lower bound IMU values
        (default: [2pi, 2pi, 2000pi, 2000pi])
      name: the name of the sensor
      dtype: data type of sensor value
    """
    self._channels = channels if channels else ["R", "P", "dR", "dP"]
    self._num_channels = len(self._channels)
    self._noisy_reading = noisy_reading

    # Compute the default lower and upper bounds
    if lower_bound is None and upper_bound is None:
      lower_bound = []
      upper_bound = []
      for channel in self._channels:
        if channel in ["R", "P", "Y"]:
          lower_bound.append(-2.0 * np.pi)
          upper_bound.append(2.0 * np.pi)
        elif channel in ["Rcos", "Rsin", "Pcos", "Psin", "Ycos", "Ysin"]:
          lower_bound.append(-1.)
          upper_bound.append(1.)
        elif channel in ["dR", "dP", "dY"]:
          lower_bound.append(-2000.0 * np.pi)
          upper_bound.append(2000.0 * np.pi)

    super(IMUSensor, self).__init__(
        name=name,
        shape=(self._num_channels,),
        lower_bound=lower_bound,
        upper_bound=upper_bound,
        dtype=dtype)

    # Compute the observation_datatype
    datatype = [("{}_{}".format(name, channel), self._dtype)
                for channel in self._channels]

    self._datatype = datatype
def __init__ ( self , channels : typing . Iterable [ typing . Text ] = None , noisy_reading : bool = True , lower_bound : _FLOAT_OR_ARRAY = None , upper_bound : _FLOAT_OR_ARRAY = None , name : typing . Text = "IMU" , dtype : typing . Type [ typing . Any ] = np . float64 ) -> None : self . _channels = channels if channels else [ "R" , "P" , "dR" , "dP" ] self . _num_channels = len ( self . _channels ) self . _noisy_reading = noisy_reading # Compute the default lower and upper bounds if lower_bound is None and upper_bound is None : lower_bound = [ ] upper_bound = [ ] for channel in self . _channels : if channel in [ "R" , "P" , "Y" ] : lower_bound . append ( - 2.0 * np . pi ) upper_bound . append ( 2.0 * np . pi ) elif channel in [ "Rcos" , "Rsin" , "Pcos" , "Psin" , "Ycos" , "Ysin" ] : lower_bound . append ( - 1. ) upper_bound . append ( 1. ) elif channel in [ "dR" , "dP" , "dY" ] : lower_bound . append ( - 2000.0 * np . pi ) upper_bound . append ( 2000.0 * np . pi ) super ( IMUSensor , self ) . __init__ ( name = name , shape = ( self . _num_channels , ) , lower_bound = lower_bound , upper_bound = upper_bound , dtype = dtype ) # Compute the observation_datatype datatype = [ ( "{}_{}" . format ( name , channel ) , self . _dtype ) for channel in self . _channels ] self . _datatype = datatype