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

Method __init__

limsim/utils/trajectory.py:26–35  ·  view source on GitHub ↗
(self, center: list[float], length: float, width: float,
                 yaw: float)

Source from the content-addressed store, hash-verified

24class Rectangle:
25
26 def __init__(self, center: list[float], length: float, width: float,
27 yaw: float) -> None:
28 self.center = np.array(center)
29 self.length = length
30 self.width = width
31 self.yaw = yaw
32 self.rotateMat = self.getRotateMat()
33 self.iRotate = np.linalg.inv(self.rotateMat)
34 self.sCorners = self.getSCorners()
35 self.corners = self.getCorners()
36
37 def getRotateMat(self) -> np.ndarray:
38 return np.array([[np.cos(self.yaw), -np.sin(self.yaw)],

Callers

nothing calls this directly

Calls 3

getRotateMatMethod · 0.95
getSCornersMethod · 0.95
getCornersMethod · 0.95

Tested by

no test coverage detected