(self)
return contacts
Get minitaur's foot contact situation with the ground.

    Returns:
      A list of 4 booleans. The ith boolean is True if leg i is in contact with
      ground.
Get minitaur's foot contact situation with the ground.
Get minitaur s foot contact situation with the ground .
def GetFootContacts(self):
    """Get minitaur's foot contact situation with the ground.

    Returns:
      A list of 4 booleans. The ith boolean is True if leg i is in contact with
      ground.
    """
    contacts = []
    for leg_idx in range(MINITAUR_NUM_MOTORS // 2):
      link_id_1 = self._foot_link_ids[leg_idx * 2]
      link_id_2 = self._foot_link_ids[leg_idx * 2 + 1]
      contact_1 = bool(
          self._pybullet_client.getContactPoints(bodyA=0,
                                                 bodyB=self.quadruped,
                                                 linkIndexA=-1,
                                                 linkIndexB=link_id_1))
      contact_2 = bool(
          self._pybullet_client.getContactPoints(bodyA=0,
                                                 bodyB=self.quadruped,
                                                 linkIndexA=-1,
                                                 linkIndexB=link_id_2))
      contacts.append(contact_1 or contact_2)
    return contacts
def GetFootContacts ( self ) : contacts = [ ] for leg_idx in range ( MINITAUR_NUM_MOTORS // 2 ) : link_id_1 = self . _foot_link_ids [ leg_idx * 2 ] link_id_2 = self . _foot_link_ids [ leg_idx * 2 + 1 ] contact_1 = bool ( self . _pybullet_client . getContactPoints ( bodyA = 0 , bodyB = self . quadruped , linkIndexA = - 1 , linkIndexB = link_id_1 ) ) contact_2 = bool ( self . _pybullet_client . getContactPoints ( bodyA = 0 , bodyB = self . quadruped , linkIndexA = - 1 , linkIndexB = link_id_2 ) ) contacts . append ( contact_1 or contact_2 ) return contacts