antioch-py 2.0.7__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 (54) 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/objects/radar.py +62 -0
  16. antioch/session/{views → objects}/rigid_body.py +25 -110
  17. antioch/session/{views → objects}/xform.py +24 -24
  18. antioch/session/scene.py +83 -134
  19. antioch/session/session.py +34 -43
  20. antioch/session/task.py +2 -16
  21. {antioch_py-2.0.7.dist-info → antioch_py-2.1.0.dist-info}/METADATA +1 -1
  22. {antioch_py-2.0.7.dist-info → antioch_py-2.1.0.dist-info}/RECORD +33 -49
  23. common/ark/hardware.py +1 -5
  24. common/ark/kinematics.py +1 -1
  25. common/core/agent.py +28 -0
  26. common/message/__init__.py +2 -0
  27. common/message/velocity.py +11 -0
  28. common/session/__init__.py +1 -24
  29. common/session/config.py +390 -0
  30. common/session/sim.py +36 -147
  31. antioch/session/views/__init__.py +0 -42
  32. antioch/session/views/collision.py +0 -75
  33. antioch/session/views/material.py +0 -54
  34. antioch/session/views/radar.py +0 -131
  35. common/session/views/__init__.py +0 -263
  36. common/session/views/animation.py +0 -73
  37. common/session/views/articulation.py +0 -184
  38. common/session/views/basis_curve.py +0 -102
  39. common/session/views/camera.py +0 -147
  40. common/session/views/collision.py +0 -59
  41. common/session/views/geometry.py +0 -102
  42. common/session/views/ground_plane.py +0 -41
  43. common/session/views/imu.py +0 -66
  44. common/session/views/joint.py +0 -81
  45. common/session/views/light.py +0 -96
  46. common/session/views/material.py +0 -25
  47. common/session/views/pir_sensor.py +0 -119
  48. common/session/views/radar.py +0 -107
  49. common/session/views/rigid_body.py +0 -236
  50. common/session/views/viewport.py +0 -21
  51. common/session/views/xform.py +0 -39
  52. {antioch_py-2.0.7.dist-info → antioch_py-2.1.0.dist-info}/WHEEL +0 -0
  53. {antioch_py-2.0.7.dist-info → antioch_py-2.1.0.dist-info}/entry_points.txt +0 -0
  54. {antioch_py-2.0.7.dist-info → antioch_py-2.1.0.dist-info}/top_level.txt +0 -0
@@ -1,119 +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=20.0, description="Maximum detection range in meters")
17
-
18
- # FOV configuration
19
- total_horiz_fov_deg: float = Field(default=150.0, description="Total horizontal coverage. Enables automatic fanning.")
20
- sensor_side_fov_deg: float = Field(default=45.0, description="Horizontal FOV for side sensors")
21
- sensor_center_fov_deg: float = Field(default=45.0, description="Horizontal FOV for center sensor")
22
-
23
- # Ray configuration
24
- sensor_rays_horiz: int = Field(default=128, description="Number of rays per sensor in horizontal direction")
25
- sensor_rays_vert: int = Field(default=16, description="Number of rays per sensor in vertical direction")
26
-
27
- # Sensor vertical angle range
28
- min_vertical_angle_center: float = Field(default=-30.0, description="Minimum vertical angle for center sensor in degrees")
29
- max_vertical_angle_center: float = Field(default=30.0, description="Maximum vertical angle for center sensor in degrees")
30
- min_vertical_angle_side: float = Field(default=-30.0, description="Minimum vertical angle for side sensors in degrees")
31
- max_vertical_angle_side: float = Field(default=30.0, description="Maximum vertical angle for side sensors in degrees")
32
-
33
- # DSP / electronics parameters
34
- gain_center: float = Field(default=0.015, description="Amplifier gain for center sensor")
35
- gain_sides: float = Field(default=0.01, description="Amplifier gain for side sensors")
36
- hp_corner_hz: float = Field(default=0.4, description="High-pass filter corner frequency in Hz")
37
- lp_corner_hz: float = Field(default=10.0, description="Low-pass filter corner frequency in Hz")
38
- blind_time_s: float = Field(default=0.5, description="Blind time after detection in seconds")
39
- pulse_counter: int = Field(default=2, description="Number of pulses required to trigger detection (1-4)")
40
- window_time_s: float = Field(default=2.0, description="Window time for pulse counting in seconds")
41
- count_mode: int = Field(default=0, description="Pulse counting mode (0: sign change required, 1: any crossing)")
42
-
43
- # Lens parameters
44
- lens_transmission: float = Field(default=0.9, description="Lens transmission coefficient (0-1)")
45
- lens_segments_h: int = Field(default=6, description="Number of horizontal lens segments (facets)")
46
-
47
- # Environment parameters
48
- ambient_temp_c: float = Field(default=20.0, description="Ambient temperature in Celsius")
49
-
50
- # Hard-coded theshold (if not none) overrides auto-calibration
51
- threshold: float | None = Field(default=None, description="Detection threshold (auto-calibrated if None)")
52
- threshold_scale: float = Field(default=1.0, description="Scale factor applied to auto-calibrated threshold")
53
-
54
- # Pyroelectric element parameters
55
- thermal_time_constant_s: float = Field(default=0.2, description="Element thermal time constant in seconds")
56
- pyro_responsivity: float = Field(default=4000.0, description="Pyroelectric responsivity scaling factor")
57
- noise_amplitude: float = Field(default=20e-6, description="Thermal/electronic noise amplitude")
58
-
59
- # Auto-threshold calibration parameters
60
- target_delta_t: float = Field(default=10.0, description="Target temperature difference for threshold calibration in Celsius")
61
- target_distance: float = Field(default=5.0, description="Target distance for threshold calibration in meters")
62
- target_emissivity: float = Field(default=0.98, description="Target emissivity for threshold calibration")
63
- target_velocity_mps: float = Field(default=1.0, description="Target velocity for threshold calibration in m/s")
64
-
65
-
66
- class GetPirSensor(Message):
67
- """
68
- Get an existing PIR sensor.
69
- """
70
-
71
- path: str | None = Field(default=None, description="USD path of the PIR sensor prim")
72
-
73
-
74
- class GetPirSensorResponse(Message):
75
- """
76
- Response from getting a PIR sensor.
77
- """
78
-
79
- path: str
80
-
81
-
82
- class AddPirSensor(Message):
83
- """
84
- Add a PIR sensor.
85
- """
86
-
87
- path: str = Field(description="USD path for the PIR sensor")
88
- config: PirSensorConfig = Field(default_factory=PirSensorConfig)
89
- world_pose: Pose | None = Field(default=None, description="World pose (position and orientation)")
90
- local_pose: Pose | None = Field(default=None, description="Local pose (translation and orientation)")
91
-
92
-
93
- class GetPirDetectionStatus(Message):
94
- """
95
- Get PIR sensor detection status.
96
- """
97
-
98
- path: str
99
-
100
-
101
- class SetPirDebugMode(Message):
102
- """
103
- Enable or disable debug visualization for a PIR sensor.
104
- """
105
-
106
- path: str
107
- enabled: bool = Field(description="Whether to enable debug ray visualization")
108
-
109
-
110
- class SetPirMaterial(Message):
111
- """
112
- Set PIR-specific thermal properties on a prim.
113
-
114
- These properties define how the prim appears to PIR sensors.
115
- """
116
-
117
- path: str = Field(description="USD path of the prim to configure")
118
- emissivity: float = Field(default=0.9, description="Material emissivity (0-1)")
119
- temperature_c: float | None = Field(default=None, description="Surface temperature in Celsius")
@@ -1,107 +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 SetRadarDebugMode(Message):
69
- """
70
- Enable or disable debug visualization for a radar sensor.
71
- """
72
-
73
- path: str
74
- enabled: bool = Field(description="Whether to enable debug visualization")
75
-
76
-
77
- class BufferRadarRead(Message):
78
- """
79
- Request to buffer current radar scan at simulation time.
80
- """
81
-
82
- path: str
83
-
84
-
85
- class GetBufferedRadarRead(Message):
86
- """
87
- Request to get buffered radar scan at or before simulation time.
88
- """
89
-
90
- path: str
91
- read_sim_time: float
92
-
93
-
94
- class SetRadarMaterial(Message):
95
- """
96
- Set radar-specific material properties on a prim and all materials in its subtree.
97
-
98
- These properties define how the prim appears to radar sensors.
99
- Based on RTX Sensor Non-Visual Materials system.
100
- """
101
-
102
- path: str = Field(description="USD path of the prim to configure")
103
- reflectivity: float | None = Field(default=None, description="Radar reflectivity (0-1)")
104
- metallic: float | None = Field(default=None, description="Metallic property (0-1)")
105
- roughness: float | None = Field(default=None, description="Surface roughness (0-1)")
106
- backscattering: float | None = Field(default=None, description="Backscattering coefficient")
107
- cross_section: float | None = Field(default=None, description="Radar cross section in dBsm")
@@ -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