(self, leg_masses)
Set the mass of the legs.

    A leg includes leg_link and motor. 4 legs contain 16 links (4 links each)
    and 8 motors. First 16 numbers correspond to link masses, last 8 correspond
    to motor masses (24 total).

    Args:
      leg_masses: The leg and motor masses for all the leg links and motors.

    Raises:
      ValueError: It is raised when the length of masses is not equal to number
        of links + motors.
Set the mass of the legs.
Set the mass of the legs .
def SetLegMasses(self, leg_masses):
    """Set the mass of the legs.

    A leg includes leg_link and motor. 4 legs contain 16 links (4 links each)
    and 8 motors. First 16 numbers correspond to link masses, last 8 correspond
    to motor masses (24 total).

    Args:
      leg_masses: The leg and motor masses for all the leg links and motors.

    Raises:
      ValueError: It is raised when the length of masses is not equal to number
        of links + motors.
    """
    if len(leg_masses) != len(self._leg_link_ids) + len(self._motor_link_ids):
      raise ValueError("The number of values passed to SetLegMasses are "
                       "different than number of leg links and motors.")
    for leg_id, leg_mass in zip(self._leg_link_ids, leg_masses):
      self._pybullet_client.changeDynamics(self.quadruped,
                                           leg_id,
                                           mass=leg_mass)
    motor_masses = leg_masses[len(self._leg_link_ids):]
    for link_id, motor_mass in zip(self._motor_link_ids, motor_masses):
      self._pybullet_client.changeDynamics(self.quadruped,
                                           link_id,
                                           mass=motor_mass)
def SetLegMasses ( self , leg_masses ) : if len ( leg_masses ) != len ( self . _leg_link_ids ) + len ( self . _motor_link_ids ) : raise ValueError ( "The number of values passed to SetLegMasses are " "different than number of leg links and motors." ) for leg_id , leg_mass in zip ( self . _leg_link_ids , leg_masses ) : self . _pybullet_client . changeDynamics ( self . quadruped , leg_id , mass = leg_mass ) motor_masses = leg_masses [ len ( self . _leg_link_ids ) : ] for link_id , motor_mass in zip ( self . _motor_link_ids , motor_masses ) : self . _pybullet_client . changeDynamics ( self . quadruped , link_id , mass = motor_mass )