(self, alpha, num_joints)
Initialize the filter.

    Args:
      alpha: list of strings defining the alphas.
        The list must contain either 1 element (same filter for all joints)
        or num_joints elements
        0 < alpha <= 1
      num_joints: robot DOF
Initialize the filter.
Initialize the filter .
def __init__(self, alpha, num_joints):
    """Initialize the filter.

    Args:
      alpha: list of strings defining the alphas.
        The list must contain either 1 element (same filter for all joints)
        or num_joints elements
        0 < alpha <= 1
      num_joints: robot DOF
    """
    self.alphas = [float(x) for x in alpha]
    logging.info('Exponential filter: alpha: %d', self.alphas)

    a_coeffs = []
    b_coeffs = []
    for a in self.alphas:
      a_coeffs.append(np.asarray([1., a - 1.]))
      b_coeffs.append(np.asarray([a, 0]))

    order = 1
    self.ftype = 'lowpass'

    super(ActionFilterExp, self).__init__(
        a_coeffs, b_coeffs, order, num_joints, self.ftype)
def __init__ ( self , alpha , num_joints ) : self . alphas = [ float ( x ) for x in alpha ] logging . info ( 'Exponential filter: alpha: %d' , self . alphas ) a_coeffs = [ ] b_coeffs = [ ] for a in self . alphas : a_coeffs . append ( np . asarray ( [ 1. , a - 1. ] ) ) b_coeffs . append ( np . asarray ( [ a , 0 ] ) ) order = 1 self . ftype = 'lowpass' super ( ActionFilterExp , self ) . __init__ ( a_coeffs , b_coeffs , order , num_joints , self . ftype )