def fell_over()

in bisk/tasks/stairs.py [0:0]


    def fell_over(self) -> bool:
        if self.robot.startswith('humanoid'):
            zpos = self.featurizer.relz()
            return bool(zpos < 0.9)
        elif self.robot.startswith('halfcheetah'):
            # Orientation pointing upwards and body almost on the ground
            up = self.p.named.data.xmat['robot/torso', 'zz']
            zpos = self.featurizer.relz()
            if up < -0.8 and zpos < 0.12:
                return True
        elif self.robot.startswith('walker'):
            zpos = self.featurizer.relz()
            r = self.p.named.data.qpos['robot/rooty']
            if zpos < 0.9 or r < -1.4 or r > 1.4:
                return True
        return False