antioch-py 2.0.6__py3-none-any.whl → 2.1.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 (52) hide show
  1. antioch/session/__init__.py +15 -13
  2. antioch/session/ark.py +22 -26
  3. antioch/session/objects/__init__.py +40 -0
  4. antioch/session/{views → objects}/animation.py +25 -52
  5. antioch/session/{views → objects}/articulation.py +30 -95
  6. antioch/session/{views → objects}/basis_curve.py +18 -54
  7. antioch/session/{views → objects}/camera.py +12 -39
  8. antioch/session/objects/collision.py +46 -0
  9. antioch/session/{views → objects}/geometry.py +6 -22
  10. antioch/session/{views → objects}/ground_plane.py +5 -20
  11. antioch/session/{views → objects}/imu.py +10 -30
  12. antioch/session/{views → objects}/joint.py +5 -20
  13. antioch/session/{views → objects}/light.py +14 -66
  14. antioch/session/{views → objects}/pir_sensor.py +20 -62
  15. antioch/session/{views → objects}/radar.py +18 -29
  16. antioch/session/{views → objects}/rigid_body.py +25 -110
  17. antioch/session/{views → objects}/xform.py +24 -24
  18. antioch/session/scene.py +152 -162
  19. antioch/session/session.py +34 -43
  20. antioch/session/task.py +2 -16
  21. {antioch_py-2.0.6.dist-info → antioch_py-2.1.0.dist-info}/METADATA +1 -1
  22. {antioch_py-2.0.6.dist-info → antioch_py-2.1.0.dist-info}/RECORD +34 -48
  23. common/ark/hardware.py +13 -37
  24. common/ark/kinematics.py +1 -1
  25. common/core/agent.py +28 -0
  26. common/message/__init__.py +2 -0
  27. common/message/pir.py +7 -5
  28. common/message/velocity.py +11 -0
  29. common/session/__init__.py +1 -24
  30. common/session/config.py +390 -0
  31. common/session/sim.py +36 -147
  32. antioch/session/views/__init__.py +0 -40
  33. antioch/session/views/collision.py +0 -75
  34. common/session/views/__init__.py +0 -263
  35. common/session/views/animation.py +0 -73
  36. common/session/views/articulation.py +0 -184
  37. common/session/views/basis_curve.py +0 -102
  38. common/session/views/camera.py +0 -147
  39. common/session/views/collision.py +0 -59
  40. common/session/views/geometry.py +0 -102
  41. common/session/views/ground_plane.py +0 -41
  42. common/session/views/imu.py +0 -66
  43. common/session/views/joint.py +0 -81
  44. common/session/views/light.py +0 -96
  45. common/session/views/pir_sensor.py +0 -115
  46. common/session/views/radar.py +0 -82
  47. common/session/views/rigid_body.py +0 -236
  48. common/session/views/viewport.py +0 -21
  49. common/session/views/xform.py +0 -39
  50. {antioch_py-2.0.6.dist-info → antioch_py-2.1.0.dist-info}/WHEEL +0 -0
  51. {antioch_py-2.0.6.dist-info → antioch_py-2.1.0.dist-info}/entry_points.txt +0 -0
  52. {antioch_py-2.0.6.dist-info → antioch_py-2.1.0.dist-info}/top_level.txt +0 -0
@@ -1,115 +0,0 @@
1
- from pydantic import Field
2
-
3
- from common.message import Message, Pose
4
-
5
-
6
- class PirSensorConfig(Message):
7
- """
8
- Configuration for PIR (Passive Infrared) motion sensor.
9
-
10
- PIR sensors detect infrared radiation changes caused by moving warm objects.
11
- The sensor uses a dual-element design with interleaved zones for motion detection.
12
- """
13
-
14
- # Core sensor parameters
15
- update_rate_hz: float = Field(default=60.0, description="Sensor update frequency in Hz")
16
- max_range: float = Field(default=12.0, description="Maximum detection range in meters")
17
-
18
- # Field of view
19
- horiz_fov_deg: float = Field(default=90.0, description="Horizontal field of view in degrees")
20
- vert_fov_deg: float = Field(default=60.0, description="Vertical field of view in degrees")
21
-
22
- # Ray configuration
23
- rays_per_h: int = Field(default=128, description="Number of rays in horizontal direction")
24
- rays_per_v: int = Field(default=16, description="Number of rays in vertical direction")
25
-
26
- # DSP / electronics parameters
27
- gain: float = Field(default=0.01, description="Amplifier gain")
28
- hp_corner_hz: float = Field(default=0.1, description="High-pass filter corner frequency in Hz")
29
- lp_corner_hz: float = Field(default=1.0, description="Low-pass filter corner frequency in Hz")
30
-
31
- hold_time_s: float = Field(default=2.0, description="Detection hold time in seconds")
32
-
33
- # Lens parameters
34
- lens_transmission: float = Field(default=0.9, description="Lens transmission coefficient (0-1)")
35
- lens_segments_h: int = Field(default=6, description="Number of horizontal lens segments (facets)")
36
- vertical_gain_falloff: float = Field(default=0.5, description="Exponent for elevation-based gain reduction (0=uniform)")
37
-
38
- # Element vignetting parameters (models window blocking effect)
39
- element_fov_overlap_deg: float = Field(default=20.0, description="Half-angle of center region where both elements see well (degrees)")
40
- element_scatter_gain: float = Field(default=0.1, description="Minimum gain for blocked element due to scatter/reflections (0-1)")
41
- element_fov_transition_deg: float = Field(default=15.0, description="Width of soft transition from full gain to scatter gain (degrees)")
42
-
43
- # Environment parameters
44
- ambient_temp_c: float = Field(default=20.0, description="Ambient temperature in Celsius")
45
-
46
- # Hard-coded theshold (if not none) overrides auto-calibration
47
- threshold: float | None = Field(default=None, description="Detection threshold (auto-calibrated if None)")
48
- threshold_scale: float = Field(default=1.0, description="Scale factor applied to auto-calibrated threshold")
49
-
50
- # Pyroelectric element parameters
51
- thermal_time_constant_s: float = Field(default=0.2, description="Element thermal time constant in seconds")
52
- pyro_responsivity: float = Field(default=1.0, description="Pyroelectric responsivity scaling factor")
53
- noise_amplitude: float = Field(default=0.0, description="Thermal/electronic noise amplitude")
54
-
55
- # Auto-threshold calibration parameters
56
- target_delta_t: float = Field(default=10.0, description="Target temperature difference for threshold calibration in Celsius")
57
- target_distance: float = Field(default=5.0, description="Target distance for threshold calibration in meters")
58
- target_emissivity: float = Field(default=0.98, description="Target emissivity for threshold calibration")
59
- target_velocity_mps: float = Field(default=1.0, description="Target velocity for threshold calibration in m/s")
60
-
61
-
62
- class GetPirSensor(Message):
63
- """
64
- Get an existing PIR sensor.
65
- """
66
-
67
- path: str | None = Field(default=None, description="USD path of the PIR sensor prim")
68
-
69
-
70
- class GetPirSensorResponse(Message):
71
- """
72
- Response from getting a PIR sensor.
73
- """
74
-
75
- path: str
76
-
77
-
78
- class AddPirSensor(Message):
79
- """
80
- Add a PIR sensor.
81
- """
82
-
83
- path: str = Field(description="USD path for the PIR sensor")
84
- config: PirSensorConfig = Field(default_factory=PirSensorConfig)
85
- world_pose: Pose | None = Field(default=None, description="World pose (position and orientation)")
86
- local_pose: Pose | None = Field(default=None, description="Local pose (translation and orientation)")
87
-
88
-
89
- class GetPirDetectionStatus(Message):
90
- """
91
- Get PIR sensor detection status.
92
- """
93
-
94
- path: str
95
-
96
-
97
- class SetPirDebugMode(Message):
98
- """
99
- Enable or disable debug visualization for a PIR sensor.
100
- """
101
-
102
- path: str
103
- enabled: bool = Field(description="Whether to enable debug ray visualization")
104
-
105
-
106
- class SetPirMaterial(Message):
107
- """
108
- Set PIR-specific thermal properties on a prim.
109
-
110
- These properties define how the prim appears to PIR sensors.
111
- """
112
-
113
- path: str = Field(description="USD path of the prim to configure")
114
- emissivity: float = Field(default=0.9, description="Material emissivity (0-1)")
115
- temperature_c: float | None = Field(default=None, description="Surface temperature in Celsius")
@@ -1,82 +0,0 @@
1
- from pydantic import Field
2
-
3
- from common.message import Message, Pose
4
-
5
-
6
- class RadarConfig(Message):
7
- """
8
- Configuration for RTX radar sensor.
9
-
10
- All parameters can be customized with sensible defaults provided.
11
- """
12
-
13
- # Core sensor parameters
14
- frequency: int = Field(default=10, description="Sensor update frequency in Hz")
15
-
16
- # Field of view (degrees from center, so total FOV is 2x these values)
17
- max_azimuth: float = Field(default=66.0, description="Maximum azimuth angle in degrees (±FOV from center)")
18
- max_elevation: float = Field(default=20.0, description="Maximum elevation angle in degrees (±FOV from center)")
19
-
20
- # Range parameters
21
- max_range: float = Field(default=200.0, description="Maximum detection range in meters")
22
- range_resolution: float = Field(default=0.4, description="Range resolution in meters")
23
-
24
- # Angular resolution at boresight (center of FOV)
25
- azimuth_resolution: float = Field(default=1.3, description="Azimuth resolution at boresight in degrees")
26
- elevation_resolution: float = Field(default=5.0, description="Elevation resolution at boresight in degrees")
27
-
28
- # Noise parameters (standard deviation for Gaussian noise)
29
- azimuth_noise: float = Field(default=0.0, description="Azimuth measurement noise standard deviation in radians")
30
- range_noise: float = Field(default=0.0, description="Range measurement noise standard deviation in meters")
31
-
32
-
33
- class GetRadar(Message):
34
- """
35
- Get an existing radar sensor.
36
- """
37
-
38
- path: str | None = Field(default=None, description="USD path of the radar prim")
39
-
40
-
41
- class GetRadarResponse(Message):
42
- """
43
- Response from getting a radar.
44
- """
45
-
46
- path: str
47
-
48
-
49
- class AddRadar(Message):
50
- """
51
- Add a radar sensor.
52
- """
53
-
54
- path: str = Field(description="USD path for the radar")
55
- config: RadarConfig
56
- world_pose: Pose | None = Field(default=None, description="World pose (position and orientation)")
57
- local_pose: Pose | None = Field(default=None, description="Local pose (translation and orientation)")
58
-
59
-
60
- class GetRadarScan(Message):
61
- """
62
- Get radar scan data.
63
- """
64
-
65
- path: str
66
-
67
-
68
- class BufferRadarRead(Message):
69
- """
70
- Request to buffer current radar scan at simulation time.
71
- """
72
-
73
- path: str
74
-
75
-
76
- class GetBufferedRadarRead(Message):
77
- """
78
- Request to get buffered radar scan at or before simulation time.
79
- """
80
-
81
- path: str
82
- read_sim_time: float
@@ -1,236 +0,0 @@
1
- from enum import Enum
2
-
3
- from pydantic import Field
4
-
5
- from common.message import Message, Pose, Vector3
6
-
7
-
8
- class BodyType(str, Enum):
9
- """
10
- Type of rigid body.
11
- """
12
-
13
- DYNAMIC = "dynamic"
14
- KINEMATIC = "kinematic"
15
-
16
-
17
- class RigidBodyConfig(Message):
18
- """
19
- Configuration for rigid body physics properties.
20
-
21
- Note: Collision properties (friction, restitution, mesh approximation) are configured
22
- on the geometry, not the rigid body.
23
- """
24
-
25
- body_type: BodyType = Field(default=BodyType.DYNAMIC, description="Type of rigid body")
26
- mass: float = Field(default=1.0, description="Mass in kg")
27
- density: float | None = Field(default=None, description="Density in kg/m³ (alternative to mass)")
28
- center_of_mass: Vector3 | None = Field(default=None, description="Center of mass offset in body frame")
29
- diagonal_inertia: Vector3 | None = Field(default=None, description="Diagonal inertia values (Ixx, Iyy, Izz)")
30
- principal_axes: Vector3 | None = Field(default=None, description="Principal axes orientation as RPY")
31
- sleep_threshold: float | None = Field(default=None, description="Mass-normalized kinetic energy threshold for sleeping")
32
- linear_velocity: Vector3 | None = Field(default=None, description="Initial linear velocity")
33
- angular_velocity: Vector3 | None = Field(default=None, description="Initial angular velocity")
34
-
35
-
36
- class GetRigidBody(Message):
37
- """
38
- Get an existing rigid body view from a prim with RigidBodyAPI already applied.
39
- """
40
-
41
- path: str | None = Field(default=None, description="USD path of the rigid body prim")
42
-
43
-
44
- class GetRigidBodyResponse(Message):
45
- """
46
- Response from getting a rigid body.
47
- """
48
-
49
- path: str
50
-
51
-
52
- class AddRigidBody(Message):
53
- """
54
- Add or apply rigid body physics to a prim.
55
-
56
- Note: The prim should already exist (e.g., added as geometry first).
57
- Collision properties are configured on the geometry, not here.
58
- """
59
-
60
- path: str = Field(description="USD path of prim to apply physics to")
61
- config: RigidBodyConfig
62
- world_pose: Pose | None = Field(default=None, description="World pose (position and orientation)")
63
- local_pose: Pose | None = Field(default=None, description="Local pose (translation and orientation)")
64
- scale: Vector3 | None = Field(default=None, description="Scale (x, y, z)")
65
-
66
-
67
- class BodyVelocity(Message):
68
- """
69
- Body velocity.
70
- """
71
-
72
- linear: Vector3
73
- angular: Vector3
74
-
75
-
76
- class GetBodyVelocity(Message):
77
- """
78
- Get body velocity.
79
- """
80
-
81
- path: str
82
-
83
-
84
- class SetBodyVelocity(Message):
85
- """
86
- Set body velocity.
87
- """
88
-
89
- path: str
90
- velocity: BodyVelocity
91
-
92
-
93
- class BoundingBox(Message):
94
- """
95
- Axis-aligned bounding box.
96
- """
97
-
98
- min: Vector3
99
- max: Vector3
100
-
101
-
102
- class GetBodyBoundingBox(Message):
103
- """
104
- Get body bounding box.
105
- """
106
-
107
- path: str
108
-
109
-
110
- class ApplyForce(Message):
111
- """
112
- Apply force to body.
113
- """
114
-
115
- path: str
116
- force: Vector3
117
- is_global: bool = True
118
-
119
-
120
- class ApplyTorque(Message):
121
- """
122
- Apply torque to body.
123
- """
124
-
125
- path: str
126
- torque: Vector3
127
- is_global: bool = True
128
-
129
-
130
- class ApplyForceAtPosition(Message):
131
- """
132
- Apply force at a specific position on the body.
133
- """
134
-
135
- path: str
136
- force: Vector3
137
- position: Vector3
138
- is_global: bool = True
139
-
140
-
141
- class BodyDistance(Message):
142
- """
143
- Distance between two bodies.
144
- """
145
-
146
- distance: float
147
-
148
-
149
- class GetDistanceBetweenBodies(Message):
150
- """
151
- Get distance between bodies.
152
- """
153
-
154
- path1: str
155
- path2: str
156
-
157
-
158
- class GetBodyMass(Message):
159
- """
160
- Get body mass.
161
- """
162
-
163
- path: str
164
-
165
-
166
- class BodyMass(Message):
167
- """
168
- Body mass.
169
- """
170
-
171
- mass: float
172
-
173
-
174
- class GetBodyInertia(Message):
175
- """
176
- Get body inertia tensor.
177
- """
178
-
179
- path: str
180
-
181
-
182
- class BodyInertia(Message):
183
- """
184
- Body inertia tensor (3x3 matrix as 9 values).
185
- """
186
-
187
- inertia: list[float]
188
-
189
-
190
- class GetBodyCenterOfMass(Message):
191
- """
192
- Get body center of mass.
193
- """
194
-
195
- path: str
196
-
197
-
198
- class BodyCenterOfMass(Message):
199
- """
200
- Body center of mass position and orientation.
201
- """
202
-
203
- position: Vector3
204
- orientation: Vector3
205
-
206
-
207
- class EnableGravity(Message):
208
- """
209
- Enable gravity on rigid body.
210
- """
211
-
212
- path: str
213
-
214
-
215
- class DisableGravity(Message):
216
- """
217
- Disable gravity on rigid body.
218
- """
219
-
220
- path: str
221
-
222
-
223
- class EnablePhysics(Message):
224
- """
225
- Enable rigid body physics.
226
- """
227
-
228
- path: str
229
-
230
-
231
- class DisablePhysics(Message):
232
- """
233
- Disable rigid body physics.
234
- """
235
-
236
- path: str
@@ -1,21 +0,0 @@
1
- from pydantic import Field
2
-
3
- from common.message import Message, Vector3
4
-
5
-
6
- class SetCameraView(Message):
7
- """
8
- Set the viewport camera view position and target.
9
- """
10
-
11
- eye: Vector3 = Field(description="Eye position (camera location) in world coordinates")
12
- target: Vector3 = Field(description="Target position (look-at point) in world coordinates")
13
- camera_prim_path: str | None = Field(default=None, description="Optional USD path to the camera prim to configure")
14
-
15
-
16
- class SetActiveViewportCamera(Message):
17
- """
18
- Set which camera is active in the viewport.
19
- """
20
-
21
- camera_prim_path: str = Field(description="USD path to the camera prim to make active")
@@ -1,39 +0,0 @@
1
- from pydantic import Field
2
-
3
- from common.message import Message, Pose, Vector3
4
-
5
-
6
- class GetXForm(Message):
7
- """
8
- Get an existing XForm prim.
9
- """
10
-
11
- path: str | None = Field(default=None, description="USD path of the XForm prim")
12
-
13
-
14
- class GetXFormResponse(Message):
15
- """
16
- Response from getting an XForm.
17
- """
18
-
19
- path: str
20
-
21
-
22
- class AddXForm(Message):
23
- """
24
- Add an XForm prim with optional pose and scale.
25
- """
26
-
27
- path: str = Field(description="USD path for the XForm")
28
- world_pose: Pose | None = Field(None, description="World pose to set on creation")
29
- local_pose: Pose | None = Field(None, description="Local pose to set on creation")
30
- scale: Vector3 | None = Field(None, description="Scale to set on creation")
31
-
32
-
33
- class SetXformVisibility(Message):
34
- """
35
- Set xform visibility.
36
- """
37
-
38
- path: str
39
- visible: bool