MCPcopy Create free account
hub / github.com/OpenDriveLab/TCP / _get_dist

Method _get_dist

leaderboard/team_code/base_agent.py:830–845  ·  view source on GitHub ↗

Returns the distance between p1 and p2 Args: target ([type]): [description] Returns: [type]: [description]

(self, p1, p2)

Source from the content-addressed store, hash-verified

828
829
830 def _get_dist(self, p1, p2):
831 """Returns the distance between p1 and p2
832
833 Args:
834 target ([type]): [description]
835
836 Returns:
837 [type]: [description]
838 """
839
840 distance = np.sqrt(
841 (p1[0] - p2[0]) ** 2 +
842 (p1[1] - p2[1]) ** 2 +
843 (p1[2] - p2[2]) ** 2)
844
845 return distance
846
847 def _get_distance(self, target):
848 """Returns the distance from the (rgb_front) camera to the target

Callers 1

_get_2d_bb_baselineMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected