MCPcopy Create free account
hub / github.com/PJLab-ADG/OASim / get_vertexes

Method get_vertexes

limsim/utils/obstacles.py:42–49  ·  view source on GitHub ↗
(self, center: np.ndarray)

Source from the content-addressed store, hash-verified

40 return self._yaw
41
42 def get_vertexes(self, center: np.ndarray) -> np.ndarray:
43 points = np.array([[self.length, self.width],
44 [-self.length, self.width],
45 [-self.length, -self.width],
46 [self.length, -self.width]]) / 2
47 rotation = np.array([[np.cos(self.yaw), -np.sin(self.yaw)],
48 [np.sin(self.yaw), np.cos(self.yaw)]])
49 return center + np.array([rotation.dot(point) for point in points])
50
51 def in_collision(self, self_center: np.ndarray,
52 other_rectangle: 'Rectangle',

Callers 2

in_collisionMethod · 0.95
plotSelfMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected