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.
- antioch/session/__init__.py +15 -13
- antioch/session/ark.py +22 -26
- antioch/session/objects/__init__.py +40 -0
- antioch/session/{views → objects}/animation.py +25 -52
- antioch/session/{views → objects}/articulation.py +30 -95
- antioch/session/{views → objects}/basis_curve.py +18 -54
- antioch/session/{views → objects}/camera.py +12 -39
- antioch/session/objects/collision.py +46 -0
- antioch/session/{views → objects}/geometry.py +6 -22
- antioch/session/{views → objects}/ground_plane.py +5 -20
- antioch/session/{views → objects}/imu.py +10 -30
- antioch/session/{views → objects}/joint.py +5 -20
- antioch/session/{views → objects}/light.py +14 -66
- antioch/session/{views → objects}/pir_sensor.py +20 -62
- antioch/session/objects/radar.py +62 -0
- antioch/session/{views → objects}/rigid_body.py +25 -110
- antioch/session/{views → objects}/xform.py +24 -24
- antioch/session/scene.py +83 -134
- antioch/session/session.py +34 -43
- antioch/session/task.py +2 -16
- {antioch_py-2.0.7.dist-info → antioch_py-2.1.0.dist-info}/METADATA +1 -1
- {antioch_py-2.0.7.dist-info → antioch_py-2.1.0.dist-info}/RECORD +33 -49
- common/ark/hardware.py +1 -5
- common/ark/kinematics.py +1 -1
- common/core/agent.py +28 -0
- common/message/__init__.py +2 -0
- common/message/velocity.py +11 -0
- common/session/__init__.py +1 -24
- common/session/config.py +390 -0
- common/session/sim.py +36 -147
- antioch/session/views/__init__.py +0 -42
- antioch/session/views/collision.py +0 -75
- antioch/session/views/material.py +0 -54
- antioch/session/views/radar.py +0 -131
- common/session/views/__init__.py +0 -263
- common/session/views/animation.py +0 -73
- common/session/views/articulation.py +0 -184
- common/session/views/basis_curve.py +0 -102
- common/session/views/camera.py +0 -147
- common/session/views/collision.py +0 -59
- common/session/views/geometry.py +0 -102
- common/session/views/ground_plane.py +0 -41
- common/session/views/imu.py +0 -66
- common/session/views/joint.py +0 -81
- common/session/views/light.py +0 -96
- common/session/views/material.py +0 -25
- common/session/views/pir_sensor.py +0 -119
- common/session/views/radar.py +0 -107
- common/session/views/rigid_body.py +0 -236
- common/session/views/viewport.py +0 -21
- common/session/views/xform.py +0 -39
- {antioch_py-2.0.7.dist-info → antioch_py-2.1.0.dist-info}/WHEEL +0 -0
- {antioch_py-2.0.7.dist-info → antioch_py-2.1.0.dist-info}/entry_points.txt +0 -0
- {antioch_py-2.0.7.dist-info → antioch_py-2.1.0.dist-info}/top_level.txt +0 -0
|
@@ -7,47 +7,46 @@ antioch/module/input.py,sha256=BGbJ6AOgm7gVTO6PBYs8B53q0v_YD3Jy2joM5M7kUlk,4317
|
|
|
7
7
|
antioch/module/module.py,sha256=6b9s_N1Tpr4Wtp8hXVxZHDzhfKgG2IHeOd8KE65TfMk,7581
|
|
8
8
|
antioch/module/node.py,sha256=1EDNzKbQINs4nKZiSdn_FEPg-3MyCKdC0b7pfucmLgk,14542
|
|
9
9
|
antioch/module/token.py,sha256=6KJbPMoaMqUrx8nfYzAgVTf8EaazT46g6KMC1zO97Pk,830
|
|
10
|
-
antioch/session/__init__.py,sha256
|
|
11
|
-
antioch/session/ark.py,sha256=
|
|
10
|
+
antioch/session/__init__.py,sha256=-TtFaO3SCjIjBvh29Dso54qlfqnfdUbUN_p8tW5i220,3526
|
|
11
|
+
antioch/session/ark.py,sha256=r8hpCM8wymtgIX1mcvGofQR6mZOdn9UCsnFAtnnpvto,18814
|
|
12
12
|
antioch/session/asset.py,sha256=G4wKHVxDkzLEtUap7b7jDF6Y_I4gdHiJ-b756QFBx54,2222
|
|
13
13
|
antioch/session/error.py,sha256=hEByLcsS8PPpK46prnz1GSWBx0ErGTnSkwBd29FUmWg,1685
|
|
14
14
|
antioch/session/record.py,sha256=acNeikDeWJFZLovgwbXGHTriqi5-szYjjrnt9s_cdUY,5527
|
|
15
|
-
antioch/session/scene.py,sha256=
|
|
16
|
-
antioch/session/session.py,sha256=
|
|
17
|
-
antioch/session/task.py,sha256=
|
|
18
|
-
antioch/session/
|
|
19
|
-
antioch/session/
|
|
20
|
-
antioch/session/
|
|
21
|
-
antioch/session/
|
|
22
|
-
antioch/session/
|
|
23
|
-
antioch/session/
|
|
24
|
-
antioch/session/
|
|
25
|
-
antioch/session/
|
|
26
|
-
antioch/session/
|
|
27
|
-
antioch/session/
|
|
28
|
-
antioch/session/
|
|
29
|
-
antioch/session/
|
|
30
|
-
antioch/session/
|
|
31
|
-
antioch/session/
|
|
32
|
-
antioch/session/
|
|
33
|
-
antioch/session/views/xform.py,sha256=BELykGHYhdZyHkCY6uakCnmJKwhyiDrCEGy9038GY_Y,3299
|
|
15
|
+
antioch/session/scene.py,sha256=LVUqNZc_PonI8X6tg5rrKSTv3zqdAQERt-QOk-g4MhA,58585
|
|
16
|
+
antioch/session/session.py,sha256=K25RZZ8HYMUpyeDoCzzWh-YLs1DcjBlrzxN2SvbtZ4E,6348
|
|
17
|
+
antioch/session/task.py,sha256=OBGFAD-oWRjkQUAElO9bXhJ_SI-j7S6TxKpUmCgN1-M,11484
|
|
18
|
+
antioch/session/objects/__init__.py,sha256=n7EYDfneWwro1OaXphbWGyasZ0tvAAAGe72PcUmTF_Y,1184
|
|
19
|
+
antioch/session/objects/animation.py,sha256=FIgYsHG9TWcdi5aG3ycGorJv-nJBFkiHArDWXLEx8bY,5427
|
|
20
|
+
antioch/session/objects/articulation.py,sha256=bSAvi6ZOAGOPTsXEtt8fGAG3VF8UR8TxSL0L1izGtbQ,6644
|
|
21
|
+
antioch/session/objects/basis_curve.py,sha256=7LD7B92Ohr2bPm5Lh76NaMbFRiHFcUIxaKjWcMYtykc,4954
|
|
22
|
+
antioch/session/objects/camera.py,sha256=clFfSKKlvMlh8x_OZb7AmHrqmWxO9sI760_LGvIBwBM,2252
|
|
23
|
+
antioch/session/objects/collision.py,sha256=ZGAINF7p3MbCoTwvx4Pzicc8dIfbJgjBgUn_TC_hrT0,1479
|
|
24
|
+
antioch/session/objects/geometry.py,sha256=MuC6qnHCVGnxYGovHU8U2G-tRGbINoL273t3yYQAPCE,1954
|
|
25
|
+
antioch/session/objects/ground_plane.py,sha256=o82nW9Ndhw-AiwiSKUrr1IhspFmdah7BYOTc1EUVEeg,1460
|
|
26
|
+
antioch/session/objects/imu.py,sha256=vx59MutAg1HOEvZESqOmxlQocrnXEW1B5rqD7LBzLwM,1602
|
|
27
|
+
antioch/session/objects/joint.py,sha256=_mqXq1IDvzQ9FnvCpKXGa0YNh8f9zCtmskC8UP4QgNI,1476
|
|
28
|
+
antioch/session/objects/light.py,sha256=Sl0zPIiCnocCCLUaaJaiDLbHVhAJ-ZnIr9IOueIrc_g,3831
|
|
29
|
+
antioch/session/objects/pir_sensor.py,sha256=M7-xs4h0-Mq3_Qea0K4ZrezDTOnqL4nXVjLZIIKHdwU,3455
|
|
30
|
+
antioch/session/objects/radar.py,sha256=BXl8OzngiY_urBRBB7kAlBHvtpR9aosWv7nuYcKSeWo,1930
|
|
31
|
+
antioch/session/objects/rigid_body.py,sha256=TuJ04vG0eyzg4lFAVp7ZE0YTzOjhlcqLoNaeW2sZM0E,6294
|
|
32
|
+
antioch/session/objects/xform.py,sha256=VkSDIfFEuutrDVuKO2F5sI4zKsGa0xZzxFeH-tRMjp0,3237
|
|
34
33
|
common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
34
|
common/constants.py,sha256=xlgBKdPoiDzAnWkeEsnktMJfXjBP5FTJkM3MGClTnuY,1085
|
|
36
35
|
common/ark/__init__.py,sha256=Lu2lJ5k7-vN6ZGeX2sYhRwzXEyt9kCyXtgsyvdIaCiU,1472
|
|
37
36
|
common/ark/ark.py,sha256=rToMvtpu634ylJbEfYlTD13Cb3udF_S4SfI8xQsL1P4,2376
|
|
38
|
-
common/ark/hardware.py,sha256=
|
|
39
|
-
common/ark/kinematics.py,sha256=
|
|
37
|
+
common/ark/hardware.py,sha256=5AH9jkrjIvVK6JBfWM7Okpqm9Iqbs7gtyxktlzBS4oI,2252
|
|
38
|
+
common/ark/kinematics.py,sha256=BCPQKmQ5vWlZBCie861TIImmR3X5BniiuGRPoIvByDM,748
|
|
40
39
|
common/ark/module.py,sha256=IwkoirFb4dZkfVpn3tjgChRy5S6hVPbrtR9XgJ5UIBI,1922
|
|
41
40
|
common/ark/node.py,sha256=PWESl7sDdY_Q6aA3CZMRTQ0SONlO9LkUmXhRbUhT8_g,2303
|
|
42
41
|
common/ark/scheduler.py,sha256=QGO_-ZewCvOHJ-w9BAJJQdco0-b-mbbzufpSX9b-mNo,15703
|
|
43
42
|
common/ark/sim.py,sha256=SQtZkf97QF91oLWkTUEhq62GYL3yk7-LLDDR-lXVKcA,900
|
|
44
43
|
common/assets/__init__.py,sha256=We71LsStYI5-hknGd2XHrvHg8G4k1dity887BnI5oPI,102
|
|
45
44
|
common/core/__init__.py,sha256=L8rvLHQd-mOCfDQ2WN9BZiMqU0skeTTkeQvpJ59ouqI,1110
|
|
46
|
-
common/core/agent.py,sha256=
|
|
45
|
+
common/core/agent.py,sha256=EBNSTuxCOUM66UV7e1LA1aQLyYgIsRjFZXWqbbp-lR0,8613
|
|
47
46
|
common/core/auth.py,sha256=TeJIhYm8buQLAkl3jORuGV03pP1MNOhetHunE9z2nsM,9347
|
|
48
47
|
common/core/registry.py,sha256=J2Ihhgr6aTfovm-zSiGEcyHB8iBcpFcZVw6vVYKFjNg,11399
|
|
49
48
|
common/core/task.py,sha256=eybV7yQ8nPYgQtYuse-QvoMJ87Msh6rAN_LUOTGmN94,629
|
|
50
|
-
common/message/__init__.py,sha256=
|
|
49
|
+
common/message/__init__.py,sha256=JHTTMFuMYUF9jspydMihfz2dK9-Mp37zWOTMZBUwK5g,1802
|
|
51
50
|
common/message/annotation.py,sha256=BlzDYhioAK1ATFfgZozmaF7uOqFdSr7KBhe2m03Z2q4,1911
|
|
52
51
|
common/message/array.py,sha256=Fly7u8BE-_QRwnkmv3k6P2EI0FguEUIzF_tE-mFGT1Q,13971
|
|
53
52
|
common/message/base.py,sha256=kdBEmcHy6R9EV_QbarSwPWZE0n_Sar-gXK8g5ceT2-U,18080
|
|
@@ -66,36 +65,21 @@ common/message/quaternion.py,sha256=Y6-XR3g7VaWVOkLoK6hE26wTYjnJFjrHIv9y17GM1EY,
|
|
|
66
65
|
common/message/radar.py,sha256=18w89hpq5tahh9V_49CWKXkU78b21xrTj_bH35u1UFE,2014
|
|
67
66
|
common/message/types.py,sha256=k2wtbozsyd4HhMBoDfPFMLyCAGmTxaOvVhzIr-wx3N0,480
|
|
68
67
|
common/message/vector.py,sha256=IrREGUi2zKTUmp5PG4YNiJKEM1zRXLl0fK9QuF7I06o,20302
|
|
68
|
+
common/message/velocity.py,sha256=vHcFH_nMNBgobwY7dLeBaHJNvNiJxsQaPxImUh3GjHY,205
|
|
69
69
|
common/rome/__init__.py,sha256=hfwUw5wbT-Ph-OFwGhiqw3XEeWaZwmLAs66LOYKqfzU,210
|
|
70
70
|
common/rome/client.py,sha256=6cFzqXilZWNndRAhJctqdPjQQbJM4a0BzoyGYZapIh0,15462
|
|
71
71
|
common/rome/error.py,sha256=oW8yI81o3hQghop4omFcMkXx4IbacGye38Iyw2VKihQ,294
|
|
72
|
-
common/session/__init__.py,sha256=
|
|
72
|
+
common/session/__init__.py,sha256=S6DsgJbRwFHaEcqe2CNrR_KI2811B1auLv-VX4g5JVU,643
|
|
73
|
+
common/session/config.py,sha256=IxNK4uGRVmruLq9eFktBu8opyc_ACg1kysgkvCb5lho,17874
|
|
73
74
|
common/session/environment.py,sha256=CVW00KXWF8L0L6ocUsZ2UWt-iqAiP0usFdhZsK43fak,714
|
|
74
|
-
common/session/sim.py,sha256=
|
|
75
|
-
common/session/views/__init__.py,sha256=AVqMcuR_rA2mO7JmttYcACnHXsNyIf4xvqmDBCXft30,6525
|
|
76
|
-
common/session/views/animation.py,sha256=Dz9bFMQeLGWaOgQ9GPOMjBBZ7uB2Nynk0ovQl9EDBfA,2407
|
|
77
|
-
common/session/views/articulation.py,sha256=DwJTQk8iU3vII9aEc9_CBtUEszD1uhfCAr2NNJP9SBA,5044
|
|
78
|
-
common/session/views/basis_curve.py,sha256=56ylRppXA6_pUWJvSS_XjgI5rxBtJ0v16zU7vM8RcnQ,3115
|
|
79
|
-
common/session/views/camera.py,sha256=H9Gt0K9DhoiBKxeSyljezj6Mn1-Rp4-vkf_4our3IPE,4458
|
|
80
|
-
common/session/views/collision.py,sha256=brMzJRsYXW9MAqmPMzovSBx73MM870V3hzfkL5yroFY,1360
|
|
81
|
-
common/session/views/geometry.py,sha256=7CBTugs8Onr7tddyzz5g5f3HY7rz_9tuIxYbRWbnFmM,3453
|
|
82
|
-
common/session/views/ground_plane.py,sha256=iHi7bx3qHveh94b88oPz7Yy9cjznc194T6Bx9I6SK1Q,1174
|
|
83
|
-
common/session/views/imu.py,sha256=usMm4yeqY_emcTQGjs2hC3Rk-tfen2dp0fIWTDADpxc,1593
|
|
84
|
-
common/session/views/joint.py,sha256=eP5fLAWqvaQ13xZrNkn79DdRERZMvVrP9emJYZ_J_KA,2098
|
|
85
|
-
common/session/views/light.py,sha256=IpqkSB6qZCfbe63GAJaPHdy4rJDNki8h-Hm-1kwDwHc,2284
|
|
86
|
-
common/session/views/material.py,sha256=QtklOzGZn7nPiMzR7aq9u0nTSkCUlY-rsaPzfv1f9EQ,942
|
|
87
|
-
common/session/views/pir_sensor.py,sha256=HyrV5SU9GEWBL-s9B6AKoR6VhhvPxr7EnEzhSwyECPc,5495
|
|
88
|
-
common/session/views/radar.py,sha256=KTEwFKvEr3f2SrdAhb3iSIKRMKa0PIRXx7-T5hRiDgg,3429
|
|
89
|
-
common/session/views/rigid_body.py,sha256=19cjU2bZvaFzs8OoNsu4gzZHu97nJMUueBc6Wt0NUWk,4523
|
|
90
|
-
common/session/views/viewport.py,sha256=tPb1yCFd5nqCapkqSyWCEJ8joEk3fIIfZNr1uAbNAfM,682
|
|
91
|
-
common/session/views/xform.py,sha256=uxcmtFFGKLF-Jkln1r08CZuyLr7EI8DvdKYuyUFdieM,863
|
|
75
|
+
common/session/sim.py,sha256=CrwVPbu0m8UAFUSsTsU_TMgD1Ik9FKxs9FsaepIuZzg,2859
|
|
92
76
|
common/utils/__init__.py,sha256=9zRb7XayzCGRs4I94hWKJHyQ1MevlUiTzXsPNBLBX7Y,113
|
|
93
77
|
common/utils/comms.py,sha256=1lpnb9ra5I3xv-Eo0GFZ7nR4TjKseOeDNf9QMWQZbds,17283
|
|
94
78
|
common/utils/logger.py,sha256=VcZ4dduWut8xWPs-F5ye8RRrNdBehSSG3r1LAWc-IBY,3389
|
|
95
79
|
common/utils/time.py,sha256=kGDzObbaqWOep4vT1Y2W-BheunxdjYBI4V3Nfp4Ck3Q,790
|
|
96
80
|
common/utils/usd.py,sha256=to4VPtnamMDIQK-pwDIVfiuzUnNzEImj5szOar1NHiE,253
|
|
97
|
-
antioch_py-2.0.
|
|
98
|
-
antioch_py-2.0.
|
|
99
|
-
antioch_py-2.0.
|
|
100
|
-
antioch_py-2.0.
|
|
101
|
-
antioch_py-2.0.
|
|
81
|
+
antioch_py-2.1.0.dist-info/METADATA,sha256=3OC3a-QVismTnO4q-fDOvSjPScvGZqPKSMEeCcrJ-ro,3485
|
|
82
|
+
antioch_py-2.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
83
|
+
antioch_py-2.1.0.dist-info/entry_points.txt,sha256=1bLTH5BXCOsQkS8k6L_wJ6Nj62j4aoU9Ey_PhWzsRRM,59
|
|
84
|
+
antioch_py-2.1.0.dist-info/top_level.txt,sha256=GtzNccsep3YdBt9VXQ7-ZFsFJFffr4hyZvqg0YqRqtw,15
|
|
85
|
+
antioch_py-2.1.0.dist-info/RECORD,,
|
common/ark/hardware.py
CHANGED
|
@@ -6,11 +6,7 @@ from typing import Annotated, Literal, Union
|
|
|
6
6
|
from pydantic import Field
|
|
7
7
|
|
|
8
8
|
from common.message import Message, Pose
|
|
9
|
-
from common.session.
|
|
10
|
-
from common.session.views.camera import CameraConfig
|
|
11
|
-
from common.session.views.imu import ImuConfig
|
|
12
|
-
from common.session.views.pir_sensor import PirSensorConfig
|
|
13
|
-
from common.session.views.radar import RadarConfig
|
|
9
|
+
from common.session.config import ArticulationConfig, CameraConfig, ImuConfig, PirSensorConfig, RadarConfig
|
|
14
10
|
|
|
15
11
|
|
|
16
12
|
class HardwareType(str, Enum):
|
common/ark/kinematics.py
CHANGED
common/core/agent.py
CHANGED
|
@@ -63,6 +63,14 @@ class RecordTelemetryRequest(Message):
|
|
|
63
63
|
websocket_port: int | None = None
|
|
64
64
|
|
|
65
65
|
|
|
66
|
+
class SaveTelemetryRequest(Message):
|
|
67
|
+
"""
|
|
68
|
+
Request to save telemetry (finalize MCAP without resetting session).
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
_type = "antioch/agent/save_telemetry_request"
|
|
72
|
+
|
|
73
|
+
|
|
66
74
|
class AgentResponse(Message):
|
|
67
75
|
"""
|
|
68
76
|
Generic response for agent operations.
|
|
@@ -251,6 +259,26 @@ class Agent:
|
|
|
251
259
|
if not response.success:
|
|
252
260
|
raise AgentError(f"Failed to start recording telemetry: {response.error}")
|
|
253
261
|
|
|
262
|
+
def save_telemetry(self) -> None:
|
|
263
|
+
"""
|
|
264
|
+
Save telemetry by finalizing the MCAP file.
|
|
265
|
+
|
|
266
|
+
Closes the current MCAP recording if one is active. Does NOT reset the websocket
|
|
267
|
+
session or time tracking - telemetry continues streaming to connected clients.
|
|
268
|
+
|
|
269
|
+
:raises AgentError: If the agent fails to save telemetry.
|
|
270
|
+
"""
|
|
271
|
+
|
|
272
|
+
response = self.comms.query(
|
|
273
|
+
path="_agent/save_telemetry",
|
|
274
|
+
response_type=AgentResponse,
|
|
275
|
+
request=SaveTelemetryRequest(),
|
|
276
|
+
timeout=5.0,
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
if not response.success:
|
|
280
|
+
raise AgentError(f"Failed to save telemetry: {response.error}")
|
|
281
|
+
|
|
254
282
|
def reset_telemetry(self) -> None:
|
|
255
283
|
"""
|
|
256
284
|
Reset telemetry session completely.
|
common/message/__init__.py
CHANGED
|
@@ -16,6 +16,7 @@ from common.message.quaternion import Quaternion
|
|
|
16
16
|
from common.message.radar import RadarDetection, RadarScan
|
|
17
17
|
from common.message.types import Bool, Float, Int, String
|
|
18
18
|
from common.message.vector import Vector2, Vector3
|
|
19
|
+
from common.message.velocity import Twist
|
|
19
20
|
|
|
20
21
|
__all__ = [
|
|
21
22
|
"Array",
|
|
@@ -56,4 +57,5 @@ __all__ = [
|
|
|
56
57
|
"TextAnnotation",
|
|
57
58
|
"Vector2",
|
|
58
59
|
"Vector3",
|
|
60
|
+
"Twist",
|
|
59
61
|
]
|
common/session/__init__.py
CHANGED
|
@@ -1,54 +1,31 @@
|
|
|
1
|
+
from common.session.config import BodyType, DistortionModel, GeometryType, LightType, MeshApproximation
|
|
1
2
|
from common.session.sim import (
|
|
2
|
-
AddAsset,
|
|
3
|
-
GetLocalPose,
|
|
4
|
-
GetPrimAttribute,
|
|
5
|
-
GetWorldPose,
|
|
6
3
|
PrimAttributeValue,
|
|
7
4
|
PrimInfo,
|
|
8
|
-
QueryScene,
|
|
9
5
|
RpcCall,
|
|
10
6
|
RpcError,
|
|
11
7
|
RpcResponse,
|
|
12
8
|
SceneQueryResponse,
|
|
13
9
|
SceneTarget,
|
|
14
|
-
SetLocalPose,
|
|
15
|
-
SetPrimAttribute,
|
|
16
|
-
SetWorldPose,
|
|
17
10
|
SimulationInfo,
|
|
18
11
|
SimulationState,
|
|
19
12
|
SimulationTime,
|
|
20
|
-
Step,
|
|
21
|
-
ToggleUi,
|
|
22
13
|
)
|
|
23
|
-
from common.session.views.camera import DistortionModel
|
|
24
|
-
from common.session.views.geometry import GeometryType, MeshApproximation
|
|
25
|
-
from common.session.views.light import LightType
|
|
26
|
-
from common.session.views.rigid_body import BodyType
|
|
27
14
|
|
|
28
15
|
__all__ = [
|
|
29
|
-
"AddAsset",
|
|
30
16
|
"BodyType",
|
|
31
17
|
"DistortionModel",
|
|
32
18
|
"GeometryType",
|
|
33
|
-
"GetLocalPose",
|
|
34
|
-
"GetPrimAttribute",
|
|
35
|
-
"GetWorldPose",
|
|
36
19
|
"LightType",
|
|
37
20
|
"MeshApproximation",
|
|
38
21
|
"PrimAttributeValue",
|
|
39
22
|
"PrimInfo",
|
|
40
|
-
"QueryScene",
|
|
41
23
|
"RpcCall",
|
|
42
24
|
"RpcError",
|
|
43
25
|
"RpcResponse",
|
|
44
26
|
"SceneQueryResponse",
|
|
45
27
|
"SceneTarget",
|
|
46
|
-
"SetLocalPose",
|
|
47
|
-
"SetPrimAttribute",
|
|
48
|
-
"SetWorldPose",
|
|
49
28
|
"SimulationInfo",
|
|
50
29
|
"SimulationState",
|
|
51
30
|
"SimulationTime",
|
|
52
|
-
"Step",
|
|
53
|
-
"ToggleUi",
|
|
54
31
|
]
|
common/session/config.py
ADDED
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
from pydantic.alias_generators import to_camel
|
|
5
|
+
|
|
6
|
+
from common.message import CameraInfo, Message, Pose, Vector3
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class GeometryType(str, Enum):
|
|
10
|
+
"""
|
|
11
|
+
Supported geometry types.
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
SPHERE = "sphere"
|
|
15
|
+
CUBE = "cube"
|
|
16
|
+
CYLINDER = "cylinder"
|
|
17
|
+
CONE = "cone"
|
|
18
|
+
CAPSULE = "capsule"
|
|
19
|
+
MESH = "mesh"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class MeshApproximation(str, Enum):
|
|
23
|
+
"""
|
|
24
|
+
Collision mesh approximation type.
|
|
25
|
+
|
|
26
|
+
Values are stored in snake_case for consistency with Rust. Use to_usd()
|
|
27
|
+
to get the camelCase format required by USD/Isaac Sim.
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
NONE = "none"
|
|
31
|
+
CONVEX_HULL = "convex_hull"
|
|
32
|
+
CONVEX_DECOMPOSITION = "convex_decomposition"
|
|
33
|
+
BOUNDING_SPHERE = "bounding_sphere"
|
|
34
|
+
BOUNDING_CUBE = "bounding_cube"
|
|
35
|
+
MESH_SIMPLIFICATION = "mesh_simplification"
|
|
36
|
+
SDF = "sdf"
|
|
37
|
+
SPHERE_FILL = "sphere_fill"
|
|
38
|
+
|
|
39
|
+
def to_usd(self) -> str:
|
|
40
|
+
"""
|
|
41
|
+
Convert to USD camelCase format.
|
|
42
|
+
|
|
43
|
+
:return: The USD camelCase format.
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
return to_camel(self.value)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class GeometryConfig(Message):
|
|
50
|
+
"""
|
|
51
|
+
Configuration for creating geometry.
|
|
52
|
+
"""
|
|
53
|
+
|
|
54
|
+
geometry_type: GeometryType = Field(description="Geometry type")
|
|
55
|
+
radius: float | None = Field(default=None, description="Radius for sphere/cylinder/cone/capsule")
|
|
56
|
+
height: float | None = Field(default=None, description="Height for cylinder/cone/capsule")
|
|
57
|
+
size: float | None = Field(default=None, description="Size for cube (uniform)")
|
|
58
|
+
color: Vector3 | None = Field(default=None, description="RGB color (0-1)")
|
|
59
|
+
opacity: float = Field(default=1.0, description="Opacity (0=transparent, 1=opaque)")
|
|
60
|
+
enable_collision: bool = Field(default=True, description="Whether to enable collision on this geometry")
|
|
61
|
+
static_friction: float = Field(default=0.5, description="Static friction coefficient")
|
|
62
|
+
dynamic_friction: float = Field(default=0.5, description="Dynamic friction coefficient")
|
|
63
|
+
restitution: float = Field(default=0.2, description="Restitution (bounciness)")
|
|
64
|
+
mesh_file_path: str | None = Field(default=None, description="Path to mesh file (FBX, OBJ, glTF, STL, etc.) - required for MESH type")
|
|
65
|
+
mesh_approximation: MeshApproximation = Field(default=MeshApproximation.CONVEX_DECOMPOSITION, description="Mesh approximation method")
|
|
66
|
+
contact_offset: float | None = Field(default=None, description="Distance at which collision detection begins")
|
|
67
|
+
rest_offset: float | None = Field(default=None, description="Minimum separation distance between objects")
|
|
68
|
+
torsional_patch_radius: float | None = Field(default=None, description="Radius for torsional friction calculations")
|
|
69
|
+
min_torsional_patch_radius: float | None = Field(default=None, description="Minimum radius for torsional friction")
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class CameraMode(str, Enum):
|
|
73
|
+
"""
|
|
74
|
+
Camera capture modes.
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
RGB = "rgb"
|
|
78
|
+
DEPTH = "depth"
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class DistortionModel(str, Enum):
|
|
82
|
+
"""
|
|
83
|
+
Camera lens distortion model types.
|
|
84
|
+
"""
|
|
85
|
+
|
|
86
|
+
PINHOLE = "pinhole"
|
|
87
|
+
OPENCV_PINHOLE = "opencv_pinhole"
|
|
88
|
+
OPENCV_FISHEYE = "opencv_fisheye"
|
|
89
|
+
FTHETA = "ftheta"
|
|
90
|
+
KANNALA_BRANDT_K3 = "kannala_brandt_k3"
|
|
91
|
+
RAD_TAN_THIN_PRISM = "rad_tan_thin_prism"
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class CameraConfig(Message):
|
|
95
|
+
"""
|
|
96
|
+
Configuration for camera sensor.
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
mode: CameraMode = Field(default=CameraMode.RGB, description="Camera capture mode (RGB or depth)")
|
|
100
|
+
frequency: int = Field(default=30, description="Camera update frequency in Hz")
|
|
101
|
+
width: int = Field(default=640, description="Image width in pixels")
|
|
102
|
+
height: int = Field(default=480, description="Image height in pixels")
|
|
103
|
+
focal_length: float = Field(default=50.0, description="Focal length in mm")
|
|
104
|
+
sensor_width: float = Field(default=20.4, description="Physical sensor width in mm")
|
|
105
|
+
sensor_height: float = Field(default=15.3, description="Physical sensor height in mm")
|
|
106
|
+
near_clip: float = Field(default=0.1, description="Near clipping plane in meters")
|
|
107
|
+
far_clip: float = Field(default=1000.0, description="Far clipping plane in meters")
|
|
108
|
+
f_stop: float = Field(default=0.0, description="F-stop for depth of field")
|
|
109
|
+
focus_distance: float = Field(default=10.0, description="Focus distance in meters")
|
|
110
|
+
principal_point_x: float = Field(default=0.0, description="Principal point X offset in pixels")
|
|
111
|
+
principal_point_y: float = Field(default=0.0, description="Principal point Y offset in pixels")
|
|
112
|
+
distortion_model: DistortionModel = Field(default=DistortionModel.PINHOLE, description="Lens distortion model")
|
|
113
|
+
distortion_coefficients: list[float] | None = Field(default=None, description="Distortion coefficients")
|
|
114
|
+
|
|
115
|
+
def to_camera_info(self, frame_id: str = "camera_optical_frame") -> CameraInfo:
|
|
116
|
+
"""
|
|
117
|
+
Convert camera configuration to CameraInfo with calculated intrinsics.
|
|
118
|
+
|
|
119
|
+
:param frame_id: The coordinate frame ID for the camera.
|
|
120
|
+
:return: CameraInfo with full intrinsics and distortion parameters.
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
# Convert mm to pixels for focal length
|
|
124
|
+
fx = self.width * self.focal_length / self.sensor_width
|
|
125
|
+
fy = self.height * self.focal_length / self.sensor_height
|
|
126
|
+
|
|
127
|
+
# Principal point (image center + offset)
|
|
128
|
+
cx = self.width / 2.0 + self.principal_point_x
|
|
129
|
+
cy = self.height / 2.0 + self.principal_point_y
|
|
130
|
+
|
|
131
|
+
return CameraInfo(
|
|
132
|
+
width=self.width,
|
|
133
|
+
height=self.height,
|
|
134
|
+
fx=fx,
|
|
135
|
+
fy=fy,
|
|
136
|
+
cx=cx,
|
|
137
|
+
cy=cy,
|
|
138
|
+
distortion_model=self.distortion_model.value,
|
|
139
|
+
distortion_coefficients=self.distortion_coefficients or [],
|
|
140
|
+
frame_id=frame_id,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class ArticulationJointConfig(Message):
|
|
145
|
+
"""
|
|
146
|
+
Complete configuration for a single joint in an articulation.
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
path: str = Field(description="Name of the joint/DOF")
|
|
150
|
+
stiffness: float | None = Field(default=None, description="PD controller stiffness (Kp)")
|
|
151
|
+
damping: float | None = Field(default=None, description="PD controller damping (Kd)")
|
|
152
|
+
lower_limit: float | None = Field(default=None, description="Lower joint limit")
|
|
153
|
+
upper_limit: float | None = Field(default=None, description="Upper joint limit")
|
|
154
|
+
armature: float | None = Field(default=None, description="Joint armature")
|
|
155
|
+
friction_coefficient: float | None = Field(default=None, description="Joint friction coefficient")
|
|
156
|
+
max_velocity: float | None = Field(default=None, description="Maximum joint velocity")
|
|
157
|
+
max_effort: float | None = Field(default=None, description="Maximum joint effort")
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
class ArticulationConfig(Message):
|
|
161
|
+
"""
|
|
162
|
+
Configuration for applying articulation root to a prim.
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
solver_position_iterations: int = Field(default=32, description="Number of position iterations for the solver")
|
|
166
|
+
solver_velocity_iterations: int = Field(default=1, description="Number of velocity iterations for the solver")
|
|
167
|
+
sleep_threshold: float = Field(default=0.005, description="Sleep threshold for the articulation")
|
|
168
|
+
stabilization_threshold: float = Field(default=0.001, description="Stabilization threshold for the articulation")
|
|
169
|
+
enable_self_collisions: bool = Field(default=False, description="Whether to enable self-collisions")
|
|
170
|
+
joint_configs: list[ArticulationJointConfig] = Field(default_factory=list, description="Per-joint configurations")
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class JointType(str, Enum):
|
|
174
|
+
"""
|
|
175
|
+
Types of joints supported by the simulator.
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
REVOLUTE = "revolute"
|
|
179
|
+
PRISMATIC = "prismatic"
|
|
180
|
+
FIXED = "fixed"
|
|
181
|
+
SPHERICAL = "spherical"
|
|
182
|
+
DISTANCE = "distance"
|
|
183
|
+
GENERIC = "generic"
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
class JointAxis(str, Enum):
|
|
187
|
+
"""
|
|
188
|
+
Axis of motion for joints.
|
|
189
|
+
"""
|
|
190
|
+
|
|
191
|
+
X = "x"
|
|
192
|
+
Y = "y"
|
|
193
|
+
Z = "z"
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
class JointConfig(Message):
|
|
197
|
+
"""
|
|
198
|
+
Configuration for a joint object that connects two bodies.
|
|
199
|
+
"""
|
|
200
|
+
|
|
201
|
+
# Joint relationships
|
|
202
|
+
parent_path: str = Field(description="USD path to parent body")
|
|
203
|
+
child_path: str = Field(description="USD path to child body")
|
|
204
|
+
|
|
205
|
+
# Transform
|
|
206
|
+
pose: Pose = Field(default_factory=Pose.identity, description="Joint pose relative to parent")
|
|
207
|
+
|
|
208
|
+
# Joint properties
|
|
209
|
+
joint_type: JointType = Field(default=JointType.FIXED, description="Type of joint motion allowed")
|
|
210
|
+
axis: JointAxis = Field(default=JointAxis.X, description="Axis of motion for non-fixed joints")
|
|
211
|
+
|
|
212
|
+
# Motion limits (for revolute: degrees, for prismatic: meters)
|
|
213
|
+
lower_limit: float | None = Field(default=None, description="Lower motion limit")
|
|
214
|
+
upper_limit: float | None = Field(default=None, description="Upper motion limit")
|
|
215
|
+
|
|
216
|
+
# Physics properties
|
|
217
|
+
friction: float = Field(default=0.01, description="Joint friction (unitless)")
|
|
218
|
+
armature: float = Field(default=0.1, description="Joint armature (kg for prismatic, kg-m^2 for revolute)")
|
|
219
|
+
|
|
220
|
+
# Special properties
|
|
221
|
+
exclude_from_articulation: bool = Field(default=False, description="Whether to exclude this joint from articulation")
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
class BodyType(str, Enum):
|
|
225
|
+
"""
|
|
226
|
+
Type of rigid body.
|
|
227
|
+
"""
|
|
228
|
+
|
|
229
|
+
DYNAMIC = "dynamic"
|
|
230
|
+
KINEMATIC = "kinematic"
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
class RigidBodyConfig(Message):
|
|
234
|
+
"""
|
|
235
|
+
Configuration for rigid body physics properties.
|
|
236
|
+
|
|
237
|
+
Note: Collision properties (friction, restitution, mesh approximation) are configured
|
|
238
|
+
on the geometry, not the rigid body.
|
|
239
|
+
"""
|
|
240
|
+
|
|
241
|
+
body_type: BodyType = Field(default=BodyType.DYNAMIC, description="Type of rigid body")
|
|
242
|
+
mass: float = Field(default=1.0, description="Mass in kg")
|
|
243
|
+
density: float | None = Field(default=None, description="Density in kg/m³ (alternative to mass)")
|
|
244
|
+
center_of_mass: Vector3 | None = Field(default=None, description="Center of mass offset in body frame")
|
|
245
|
+
diagonal_inertia: Vector3 | None = Field(default=None, description="Diagonal inertia values (Ixx, Iyy, Izz)")
|
|
246
|
+
principal_axes: Vector3 | None = Field(default=None, description="Principal axes orientation as RPY")
|
|
247
|
+
sleep_threshold: float | None = Field(default=None, description="Mass-normalized kinetic energy threshold for sleeping")
|
|
248
|
+
linear_velocity: Vector3 | None = Field(default=None, description="Initial linear velocity")
|
|
249
|
+
angular_velocity: Vector3 | None = Field(default=None, description="Initial angular velocity")
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
class LightType(str, Enum):
|
|
253
|
+
"""
|
|
254
|
+
Supported light types.
|
|
255
|
+
"""
|
|
256
|
+
|
|
257
|
+
SPHERE = "sphere"
|
|
258
|
+
RECT = "rect"
|
|
259
|
+
DISK = "disk"
|
|
260
|
+
CYLINDER = "cylinder"
|
|
261
|
+
DISTANT = "distant"
|
|
262
|
+
DOME = "dome"
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
class LightConfig(Message):
|
|
266
|
+
"""
|
|
267
|
+
Configuration for creating a light.
|
|
268
|
+
"""
|
|
269
|
+
|
|
270
|
+
light_type: LightType = Field(default=LightType.SPHERE, description="Light type")
|
|
271
|
+
intensity: float = Field(default=30000.0, description="Light intensity")
|
|
272
|
+
exposure: float = Field(default=10.0, description="Light exposure")
|
|
273
|
+
color: Vector3 = Field(default_factory=Vector3.ones, description="RGB color (0-1)")
|
|
274
|
+
radius: float = Field(default=0.1, description="Radius for sphere lights (meters)")
|
|
275
|
+
width: float | None = Field(default=None, description="Width for rect lights (meters)")
|
|
276
|
+
height: float | None = Field(default=None, description="Height for rect/cylinder lights (meters)")
|
|
277
|
+
length: float | None = Field(default=None, description="Length for cylinder lights (meters)")
|
|
278
|
+
angle: float | None = Field(default=None, description="Angle for distant lights (degrees)")
|
|
279
|
+
texture_file: str | None = Field(default=None, description="Texture file for dome lights")
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
class GroundPlaneConfig(Message):
|
|
283
|
+
"""
|
|
284
|
+
Configuration for creating a ground plane.
|
|
285
|
+
"""
|
|
286
|
+
|
|
287
|
+
size: float = Field(default=5000.0, description="Size of the ground plane in meters")
|
|
288
|
+
z_position: float = Field(default=0.0, description="Z position of the ground plane")
|
|
289
|
+
color: Vector3 = Field(default=Vector3.new(0.5, 0.5, 0.5), description="RGB color (0-1)")
|
|
290
|
+
static_friction: float = Field(default=0.5, description="Static friction coefficient")
|
|
291
|
+
dynamic_friction: float = Field(default=0.5, description="Dynamic friction coefficient")
|
|
292
|
+
restitution: float = Field(default=0.0, description="Restitution (bounciness)")
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
class ImuConfig(Message):
|
|
296
|
+
"""
|
|
297
|
+
Configuration for IMU sensor.
|
|
298
|
+
"""
|
|
299
|
+
|
|
300
|
+
frequency: int | None = Field(default=None, description="Sensor update frequency in Hz (optional, defaults to physics rate)")
|
|
301
|
+
linear_acceleration_filter_size: int = Field(default=10, description="Filter window size for linear acceleration")
|
|
302
|
+
angular_velocity_filter_size: int = Field(default=10, description="Filter window size for angular velocity")
|
|
303
|
+
orientation_filter_size: int = Field(default=10, description="Filter window size for orientation")
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
class RadarConfig(Message):
|
|
307
|
+
"""
|
|
308
|
+
Configuration for RTX radar sensor.
|
|
309
|
+
|
|
310
|
+
All parameters can be customized with sensible defaults provided.
|
|
311
|
+
"""
|
|
312
|
+
|
|
313
|
+
# Core sensor parameters
|
|
314
|
+
frequency: int = Field(default=10, description="Sensor update frequency in Hz")
|
|
315
|
+
|
|
316
|
+
# Field of view (degrees from center, so total FOV is 2x these values)
|
|
317
|
+
max_azimuth: float = Field(default=66.0, description="Maximum azimuth angle in degrees (±FOV from center)")
|
|
318
|
+
max_elevation: float = Field(default=20.0, description="Maximum elevation angle in degrees (±FOV from center)")
|
|
319
|
+
|
|
320
|
+
# Range parameters
|
|
321
|
+
max_range: float = Field(default=200.0, description="Maximum detection range in meters")
|
|
322
|
+
range_resolution: float = Field(default=0.4, description="Range resolution in meters")
|
|
323
|
+
|
|
324
|
+
# Angular resolution at boresight (center of FOV)
|
|
325
|
+
azimuth_resolution: float = Field(default=1.3, description="Azimuth resolution at boresight in degrees")
|
|
326
|
+
elevation_resolution: float = Field(default=5.0, description="Elevation resolution at boresight in degrees")
|
|
327
|
+
|
|
328
|
+
# Noise parameters (standard deviation for Gaussian noise)
|
|
329
|
+
azimuth_noise: float = Field(default=0.0, description="Azimuth measurement noise standard deviation in radians")
|
|
330
|
+
range_noise: float = Field(default=0.0, description="Range measurement noise standard deviation in meters")
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
class PirSensorConfig(Message):
|
|
334
|
+
"""
|
|
335
|
+
Configuration for PIR (Passive Infrared) motion sensor.
|
|
336
|
+
|
|
337
|
+
PIR sensors detect infrared radiation changes caused by moving warm objects.
|
|
338
|
+
The sensor uses a 3-sensor design (center, left, right) with dual elements per sensor.
|
|
339
|
+
"""
|
|
340
|
+
|
|
341
|
+
# Core sensor parameters
|
|
342
|
+
update_rate_hz: float = Field(default=60.0, description="Sensor update frequency in Hz")
|
|
343
|
+
max_range: float = Field(default=20.0, description="Maximum detection range in meters")
|
|
344
|
+
|
|
345
|
+
# FOV configuration
|
|
346
|
+
total_horiz_fov_deg: float = Field(default=150.0, description="Total horizontal coverage")
|
|
347
|
+
sensor_side_fov_deg: float = Field(default=45.0, description="Horizontal FOV for side sensors")
|
|
348
|
+
sensor_center_fov_deg: float = Field(default=45.0, description="Horizontal FOV for center sensor")
|
|
349
|
+
|
|
350
|
+
# Ray configuration
|
|
351
|
+
sensor_rays_horiz: int = Field(default=128, description="Number of rays per sensor in horizontal direction")
|
|
352
|
+
sensor_rays_vert: int = Field(default=16, description="Number of rays per sensor in vertical direction")
|
|
353
|
+
|
|
354
|
+
# Sensor vertical angle range
|
|
355
|
+
min_vertical_angle_center: float = Field(default=-30.0, description="Minimum vertical angle for center sensor in degrees")
|
|
356
|
+
max_vertical_angle_center: float = Field(default=30.0, description="Maximum vertical angle for center sensor in degrees")
|
|
357
|
+
min_vertical_angle_side: float = Field(default=-30.0, description="Minimum vertical angle for side sensors in degrees")
|
|
358
|
+
max_vertical_angle_side: float = Field(default=30.0, description="Maximum vertical angle for side sensors in degrees")
|
|
359
|
+
|
|
360
|
+
# DSP / electronics parameters
|
|
361
|
+
gain_center: float = Field(default=0.015, description="Amplifier gain for center sensor")
|
|
362
|
+
gain_sides: float = Field(default=0.01, description="Amplifier gain for side sensors")
|
|
363
|
+
hp_corner_hz: float = Field(default=0.4, description="High-pass filter corner frequency in Hz")
|
|
364
|
+
lp_corner_hz: float = Field(default=10.0, description="Low-pass filter corner frequency in Hz")
|
|
365
|
+
blind_time_s: float = Field(default=0.5, description="Blind time after detection in seconds")
|
|
366
|
+
pulse_counter: int = Field(default=2, description="Number of pulses required to trigger detection (1-4)")
|
|
367
|
+
window_time_s: float = Field(default=2.0, description="Window time for pulse counting in seconds")
|
|
368
|
+
count_mode: int = Field(default=0, description="Pulse counting mode (0: sign change required, 1: any crossing)")
|
|
369
|
+
|
|
370
|
+
# Lens parameters
|
|
371
|
+
lens_transmission: float = Field(default=0.9, description="Lens transmission coefficient (0-1)")
|
|
372
|
+
lens_segments_h: int = Field(default=6, description="Number of horizontal lens segments (facets)")
|
|
373
|
+
|
|
374
|
+
# Environment parameters
|
|
375
|
+
ambient_temp_c: float = Field(default=20.0, description="Ambient temperature in Celsius")
|
|
376
|
+
|
|
377
|
+
# Hard-coded threshold (if not none) overrides auto-calibration
|
|
378
|
+
threshold: float | None = Field(default=None, description="Detection threshold (auto-calibrated if None)")
|
|
379
|
+
threshold_scale: float = Field(default=1.0, description="Scale factor applied to auto-calibrated threshold")
|
|
380
|
+
|
|
381
|
+
# Pyroelectric element parameters
|
|
382
|
+
thermal_time_constant_s: float = Field(default=0.2, description="Element thermal time constant in seconds")
|
|
383
|
+
pyro_responsivity: float = Field(default=4000.0, description="Pyroelectric responsivity scaling factor")
|
|
384
|
+
noise_amplitude: float = Field(default=20e-6, description="Thermal/electronic noise amplitude")
|
|
385
|
+
|
|
386
|
+
# Auto-threshold calibration parameters
|
|
387
|
+
target_delta_t: float = Field(default=10.0, description="Target temperature difference for threshold calibration in Celsius")
|
|
388
|
+
target_distance: float = Field(default=5.0, description="Target distance for threshold calibration in meters")
|
|
389
|
+
target_emissivity: float = Field(default=0.98, description="Target emissivity for threshold calibration")
|
|
390
|
+
target_velocity_mps: float = Field(default=1.0, description="Target velocity for threshold calibration in m/s")
|