antioch-py 2.2.3__py3-none-any.whl → 3.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of antioch-py might be problematic. Click here for more details.

Files changed (94) hide show
  1. antioch/__init__.py +101 -0
  2. antioch/{module/execution.py → execution.py} +1 -1
  3. antioch/{module/input.py → input.py} +2 -4
  4. antioch/{module/module.py → module.py} +17 -34
  5. antioch/{module/node.py → node.py} +17 -16
  6. {antioch_py-2.2.3.dist-info → antioch_py-3.0.0.dist-info}/METADATA +8 -11
  7. antioch_py-3.0.0.dist-info/RECORD +61 -0
  8. {antioch_py-2.2.3.dist-info → antioch_py-3.0.0.dist-info}/WHEEL +1 -1
  9. antioch_py-3.0.0.dist-info/licenses/LICENSE +21 -0
  10. common/ark/__init__.py +6 -16
  11. common/ark/ark.py +23 -62
  12. common/ark/hardware.py +1 -1
  13. common/ark/kinematics.py +1 -1
  14. common/ark/module.py +22 -0
  15. common/ark/node.py +46 -3
  16. common/ark/scheduler.py +2 -29
  17. common/ark/sim.py +1 -1
  18. {antioch/module → common/ark}/token.py +17 -0
  19. common/assets/rigging.usd +0 -0
  20. common/constants.py +63 -5
  21. common/core/__init__.py +37 -24
  22. common/core/auth.py +87 -112
  23. common/core/container.py +261 -0
  24. common/core/registry.py +131 -152
  25. common/core/rome.py +251 -0
  26. common/core/telemetry.py +176 -0
  27. common/core/types.py +219 -0
  28. common/message/__init__.py +19 -5
  29. common/message/annotation.py +174 -23
  30. common/message/array.py +25 -1
  31. common/message/camera.py +23 -1
  32. common/message/color.py +32 -6
  33. common/message/detection.py +40 -0
  34. common/message/foxglove.py +20 -0
  35. common/message/frame.py +71 -7
  36. common/message/image.py +58 -9
  37. common/message/imu.py +24 -4
  38. common/message/joint.py +69 -10
  39. common/message/log.py +52 -7
  40. common/message/pir.py +23 -8
  41. common/message/plot.py +57 -0
  42. common/message/point.py +55 -6
  43. common/message/point_cloud.py +55 -19
  44. common/message/pose.py +59 -19
  45. common/message/quaternion.py +105 -92
  46. common/message/radar.py +195 -29
  47. common/message/twist.py +34 -0
  48. common/message/types.py +40 -5
  49. common/message/vector.py +180 -245
  50. common/sim/__init__.py +49 -0
  51. common/{session/config.py → sim/objects.py} +97 -27
  52. common/sim/state.py +11 -0
  53. common/utils/comms.py +30 -12
  54. common/utils/logger.py +26 -7
  55. antioch/message.py +0 -87
  56. antioch/module/__init__.py +0 -53
  57. antioch/session/__init__.py +0 -152
  58. antioch/session/ark.py +0 -500
  59. antioch/session/asset.py +0 -65
  60. antioch/session/error.py +0 -80
  61. antioch/session/objects/__init__.py +0 -40
  62. antioch/session/objects/animation.py +0 -162
  63. antioch/session/objects/articulation.py +0 -180
  64. antioch/session/objects/basis_curve.py +0 -180
  65. antioch/session/objects/camera.py +0 -65
  66. antioch/session/objects/collision.py +0 -46
  67. antioch/session/objects/geometry.py +0 -58
  68. antioch/session/objects/ground_plane.py +0 -48
  69. antioch/session/objects/imu.py +0 -53
  70. antioch/session/objects/joint.py +0 -49
  71. antioch/session/objects/light.py +0 -123
  72. antioch/session/objects/pir_sensor.py +0 -98
  73. antioch/session/objects/radar.py +0 -62
  74. antioch/session/objects/rigid_body.py +0 -197
  75. antioch/session/objects/xform.py +0 -119
  76. antioch/session/record.py +0 -158
  77. antioch/session/scene.py +0 -1544
  78. antioch/session/session.py +0 -211
  79. antioch/session/task.py +0 -309
  80. antioch_py-2.2.3.dist-info/RECORD +0 -85
  81. antioch_py-2.2.3.dist-info/entry_points.txt +0 -2
  82. common/core/agent.py +0 -324
  83. common/core/task.py +0 -36
  84. common/message/velocity.py +0 -11
  85. common/rome/__init__.py +0 -9
  86. common/rome/client.py +0 -430
  87. common/rome/error.py +0 -16
  88. common/session/__init__.py +0 -31
  89. common/session/environment.py +0 -31
  90. common/session/sim.py +0 -129
  91. common/utils/usd.py +0 -12
  92. /antioch/{module/clock.py → clock.py} +0 -0
  93. {antioch_py-2.2.3.dist-info → antioch_py-3.0.0.dist-info}/top_level.txt +0 -0
  94. /common/message/{base.py → message.py} +0 -0
@@ -1,180 +0,0 @@
1
- from typing import Literal
2
-
3
- from antioch.session.session import Session, SessionContainer
4
- from common.message import Vector3
5
-
6
-
7
- class BasisCurve(SessionContainer):
8
- """
9
- Ergonomic wrapper for basis curve operations.
10
-
11
- BasisCurves should be added using scene.add_basis_curve() or retrieved using scene.get_basis_curve().
12
-
13
- Example:
14
- scene = Scene()
15
-
16
- # Add basis curve
17
- basis_curve = scene.add_basis_curve(
18
- path="/World/curve",
19
- center=[1.0, 2.0, 3.0],
20
- radius=2.0,
21
- min_angle_deg=0.0,
22
- max_angle_deg=180.0,
23
- )
24
-
25
- extents = basis_curve.get_extents()
26
- """
27
-
28
- def __init__(self, path: str):
29
- """
30
- Initialize basis curve by resolving path and validating existence.
31
-
32
- :param path: USD path for the basis curve.
33
- """
34
-
35
- super().__init__()
36
- self._session.query_sim_rpc(endpoint="basis_curve/get", payload={"path": path})
37
- self._path = path
38
-
39
- @property
40
- def path(self) -> str:
41
- """
42
- Get the path of the basis curve.
43
-
44
- :return: The path of the basis curve.
45
- """
46
-
47
- return self._path
48
-
49
- @classmethod
50
- def add(
51
- cls,
52
- path: str,
53
- center: Vector3 = Vector3.zeros(),
54
- radius: float = 1.0,
55
- min_angle_deg: float = 0.0,
56
- max_angle_deg: float = 180.0,
57
- guide: bool = False,
58
- color: Vector3 | None = None,
59
- width: float = 0.005,
60
- ) -> "BasisCurve":
61
- """
62
- Add a semi-circle basis curve to the scene.
63
-
64
- :param path: USD path for the basis curve.
65
- :param center: Center of the basis curve.
66
- :param radius: Radius of the basis curve.
67
- :param min_angle_deg: Minimum angle of the basis curve in degrees.
68
- :param max_angle_deg: Maximum angle of the basis curve in degrees.
69
- :param guide: If True, mark as guide purpose (invisible to cameras). If False, default purpose.
70
- :param color: Optional RGB color [0-1].
71
- :param width: Width of the curve.
72
- :return: The basis curve instance.
73
- """
74
-
75
- Session.get_current().query_sim_rpc(
76
- endpoint="basis_curve/add_semi_circle",
77
- payload={
78
- "path": path,
79
- "center": center,
80
- "radius": radius,
81
- "min_angle_deg": min_angle_deg,
82
- "max_angle_deg": max_angle_deg,
83
- "guide": guide,
84
- "color": color,
85
- "width": width,
86
- },
87
- )
88
- return cls(path)
89
-
90
- @classmethod
91
- def add_line(
92
- cls,
93
- path: str,
94
- start: Vector3,
95
- end: Vector3 | None = None,
96
- angle_deg: float | None = None,
97
- length: float | None = None,
98
- guide: bool = False,
99
- color: Vector3 | None = None,
100
- width: float = 0.005,
101
- ) -> "BasisCurve":
102
- """
103
- Add a line basis curve to the scene.
104
-
105
- Supports two modes:
106
- - Cartesian: Provide start and end points directly
107
- - Polar: Provide start point, angle (degrees from +X axis in XY plane), and length
108
-
109
- :param path: USD path for the basis curve.
110
- :param start: Start point of the line.
111
- :param end: End point of the line (Cartesian mode).
112
- :param angle_deg: Angle in degrees from +X axis in XY plane (polar mode).
113
- :param length: Length of the line (polar mode).
114
- :param guide: If True, mark as guide purpose (invisible to cameras). If False, default purpose.
115
- :param color: Optional RGB color [0-1].
116
- :param width: Width of the curve.
117
- :return: The basis curve instance.
118
- :raises ValueError: If both modes are specified or neither mode is complete.
119
- """
120
-
121
- Session.get_current().query_sim_rpc(
122
- endpoint="basis_curve/add_line",
123
- payload={
124
- "path": path,
125
- "start": start,
126
- "end": end,
127
- "angle_deg": angle_deg,
128
- "length": length,
129
- "guide": guide,
130
- "color": color,
131
- "width": width,
132
- },
133
- )
134
- return cls(path)
135
-
136
- def get_extents(self) -> tuple[Vector3, Vector3]:
137
- """
138
- Get the extents of the basis curve.
139
-
140
- :return: Extents as tuple of start and end points.
141
- """
142
-
143
- result = self._session.query_sim_rpc(endpoint="basis_curve/get_extents", payload={"path": self._path})
144
- if result is None:
145
- raise RuntimeError("Failed to get extents")
146
- return Vector3(**result[0]), Vector3(**result[1])
147
-
148
- def get_points(
149
- self, samples_per_segment: int = 10, sort_by: Literal["X", "Y", "Z"] | None = None, ascending: bool = True
150
- ) -> list[Vector3]:
151
- """
152
- Get the points of the basis curve.
153
-
154
- :param samples_per_segment: The number of samples per segment.
155
- :param sort_by: The axis to sort the points by.
156
- :param ascending: Whether to sort the points in ascending order.
157
- :return: The points of the basis curve.
158
- """
159
-
160
- response = self._session.query_sim_rpc(
161
- endpoint="basis_curve/get_points",
162
- payload={"path": self._path, "samples_per_segment": samples_per_segment, "sort_by": sort_by, "ascending": ascending},
163
- )
164
- return [Vector3(**pt) for pt in response] if response else []
165
-
166
- def set_visibility(self, visible: bool) -> None:
167
- """
168
- Set the visibility of the basis curve.
169
-
170
- :param visible: True to make visible, False to hide.
171
- """
172
-
173
- self._session.query_sim_rpc(endpoint="basis_curve/set_visibility", payload={"path": self._path, "visible": visible})
174
-
175
- def remove(self) -> None:
176
- """
177
- Remove the basis curve from the scene.
178
- """
179
-
180
- self._session.query_sim_rpc(endpoint="basis_curve/remove", payload={"path": self._path})
@@ -1,65 +0,0 @@
1
- from antioch.session.session import Session, SessionContainer
2
- from common.message import CameraInfo, Image, Pose
3
- from common.session.config import CameraConfig
4
-
5
-
6
- class Camera(SessionContainer):
7
- """
8
- Camera object for time-synchronized image capture.
9
-
10
- Example:
11
- scene = Scene()
12
- camera = scene.get_camera(name="my_ark/my_module/my_camera")
13
- frame = camera.get_frame()
14
- """
15
-
16
- def __init__(self, path: str, config: CameraConfig | None = None):
17
- """
18
- Initialize camera object.
19
-
20
- :param path: USD path for the camera.
21
- :param config: Optional camera config for intrinsics.
22
- """
23
-
24
- super().__init__()
25
- self._config = config
26
- self._session.query_sim_rpc(endpoint="camera/get", payload={"path": path})
27
- self._path = path
28
-
29
- @classmethod
30
- def add(cls, path: str, config: CameraConfig, world_pose: Pose | None, local_pose: Pose | None) -> "Camera":
31
- """
32
- Add camera to the scene.
33
-
34
- :param path: USD path for the camera.
35
- :param config: Camera configuration.
36
- :param world_pose: Optional world pose.
37
- :param local_pose: Optional local pose.
38
- :return: The camera instance.
39
- """
40
-
41
- Session.get_current().query_sim_rpc(
42
- endpoint="camera/add",
43
- payload={"path": path, "config": config, "world_pose": world_pose, "local_pose": local_pose},
44
- )
45
- return cls(path, config)
46
-
47
- def get_frame(self) -> Image | None:
48
- """
49
- Get camera frame with image data.
50
-
51
- :return: Image (RGB or depth based on camera mode), or None if image data is not ready.
52
- """
53
-
54
- image_dict = self._session.query_sim_rpc(endpoint="camera/get_frame", payload={"path": self._path})
55
- return Image(**image_dict) if image_dict else None
56
-
57
- def get_camera_info(self, frame_id: str = "camera_optical_frame") -> CameraInfo | None:
58
- """
59
- Get camera info with calculated intrinsics.
60
-
61
- :param frame_id: The coordinate frame ID for the camera.
62
- :return: CameraInfo with full intrinsics and distortion parameters, or None if no config.
63
- """
64
-
65
- return self._config.to_camera_info(frame_id=frame_id) if self._config else None
@@ -1,46 +0,0 @@
1
- from antioch.session.session import Session
2
- from common.session.config import MeshApproximation
3
-
4
-
5
- def set_collision(path: str, mesh_approximation: MeshApproximation | None = None) -> None:
6
- """
7
- Apply collision API to a prim, optionally with mesh approximation.
8
-
9
- :param path: USD path to the prim.
10
- :param mesh_approximation: Optional mesh approximation method for collision geometry.
11
- """
12
-
13
- Session.get_current().query_sim_rpc(endpoint="set_collision", payload={"path": path, "mesh_approximation": mesh_approximation})
14
-
15
-
16
- def remove_collision(path: str) -> None:
17
- """
18
- Remove collision API from a prim.
19
-
20
- :param path: USD path to the prim.
21
- """
22
-
23
- Session.get_current().query_sim_rpc(endpoint="remove_collision", payload={"path": path})
24
-
25
-
26
- def has_collision(path: str) -> bool:
27
- """
28
- Check if a prim has collision API applied.
29
-
30
- :param path: USD path to the prim.
31
- :return: True if collision API is applied.
32
- """
33
-
34
- return Session.get_current().query_sim_rpc(endpoint="has_collision", payload={"path": path}, response_type=bool)
35
-
36
-
37
- def get_mesh_approximation(path: str) -> MeshApproximation | None:
38
- """
39
- Get mesh collision approximation from a prim.
40
-
41
- :param path: USD path to the prim.
42
- :return: Mesh approximation method, or None if not set.
43
- """
44
-
45
- result = Session.get_current().query_sim_rpc(endpoint="get_mesh_approximation", payload={"path": path})
46
- return MeshApproximation(result) if result else None
@@ -1,58 +0,0 @@
1
- from antioch.session.session import Session, SessionContainer
2
- from common.message import Pose
3
- from common.session.config import GeometryConfig
4
-
5
-
6
- class Geometry(SessionContainer):
7
- """
8
- Ergonomic wrapper for geometry operations.
9
-
10
- Geometry provides basic shapes (sphere, cube, cylinder, cone, capsule) with
11
- collision, material, and visual properties. Geometries should be added using
12
- scene.add_geometry() or retrieved using scene.get_geometry().
13
-
14
- Example:
15
- scene = Scene()
16
-
17
- # Add geometry with flexible types (lists/tuples auto-convert)
18
- geom = scene.add_geometry(
19
- path="/World/cube",
20
- geometry_type=GeometryType.CUBE,
21
- size=[1.0, 1.0, 1.0],
22
- color=(1.0, 0.0, 0.0),
23
- world_pose={"position": [0, 0, 1], "orientation": [1, 0, 0, 0]}
24
- )
25
-
26
- # For dynamic pose control, use XForm
27
- xform = scene.get_xform(path="/World/cube")
28
- pose = xform.get_world_pose()
29
- """
30
-
31
- def __init__(self, path: str):
32
- """
33
- Initialize geometry by resolving path and validating existence.
34
-
35
- :param path: USD path for the geometry.
36
- """
37
-
38
- super().__init__()
39
- self._session.query_sim_rpc(endpoint="geometry/get", payload={"path": path})
40
- self._path = path
41
-
42
- @classmethod
43
- def add(cls, path: str, config: GeometryConfig, world_pose: Pose | None, local_pose: Pose | None) -> "Geometry":
44
- """
45
- Add geometry to the scene.
46
-
47
- :param path: USD path for the geometry.
48
- :param config: Geometry configuration.
49
- :param world_pose: Optional world pose.
50
- :param local_pose: Optional local pose.
51
- :return: The geometry instance.
52
- """
53
-
54
- Session.get_current().query_sim_rpc(
55
- endpoint="geometry/add",
56
- payload={"path": path, "config": config, "world_pose": world_pose, "local_pose": local_pose},
57
- )
58
- return cls(path)
@@ -1,48 +0,0 @@
1
- from antioch.session.session import Session, SessionContainer
2
- from common.session.config import GroundPlaneConfig
3
-
4
-
5
- class GroundPlane(SessionContainer):
6
- """
7
- Ergonomic wrapper for ground plane operations.
8
-
9
- Ground planes should be added using scene.add_ground_plane() or retrieved using scene.get_ground_plane().
10
-
11
- Note: Ground planes do not support pose modification after creation.
12
- Set the z_position during creation.
13
-
14
- Example:
15
- scene = Scene()
16
-
17
- # Add ground plane
18
- ground = scene.add_ground_plane(
19
- path="/World/Ground",
20
- size=5000.0,
21
- z_position=0.0,
22
- color=[0.5, 0.5, 0.5]
23
- )
24
- """
25
-
26
- def __init__(self, path: str):
27
- """
28
- Initialize ground plane by resolving path and validating existence.
29
-
30
- :param path: USD path for the ground plane.
31
- """
32
-
33
- super().__init__()
34
- self._session.query_sim_rpc(endpoint="ground_plane/get", payload={"path": path})
35
- self._path = path
36
-
37
- @classmethod
38
- def add(cls, path: str, config: GroundPlaneConfig) -> "GroundPlane":
39
- """
40
- Add a ground plane to the scene.
41
-
42
- :param path: USD path for the ground plane.
43
- :param config: Ground plane configuration.
44
- :return: The ground plane instance.
45
- """
46
-
47
- Session.get_current().query_sim_rpc(endpoint="ground_plane/add", payload={"path": path, "config": config})
48
- return cls(path)
@@ -1,53 +0,0 @@
1
- from antioch.session.session import Session, SessionContainer
2
- from common.message import ImuSample, Pose
3
- from common.session.config import ImuConfig
4
-
5
-
6
- class Imu(SessionContainer):
7
- """
8
- IMU object for time-synchronized sensor data.
9
-
10
- Example:
11
- scene = Scene()
12
- imu = scene.get_imu(name="my_ark/my_module/my_imu")
13
- sample = imu.get_sample()
14
- """
15
-
16
- def __init__(self, path: str):
17
- """
18
- Initialize IMU object.
19
-
20
- :param path: USD path for the IMU.
21
- """
22
-
23
- super().__init__()
24
- self._session.query_sim_rpc(endpoint="imu/get", payload={"path": path})
25
- self._path = path
26
-
27
- @classmethod
28
- def add(cls, path: str, config: ImuConfig, world_pose: Pose | None, local_pose: Pose | None) -> "Imu":
29
- """
30
- Add IMU to the scene.
31
-
32
- :param path: USD path for the IMU.
33
- :param config: IMU configuration.
34
- :param world_pose: Optional world pose.
35
- :param local_pose: Optional local pose.
36
- :return: The IMU instance.
37
- """
38
-
39
- Session.get_current().query_sim_rpc(
40
- endpoint="imu/add",
41
- payload={"path": path, "config": config, "world_pose": world_pose, "local_pose": local_pose},
42
- )
43
- return cls(path)
44
-
45
- def get_sample(self) -> ImuSample | None:
46
- """
47
- Get IMU sensor sample.
48
-
49
- :return: IMU sensor measurements, or None if sensor data is not ready.
50
- """
51
-
52
- sample = self._session.query_sim_rpc(endpoint="imu/get_sample", payload={"path": self._path})
53
- return ImuSample(**sample) if sample else None
@@ -1,49 +0,0 @@
1
- from antioch.session.session import Session, SessionContainer
2
- from common.session.config import JointConfig
3
-
4
-
5
- class Joint(SessionContainer):
6
- """
7
- Ergonomic wrapper for joint operations.
8
-
9
- Joints connect two bodies and define kinematic constraints between them.
10
- Joints should be added using scene.add_joint() or retrieved using scene.get_joint().
11
-
12
- Example:
13
- scene = Scene()
14
-
15
- # Add a revolute joint between two bodies
16
- joint = scene.add_joint(
17
- path="/World/robot/joint1",
18
- parent_path="/World/robot/link1",
19
- child_path="/World/robot/link2",
20
- joint_type=JointType.REVOLUTE,
21
- axis=JointAxis.Z,
22
- lower_limit=-180.0,
23
- upper_limit=180.0,
24
- )
25
- """
26
-
27
- def __init__(self, path: str):
28
- """
29
- Initialize joint by resolving path and validating existence.
30
-
31
- :param path: USD path for the joint.
32
- """
33
-
34
- super().__init__()
35
- self._session.query_sim_rpc(endpoint="joint/get", payload={"path": path})
36
- self._path = path
37
-
38
- @classmethod
39
- def add(cls, path: str, config: JointConfig) -> "Joint":
40
- """
41
- Add a joint to the scene.
42
-
43
- :param path: USD path for the joint.
44
- :param config: Joint configuration.
45
- :return: The joint instance.
46
- """
47
-
48
- Session.get_current().query_sim_rpc(endpoint="joint/add", payload={"path": path, "config": config})
49
- return cls(path)
@@ -1,123 +0,0 @@
1
- from antioch.session.session import Session, SessionContainer
2
- from common.message import Pose, Vector3
3
- from common.session.config import LightConfig
4
-
5
-
6
- class Light(SessionContainer):
7
- """
8
- Ergonomic wrapper for light operations.
9
-
10
- Lights should be added using scene.add_light() or retrieved using scene.get_light().
11
-
12
- Example:
13
- scene = Scene()
14
-
15
- # Add light
16
- light = scene.add_light(
17
- path="/World/Sun",
18
- light_type=LightType.DISTANT,
19
- intensity=30000.0,
20
- color=[1.0, 0.9, 0.8]
21
- )
22
-
23
- # Set color with a tuple
24
- light.set_color((0.5, 0.7, 1.0))
25
- pose = light.get_world_pose()
26
- """
27
-
28
- def __init__(self, path: str):
29
- """
30
- Initialize light by resolving path and validating existence.
31
-
32
- :param path: USD path for the light.
33
- """
34
-
35
- super().__init__()
36
- self._session.query_sim_rpc(endpoint="light/get", payload={"path": path})
37
- self._path = path
38
-
39
- @classmethod
40
- def add(cls, path: str, config: LightConfig, world_pose: Pose | None, local_pose: Pose | None) -> "Light":
41
- """
42
- Add a light to the scene.
43
-
44
- :param path: USD path for the light.
45
- :param config: Light configuration.
46
- :param world_pose: Optional world pose.
47
- :param local_pose: Optional local pose.
48
- :return: The light instance.
49
- """
50
-
51
- Session.get_current().query_sim_rpc(
52
- endpoint="light/add",
53
- payload={"path": path, "config": config, "world_pose": world_pose, "local_pose": local_pose},
54
- )
55
- return cls(path)
56
-
57
- def get_world_pose(self) -> Pose:
58
- """
59
- Get the world pose of the light.
60
-
61
- :return: World pose.
62
- """
63
-
64
- return self._session.query_sim_rpc(endpoint="light/get_world_pose", payload={"path": self._path}, response_type=Pose)
65
-
66
- def get_local_pose(self) -> Pose:
67
- """
68
- Get the local pose of the light.
69
-
70
- :return: Local pose.
71
- """
72
-
73
- return self._session.query_sim_rpc(endpoint="light/get_local_pose", payload={"path": self._path}, response_type=Pose)
74
-
75
- def set_world_pose(self, pose: Pose | dict) -> None:
76
- """
77
- Set the world pose of the light.
78
-
79
- :param pose: World pose as Pose (or dict with position/orientation lists).
80
- """
81
-
82
- self._session.query_sim_rpc(endpoint="light/set_world_pose", payload={"path": self._path, "pose": pose})
83
-
84
- def set_local_pose(self, pose: Pose | dict) -> None:
85
- """
86
- Set the local pose of the light.
87
-
88
- :param pose: Local pose as Pose (or dict with position/orientation lists).
89
- """
90
-
91
- self._session.query_sim_rpc(endpoint="light/set_local_pose", payload={"path": self._path, "pose": pose})
92
-
93
- def set_intensity(self, intensity: float) -> None:
94
- """
95
- Set the intensity of the light.
96
-
97
- :param intensity: Light intensity value.
98
- """
99
-
100
- self._session.query_sim_rpc(endpoint="light/set_intensity", payload={"path": self._path, "intensity": intensity})
101
-
102
- def set_color(self, color: Vector3 | list[float] | tuple[float, float, float]) -> None:
103
- """
104
- Set the color of the light.
105
-
106
- :param color: RGB color as Vector3 (or list/tuple of 3 floats) with values 0-1.
107
- """
108
-
109
- self._session.query_sim_rpc(endpoint="light/set_color", payload={"path": self._path, "color": color})
110
-
111
- def enable(self) -> None:
112
- """
113
- Enable the light (make it illuminate the scene).
114
- """
115
-
116
- self._session.query_sim_rpc(endpoint="light/enable", payload={"path": self._path})
117
-
118
- def disable(self) -> None:
119
- """
120
- Disable the light (turn it off).
121
- """
122
-
123
- self._session.query_sim_rpc(endpoint="light/disable", payload={"path": self._path})