(self)
return np.linalg.norm(self_to_ball[:2])
Returns horizontal distance from the quadruped workspace to the ball.
Returns horizontal distance from the quadruped workspace to the ball.
Returns horizontal distance from the quadruped workspace to the ball .
def self_to_ball_distance(self):
    """Returns horizontal distance from the quadruped workspace to the ball."""
    self_to_ball = (self.named.data.site_xpos['workspace']
                    -self.named.data.xpos['ball'])
    return np.linalg.norm(self_to_ball[:2])
def self_to_ball_distance ( self ) : self_to_ball = ( self . named . data . site_xpos [ 'workspace' ] - self . named . data . xpos [ 'ball' ] ) return np . linalg . norm ( self_to_ball [ : 2 ] )