(self, kp, kd)
Set the gains of all motors.

    These gains are PD gains for motor positional control. kp is the
    proportional gain and kd is the derivative gain.

    Args:
      kp: proportional gain(s) of the motors.
      kd: derivative gain(s) of the motors.
Set the gains of all motors.
Set the gains of all motors .
def SetMotorGains(self, kp, kd):
    """Set the gains of all motors.

    These gains are PD gains for motor positional control. kp is the
    proportional gain and kd is the derivative gain.

    Args:
      kp: proportional gain(s) of the motors.
      kd: derivative gain(s) of the motors.
    """
    if isinstance(kp, (collections.Sequence, np.ndarray)):
      self._motor_kps = np.asarray(kp)
    else:
      self._motor_kps = np.full(self.num_motors, kp)

    if isinstance(kd, (collections.Sequence, np.ndarray)):
      self._motor_kds = np.asarray(kd)
    else:
      self._motor_kds = np.full(self.num_motors, kd)

    self._motor_model.set_motor_gains(kp, kd)
def SetMotorGains ( self , kp , kd ) : if isinstance ( kp , ( collections . Sequence , np . ndarray ) ) : self . _motor_kps = np . asarray ( kp ) else : self . _motor_kps = np . full ( self . num_motors , kp ) if isinstance ( kd , ( collections . Sequence , np . ndarray ) ) : self . _motor_kds = np . asarray ( kd ) else : self . _motor_kds = np . full ( self . num_motors , kd ) self . _motor_model . set_motor_gains ( kp , kd )