(self, player, ball)
Add observables of the soccer ball in this player's egocentric frame.

    Args:
      player: A `Walker` instance, the player we are adding observations for.
      ball: A `SoccerBall` instance.
Add observables of the soccer ball in this player's egocentric frame.
Add observables of the soccer ball in this player s egocentric frame .
def _add_player_observables_on_ball(self, player, ball):
    """Add observables of the soccer ball in this player's egocentric frame.

    Args:
      player: A `Walker` instance, the player we are adding observations for.
      ball: A `SoccerBall` instance.
    """
    # Origin callables for egocentric transformations.
    xpos_xyz_callable = lambda p: p.bind(player.walker.root_body).xpos
    xvel_xyz_callable = lambda p: p.bind(player.walker.root_body).cvel[3:]

    # Add egocentric ball observations.
    player.walker.observables.add_egocentric_vector(
        'ball_ego_angular_velocity', ball.observables.angular_velocity)
    player.walker.observables.add_egocentric_vector(
        'ball_ego_position',
        ball.observables.position,
        origin_callable=xpos_xyz_callable)
    player.walker.observables.add_egocentric_vector(
        'ball_ego_linear_velocity',
        ball.observables.linear_velocity,
        origin_callable=xvel_xyz_callable)
def _add_player_observables_on_ball ( self , player , ball ) : # Origin callables for egocentric transformations. xpos_xyz_callable = lambda p : p . bind ( player . walker . root_body ) . xpos xvel_xyz_callable = lambda p : p . bind ( player . walker . root_body ) . cvel [ 3 : ] # Add egocentric ball observations. player . walker . observables . add_egocentric_vector ( 'ball_ego_angular_velocity' , ball . observables . angular_velocity ) player . walker . observables . add_egocentric_vector ( 'ball_ego_position' , ball . observables . position , origin_callable = xpos_xyz_callable ) player . walker . observables . add_egocentric_vector ( 'ball_ego_linear_velocity' , ball . observables . linear_velocity , origin_callable = xvel_xyz_callable )