def _get_obs()

in gym-compete/gym_compete/new_envs/agents/humanoid_kicker.py [0:0]


    def _get_obs(self):
        state = super(HumanoidKicker, self)._get_obs_relative()
        ball_xyz = self.get_ball_qpos()[:3]
        relative_xy = ball_xyz[:2] - self.get_qpos()[:2]
        relative_xyz = np.concatenate([relative_xy.flat, ball_xyz[2].flat])

        ball_goal_dist = self.TARGET - ball_xyz[0]
        ball_qvel = self.get_ball_qvel()[:3]
        ball_goal_y_dist1 = np.asarray(self.TARGET_Y - ball_xyz[1])
        ball_goal_y_dist2 = np.asarray(-self.TARGET_Y - ball_xyz[1])

        obs = np.concatenate([state.flat, relative_xyz.flat, np.asarray(ball_goal_dist).flat, ball_goal_y_dist1.flat, ball_goal_y_dist2.flat])
        assert np.isfinite(obs).all(), "Humanoid Kicker observation is not finite!!"
        return obs