MCPcopy Create free account
hub / github.com/InternRobotics/EmbodiedScan / Box3DMode

Class Box3DMode

embodiedscan/structures/bbox_3d/box_3d_mode.py:14–258  ·  view source on GitHub ↗

Enum of different ways to represent a box. Coordinates in LiDAR: .. code-block:: none up z ^ x front | / | / left y <------ 0 The relative coordinate of bottom center in a LiDAR box is

Source from the content-addressed store, hash-verified

12
13@unique
14class Box3DMode(IntEnum):
15 """Enum of different ways to represent a box.
16
17 Coordinates in LiDAR:
18
19 .. code-block:: none
20
21 up z
22 ^ x front
23 | /
24 | /
25 left y <------ 0
26
27 The relative coordinate of bottom center in a LiDAR box is (0.5, 0.5, 0),
28 and the yaw is around the z axis, thus the rotation axis=2.
29
30 Coordinates in Camera:
31
32 .. code-block:: none
33
34 z front
35 /
36 /
37 0 ------> x right
38 |
39 |
40 v
41 down y
42
43 The relative coordinate of bottom center in a CAM box is (0.5, 1.0, 0.5),
44 and the yaw is around the y axis, thus the rotation axis=1.
45
46 Coordinates in Depth:
47
48 .. code-block:: none
49
50 up z
51 ^ y front
52 | /
53 | /
54 0 ------> x right
55
56 The relative coordinate of bottom center in a DEPTH box is (0.5, 0.5, 0),
57 and the yaw is around the z axis, thus the rotation axis=2.
58 """
59
60 LIDAR = 0
61 CAM = 1
62 DEPTH = 2
63 EULER_CAM = 3
64 EULER_DEPTH = 4
65
66 @staticmethod
67 def convert(
68 box: Union[Sequence[float], np.ndarray, Tensor, BaseInstance3DBoxes],
69 src: 'Box3DMode',
70 dst: 'Box3DMode',
71 rt_mat: Optional[Union[np.ndarray, Tensor]] = None,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected