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.
- 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/{views → objects}/radar.py +18 -29
- antioch/session/{views → objects}/rigid_body.py +25 -110
- antioch/session/{views → objects}/xform.py +24 -24
- antioch/session/scene.py +152 -162
- antioch/session/session.py +34 -43
- antioch/session/task.py +2 -16
- {antioch_py-2.0.6.dist-info → antioch_py-2.1.0.dist-info}/METADATA +1 -1
- {antioch_py-2.0.6.dist-info → antioch_py-2.1.0.dist-info}/RECORD +34 -48
- common/ark/hardware.py +13 -37
- common/ark/kinematics.py +1 -1
- common/core/agent.py +28 -0
- common/message/__init__.py +2 -0
- common/message/pir.py +7 -5
- 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 -40
- antioch/session/views/collision.py +0 -75
- 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/pir_sensor.py +0 -115
- common/session/views/radar.py +0 -82
- 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.6.dist-info → antioch_py-2.1.0.dist-info}/WHEEL +0 -0
- {antioch_py-2.0.6.dist-info → antioch_py-2.1.0.dist-info}/entry_points.txt +0 -0
- {antioch_py-2.0.6.dist-info → antioch_py-2.1.0.dist-info}/top_level.txt +0 -0
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
from antioch.session.session import Session
|
|
2
|
-
from common.session.views.collision import (
|
|
3
|
-
GetMeshApproximation,
|
|
4
|
-
GetMeshApproximationResponse,
|
|
5
|
-
HasCollision,
|
|
6
|
-
HasCollisionResponse,
|
|
7
|
-
RemoveCollision,
|
|
8
|
-
SetCollision,
|
|
9
|
-
)
|
|
10
|
-
from common.session.views.geometry import MeshApproximation
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def set_collision(path: str, mesh_approximation: MeshApproximation | None = None) -> None:
|
|
14
|
-
"""
|
|
15
|
-
Apply collision API to a prim, optionally with mesh approximation.
|
|
16
|
-
|
|
17
|
-
:param path: USD path to the prim.
|
|
18
|
-
:param mesh_approximation: Optional mesh approximation method for collision geometry.
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
Session.get_current().query_sim_rpc(
|
|
22
|
-
endpoint="set_collision",
|
|
23
|
-
payload=SetCollision(path=path, mesh_approximation=mesh_approximation),
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def remove_collision(path: str) -> None:
|
|
28
|
-
"""
|
|
29
|
-
Remove collision API from a prim.
|
|
30
|
-
|
|
31
|
-
:param path: USD path to the prim.
|
|
32
|
-
"""
|
|
33
|
-
|
|
34
|
-
Session.get_current().query_sim_rpc(
|
|
35
|
-
endpoint="remove_collision",
|
|
36
|
-
payload=RemoveCollision(path=path),
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def has_collision(path: str) -> bool:
|
|
41
|
-
"""
|
|
42
|
-
Check if a prim has collision API applied.
|
|
43
|
-
|
|
44
|
-
:param path: USD path to the prim.
|
|
45
|
-
:return: True if collision API is applied.
|
|
46
|
-
"""
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
Session.get_current()
|
|
50
|
-
.query_sim_rpc(
|
|
51
|
-
endpoint="has_collision",
|
|
52
|
-
payload=HasCollision(path=path),
|
|
53
|
-
response_type=HasCollisionResponse,
|
|
54
|
-
)
|
|
55
|
-
.has_collision
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def get_mesh_approximation(path: str) -> MeshApproximation | None:
|
|
60
|
-
"""
|
|
61
|
-
Get mesh collision approximation from a prim.
|
|
62
|
-
|
|
63
|
-
:param path: USD path to the prim.
|
|
64
|
-
:return: Mesh approximation method, or None if not set.
|
|
65
|
-
"""
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
Session.get_current()
|
|
69
|
-
.query_sim_rpc(
|
|
70
|
-
endpoint="get_mesh_approximation_rpc",
|
|
71
|
-
payload=GetMeshApproximation(path=path),
|
|
72
|
-
response_type=GetMeshApproximationResponse,
|
|
73
|
-
)
|
|
74
|
-
.approximation
|
|
75
|
-
)
|
common/session/views/__init__.py
DELETED
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
from common.message import PirStatus
|
|
2
|
-
from common.session.views.animation import (
|
|
3
|
-
AddAnimationFromBasisCurve,
|
|
4
|
-
AddAnimationFromWaypoints,
|
|
5
|
-
GetAnimation,
|
|
6
|
-
GetAnimationResponse,
|
|
7
|
-
RemoveAnimation,
|
|
8
|
-
UpdateAnimationBasisCurve,
|
|
9
|
-
UpdateAnimationWaypoints,
|
|
10
|
-
)
|
|
11
|
-
from common.session.views.articulation import (
|
|
12
|
-
AddArticulation,
|
|
13
|
-
ArticulationConfig,
|
|
14
|
-
ArticulationJointConfig,
|
|
15
|
-
ArticulationJointConfigs,
|
|
16
|
-
ArticulationJointStates,
|
|
17
|
-
ArticulationJointTargets,
|
|
18
|
-
BufferArticulationRead,
|
|
19
|
-
BufferArticulationWrite,
|
|
20
|
-
BufferArticulationWriteResponse,
|
|
21
|
-
BufferedArticulationState,
|
|
22
|
-
GetArticulation,
|
|
23
|
-
GetArticulationJointConfigs,
|
|
24
|
-
GetArticulationJointStates,
|
|
25
|
-
GetArticulationJointTargets,
|
|
26
|
-
GetArticulationResponse,
|
|
27
|
-
GetBufferedArticulationRead,
|
|
28
|
-
SetArticulationJointConfigs,
|
|
29
|
-
SetArticulationJointStates,
|
|
30
|
-
SetArticulationJointTargets,
|
|
31
|
-
)
|
|
32
|
-
from common.session.views.basis_curve import (
|
|
33
|
-
AddBasisCurveSemiCircle,
|
|
34
|
-
GetBasisCurve,
|
|
35
|
-
GetBasisCurveExtents,
|
|
36
|
-
GetBasisCurveExtentsResponse,
|
|
37
|
-
GetBasisCurvePoints,
|
|
38
|
-
GetBasisCurvePointsResponse,
|
|
39
|
-
GetBasisCurveResponse,
|
|
40
|
-
RemoveBasisCurve,
|
|
41
|
-
SetBasisCurveVisibility,
|
|
42
|
-
)
|
|
43
|
-
from common.session.views.camera import AddCamera, CameraConfig, CameraMode, DistortionModel, GetCamera, GetCameraFrame, GetCameraResponse
|
|
44
|
-
from common.session.views.collision import (
|
|
45
|
-
GetMeshApproximation,
|
|
46
|
-
GetMeshApproximationResponse,
|
|
47
|
-
HasCollision,
|
|
48
|
-
HasCollisionResponse,
|
|
49
|
-
RemoveCollision,
|
|
50
|
-
SetCollision,
|
|
51
|
-
)
|
|
52
|
-
from common.session.views.geometry import AddGeometry, GeometryConfig, GeometryType, GetGeometry, GetGeometryResponse, MeshApproximation
|
|
53
|
-
from common.session.views.ground_plane import AddGroundPlane, GetGroundPlane, GetGroundPlaneResponse, GroundPlaneConfig
|
|
54
|
-
from common.session.views.imu import AddImu, GetImu, GetImuResponse, GetImuSample, ImuConfig
|
|
55
|
-
from common.session.views.joint import AddJoint, GetJoint, GetJointResponse, JointAxis, JointConfig, JointType
|
|
56
|
-
from common.session.views.light import (
|
|
57
|
-
AddLight,
|
|
58
|
-
DisableLight,
|
|
59
|
-
EnableLight,
|
|
60
|
-
GetLight,
|
|
61
|
-
GetLightResponse,
|
|
62
|
-
LightConfig,
|
|
63
|
-
LightType,
|
|
64
|
-
SetLightColor,
|
|
65
|
-
SetLightIntensity,
|
|
66
|
-
)
|
|
67
|
-
from common.session.views.pir_sensor import (
|
|
68
|
-
AddPirSensor,
|
|
69
|
-
GetPirDetectionStatus,
|
|
70
|
-
GetPirSensor,
|
|
71
|
-
GetPirSensorResponse,
|
|
72
|
-
PirSensorConfig,
|
|
73
|
-
SetPirDebugMode,
|
|
74
|
-
SetPirMaterial,
|
|
75
|
-
)
|
|
76
|
-
from common.session.views.radar import (
|
|
77
|
-
AddRadar,
|
|
78
|
-
BufferRadarRead,
|
|
79
|
-
GetBufferedRadarRead,
|
|
80
|
-
GetRadar,
|
|
81
|
-
GetRadarResponse,
|
|
82
|
-
GetRadarScan,
|
|
83
|
-
RadarConfig,
|
|
84
|
-
)
|
|
85
|
-
from common.session.views.rigid_body import (
|
|
86
|
-
AddRigidBody,
|
|
87
|
-
ApplyForce,
|
|
88
|
-
ApplyForceAtPosition,
|
|
89
|
-
ApplyTorque,
|
|
90
|
-
BodyCenterOfMass,
|
|
91
|
-
BodyDistance,
|
|
92
|
-
BodyInertia,
|
|
93
|
-
BodyMass,
|
|
94
|
-
BodyType,
|
|
95
|
-
BodyVelocity,
|
|
96
|
-
BoundingBox,
|
|
97
|
-
DisableGravity,
|
|
98
|
-
DisablePhysics,
|
|
99
|
-
EnableGravity,
|
|
100
|
-
EnablePhysics,
|
|
101
|
-
GetBodyBoundingBox,
|
|
102
|
-
GetBodyCenterOfMass,
|
|
103
|
-
GetBodyInertia,
|
|
104
|
-
GetBodyMass,
|
|
105
|
-
GetBodyVelocity,
|
|
106
|
-
GetDistanceBetweenBodies,
|
|
107
|
-
GetRigidBody,
|
|
108
|
-
GetRigidBodyResponse,
|
|
109
|
-
RigidBodyConfig,
|
|
110
|
-
SetBodyVelocity,
|
|
111
|
-
)
|
|
112
|
-
from common.session.views.viewport import (
|
|
113
|
-
SetActiveViewportCamera,
|
|
114
|
-
SetCameraView,
|
|
115
|
-
)
|
|
116
|
-
from common.session.views.xform import (
|
|
117
|
-
AddXForm,
|
|
118
|
-
GetXForm,
|
|
119
|
-
GetXFormResponse,
|
|
120
|
-
SetXformVisibility,
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
__all__ = [
|
|
124
|
-
# Articulation
|
|
125
|
-
"ArticulationConfig",
|
|
126
|
-
"ArticulationJointConfig",
|
|
127
|
-
"ArticulationJointConfigs",
|
|
128
|
-
"ArticulationJointStates",
|
|
129
|
-
"ArticulationJointTargets",
|
|
130
|
-
"BufferArticulationRead",
|
|
131
|
-
"BufferArticulationWrite",
|
|
132
|
-
"BufferArticulationWriteResponse",
|
|
133
|
-
"BufferedArticulationState",
|
|
134
|
-
"AddArticulation",
|
|
135
|
-
"GetArticulationJointConfigs",
|
|
136
|
-
"GetArticulationJointStates",
|
|
137
|
-
"GetArticulationJointTargets",
|
|
138
|
-
"GetBufferedArticulationRead",
|
|
139
|
-
"GetArticulation",
|
|
140
|
-
"GetArticulationResponse",
|
|
141
|
-
"SetArticulationJointConfigs",
|
|
142
|
-
"SetArticulationJointStates",
|
|
143
|
-
"SetArticulationJointTargets",
|
|
144
|
-
# Camera
|
|
145
|
-
"AddCamera",
|
|
146
|
-
"CameraConfig",
|
|
147
|
-
"CameraMode",
|
|
148
|
-
"DistortionModel",
|
|
149
|
-
"GetCamera",
|
|
150
|
-
"GetCameraFrame",
|
|
151
|
-
"GetCameraResponse",
|
|
152
|
-
# Collision
|
|
153
|
-
"GetMeshApproximation",
|
|
154
|
-
"GetMeshApproximationResponse",
|
|
155
|
-
"HasCollision",
|
|
156
|
-
"HasCollisionResponse",
|
|
157
|
-
"RemoveCollision",
|
|
158
|
-
"SetCollision",
|
|
159
|
-
# Geometry
|
|
160
|
-
"AddGeometry",
|
|
161
|
-
"GeometryConfig",
|
|
162
|
-
"GeometryType",
|
|
163
|
-
"GetGeometry",
|
|
164
|
-
"GetGeometryResponse",
|
|
165
|
-
"MeshApproximation",
|
|
166
|
-
# Ground Plane
|
|
167
|
-
"AddGroundPlane",
|
|
168
|
-
"GetGroundPlane",
|
|
169
|
-
"GetGroundPlaneResponse",
|
|
170
|
-
"GroundPlaneConfig",
|
|
171
|
-
# IMU
|
|
172
|
-
"AddImu",
|
|
173
|
-
"GetImu",
|
|
174
|
-
"GetImuResponse",
|
|
175
|
-
"GetImuSample",
|
|
176
|
-
"ImuConfig",
|
|
177
|
-
# Joint
|
|
178
|
-
"AddJoint",
|
|
179
|
-
"GetJoint",
|
|
180
|
-
"GetJointResponse",
|
|
181
|
-
"JointAxis",
|
|
182
|
-
"JointConfig",
|
|
183
|
-
"JointType",
|
|
184
|
-
# Light
|
|
185
|
-
"AddLight",
|
|
186
|
-
"DisableLight",
|
|
187
|
-
"EnableLight",
|
|
188
|
-
"GetLight",
|
|
189
|
-
"GetLightResponse",
|
|
190
|
-
"LightConfig",
|
|
191
|
-
"LightType",
|
|
192
|
-
"SetLightColor",
|
|
193
|
-
"SetLightIntensity",
|
|
194
|
-
# PIR Sensor
|
|
195
|
-
"AddPirSensor",
|
|
196
|
-
"GetPirDetectionStatus",
|
|
197
|
-
"GetPirSensor",
|
|
198
|
-
"GetPirSensorResponse",
|
|
199
|
-
"PirSensorConfig",
|
|
200
|
-
"PirStatus",
|
|
201
|
-
"SetPirDebugMode",
|
|
202
|
-
"SetPirMaterial",
|
|
203
|
-
# Radar
|
|
204
|
-
"AddRadar",
|
|
205
|
-
"BufferRadarRead",
|
|
206
|
-
"GetBufferedRadarRead",
|
|
207
|
-
"GetRadar",
|
|
208
|
-
"GetRadarResponse",
|
|
209
|
-
"GetRadarScan",
|
|
210
|
-
"RadarConfig",
|
|
211
|
-
# Rigid Body
|
|
212
|
-
"AddRigidBody",
|
|
213
|
-
"ApplyForce",
|
|
214
|
-
"ApplyForceAtPosition",
|
|
215
|
-
"ApplyTorque",
|
|
216
|
-
"BodyCenterOfMass",
|
|
217
|
-
"BodyDistance",
|
|
218
|
-
"BodyInertia",
|
|
219
|
-
"BodyMass",
|
|
220
|
-
"BodyType",
|
|
221
|
-
"BodyVelocity",
|
|
222
|
-
"BoundingBox",
|
|
223
|
-
"DisableGravity",
|
|
224
|
-
"DisablePhysics",
|
|
225
|
-
"EnableGravity",
|
|
226
|
-
"EnablePhysics",
|
|
227
|
-
"GetBodyBoundingBox",
|
|
228
|
-
"GetBodyCenterOfMass",
|
|
229
|
-
"GetBodyInertia",
|
|
230
|
-
"GetBodyMass",
|
|
231
|
-
"GetBodyVelocity",
|
|
232
|
-
"GetDistanceBetweenBodies",
|
|
233
|
-
"GetRigidBody",
|
|
234
|
-
"GetRigidBodyResponse",
|
|
235
|
-
"RigidBodyConfig",
|
|
236
|
-
"SetBodyVelocity",
|
|
237
|
-
# Viewport
|
|
238
|
-
"SetActiveViewportCamera",
|
|
239
|
-
"SetCameraView",
|
|
240
|
-
# XForm
|
|
241
|
-
"AddXForm",
|
|
242
|
-
"GetXForm",
|
|
243
|
-
"GetXFormResponse",
|
|
244
|
-
"SetXformVisibility",
|
|
245
|
-
# Basis Curve
|
|
246
|
-
"AddBasisCurveSemiCircle",
|
|
247
|
-
"GetBasisCurve",
|
|
248
|
-
"GetBasisCurveResponse",
|
|
249
|
-
"GetBasisCurveExtents",
|
|
250
|
-
"GetBasisCurveExtentsResponse",
|
|
251
|
-
"SetBasisCurveVisibility",
|
|
252
|
-
"GetBasisCurvePoints",
|
|
253
|
-
"GetBasisCurvePointsResponse",
|
|
254
|
-
"RemoveBasisCurve",
|
|
255
|
-
# Animation
|
|
256
|
-
"AddAnimationFromWaypoints",
|
|
257
|
-
"AddAnimationFromBasisCurve",
|
|
258
|
-
"UpdateAnimationWaypoints",
|
|
259
|
-
"UpdateAnimationBasisCurve",
|
|
260
|
-
"GetAnimation",
|
|
261
|
-
"GetAnimationResponse",
|
|
262
|
-
"RemoveAnimation",
|
|
263
|
-
]
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
from typing import Literal
|
|
2
|
-
|
|
3
|
-
from pydantic import Field
|
|
4
|
-
|
|
5
|
-
from common.message import Message, Vector3
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class AddAnimationFromWaypoints(Message):
|
|
9
|
-
"""
|
|
10
|
-
Add an animation to the scene using waypoints.
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
|
-
path: str = Field(description="USD path for the animation")
|
|
14
|
-
waypoints: list[Vector3] = Field(description="List of waypoints")
|
|
15
|
-
loop: bool = Field(default=True, description="Whether to loop the animation")
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class AddAnimationFromBasisCurve(Message):
|
|
19
|
-
"""
|
|
20
|
-
Add an animation to the scene using a basis curve.
|
|
21
|
-
"""
|
|
22
|
-
|
|
23
|
-
path: str = Field(description="USD path for the animation")
|
|
24
|
-
basis_curve: str = Field(description="Path to the basis curve to use for the animation")
|
|
25
|
-
samples_per_segment: int = Field(default=10, description="The number of samples per segment to use from the basis curve")
|
|
26
|
-
sort_by: Literal["X", "Y", "Z"] | None = Field(default=None, description="The axis to sort the points by")
|
|
27
|
-
ascending: bool = Field(default=True, description="Whether to sort the points in ascending order")
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class UpdateAnimationWaypoints(Message):
|
|
31
|
-
"""
|
|
32
|
-
Update the animation waypoints.
|
|
33
|
-
"""
|
|
34
|
-
|
|
35
|
-
path: str = Field(description="USD path for the animation")
|
|
36
|
-
waypoints: list[Vector3] = Field(description="List of waypoints")
|
|
37
|
-
loop: bool = Field(default=True, description="Whether to loop the animation")
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
class UpdateAnimationBasisCurve(Message):
|
|
41
|
-
"""
|
|
42
|
-
Update the animation using a basis curve.
|
|
43
|
-
"""
|
|
44
|
-
|
|
45
|
-
path: str = Field(description="USD path for the animation")
|
|
46
|
-
basis_curve: str = Field(description="Path to the basis curve to use for the animation")
|
|
47
|
-
samples_per_segment: int = Field(default=10, description="The number of samples per segment to use from the basis curve")
|
|
48
|
-
sort_by: Literal["X", "Y", "Z"] | None = Field(default=None, description="The axis to sort the points by")
|
|
49
|
-
ascending: bool = Field(default=True, description="Whether to sort the points in ascending order")
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class GetAnimation(Message):
|
|
53
|
-
"""
|
|
54
|
-
Get an existing animation view from a prim.
|
|
55
|
-
"""
|
|
56
|
-
|
|
57
|
-
path: str = Field(description="USD path for the animation")
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
class GetAnimationResponse(Message):
|
|
61
|
-
"""
|
|
62
|
-
Response from getting an animation view.
|
|
63
|
-
"""
|
|
64
|
-
|
|
65
|
-
path: str
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
class RemoveAnimation(Message):
|
|
69
|
-
"""
|
|
70
|
-
Remove an animation from the scene (deletes the prim).
|
|
71
|
-
"""
|
|
72
|
-
|
|
73
|
-
path: str = Field(description="USD path for the animation")
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
from pydantic import Field
|
|
2
|
-
|
|
3
|
-
from common.message import JointState, JointTarget, Message, Pose, Vector3
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class ArticulationJointConfig(Message):
|
|
7
|
-
"""
|
|
8
|
-
Complete configuration for a single joint in an articulation.
|
|
9
|
-
"""
|
|
10
|
-
|
|
11
|
-
path: str = Field(description="Name of the joint/DOF")
|
|
12
|
-
stiffness: float | None = Field(default=None, description="PD controller stiffness (Kp)")
|
|
13
|
-
damping: float | None = Field(default=None, description="PD controller damping (Kd)")
|
|
14
|
-
lower_limit: float | None = Field(default=None, description="Lower joint limit")
|
|
15
|
-
upper_limit: float | None = Field(default=None, description="Upper joint limit")
|
|
16
|
-
armature: float | None = Field(default=None, description="Joint armature")
|
|
17
|
-
friction_coefficient: float | None = Field(default=None, description="Joint friction coefficient")
|
|
18
|
-
max_velocity: float | None = Field(default=None, description="Maximum joint velocity")
|
|
19
|
-
max_effort: float | None = Field(default=None, description="Maximum joint effort")
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class ArticulationConfig(Message):
|
|
23
|
-
"""
|
|
24
|
-
Configuration for applying articulation root to a prim.
|
|
25
|
-
"""
|
|
26
|
-
|
|
27
|
-
solver_position_iterations: int = Field(default=32, description="Number of position iterations for the solver")
|
|
28
|
-
solver_velocity_iterations: int = Field(default=1, description="Number of velocity iterations for the solver")
|
|
29
|
-
sleep_threshold: float = Field(default=0.005, description="Sleep threshold for the articulation")
|
|
30
|
-
stabilization_threshold: float = Field(default=0.001, description="Stabilization threshold for the articulation")
|
|
31
|
-
enable_self_collisions: bool = Field(default=False, description="Whether to enable self-collisions")
|
|
32
|
-
joint_configs: list[ArticulationJointConfig] = Field(default_factory=list, description="Per-joint configurations")
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class GetArticulation(Message):
|
|
36
|
-
"""
|
|
37
|
-
Get an existing articulation view from a prim with ArticulationRootAPI already applied.
|
|
38
|
-
"""
|
|
39
|
-
|
|
40
|
-
path: str | None = Field(default=None, description="USD path of the articulation prim")
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
class GetArticulationResponse(Message):
|
|
44
|
-
"""
|
|
45
|
-
Response from getting an articulation.
|
|
46
|
-
"""
|
|
47
|
-
|
|
48
|
-
path: str
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
class AddArticulation(Message):
|
|
52
|
-
"""
|
|
53
|
-
Add an articulation by applying ArticulationRootAPI to a prim.
|
|
54
|
-
"""
|
|
55
|
-
|
|
56
|
-
path: str = Field(description="USD path of prim to apply articulation to")
|
|
57
|
-
config: ArticulationConfig
|
|
58
|
-
world_pose: Pose | None = Field(default=None, description="World pose (position and orientation)")
|
|
59
|
-
local_pose: Pose | None = Field(default=None, description="Local pose (translation and orientation)")
|
|
60
|
-
scale: Vector3 | None = Field(default=None, description="Scale (x, y, z)")
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
class ArticulationJointStates(Message):
|
|
64
|
-
"""
|
|
65
|
-
Response containing joint states.
|
|
66
|
-
"""
|
|
67
|
-
|
|
68
|
-
joint_states: list[JointState]
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
class ArticulationJointTargets(Message):
|
|
72
|
-
"""
|
|
73
|
-
Response containing joint targets.
|
|
74
|
-
"""
|
|
75
|
-
|
|
76
|
-
joint_targets: list[JointTarget]
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
class GetArticulationJointStates(Message):
|
|
80
|
-
"""
|
|
81
|
-
Get articulation joint states.
|
|
82
|
-
"""
|
|
83
|
-
|
|
84
|
-
path: str
|
|
85
|
-
joint_names: list[str] | None = None
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
class GetArticulationJointTargets(Message):
|
|
89
|
-
"""
|
|
90
|
-
Get articulation control targets.
|
|
91
|
-
"""
|
|
92
|
-
|
|
93
|
-
path: str
|
|
94
|
-
joint_names: list[str] | None = None
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
class SetArticulationJointStates(Message):
|
|
98
|
-
"""
|
|
99
|
-
Set articulation joint states (immediate teleport).
|
|
100
|
-
"""
|
|
101
|
-
|
|
102
|
-
path: str
|
|
103
|
-
joint_names: list[str] | None = None
|
|
104
|
-
joint_states: list[JointState] | None = None
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
class SetArticulationJointTargets(Message):
|
|
108
|
-
"""
|
|
109
|
-
Set articulation control targets using PD controller.
|
|
110
|
-
"""
|
|
111
|
-
|
|
112
|
-
path: str
|
|
113
|
-
joint_names: list[str] | None = None
|
|
114
|
-
joint_targets: list[JointTarget] | None = None
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
class GetArticulationJointConfigs(Message):
|
|
118
|
-
"""
|
|
119
|
-
Get joint configurations for all joints.
|
|
120
|
-
"""
|
|
121
|
-
|
|
122
|
-
path: str
|
|
123
|
-
joint_names: list[str] | None = None
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
class ArticulationJointConfigs(Message):
|
|
127
|
-
"""
|
|
128
|
-
Joint configurations response.
|
|
129
|
-
"""
|
|
130
|
-
|
|
131
|
-
joint_configs: list[ArticulationJointConfig]
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
class SetArticulationJointConfigs(Message):
|
|
135
|
-
"""
|
|
136
|
-
Set joint configurations.
|
|
137
|
-
"""
|
|
138
|
-
|
|
139
|
-
path: str
|
|
140
|
-
joint_configs: list[ArticulationJointConfig]
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
class BufferArticulationRead(Message):
|
|
144
|
-
"""
|
|
145
|
-
Request to buffer current articulation state at simulation time.
|
|
146
|
-
"""
|
|
147
|
-
|
|
148
|
-
path: str
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
class GetBufferedArticulationRead(Message):
|
|
152
|
-
"""
|
|
153
|
-
Request to get buffered articulation state at or before simulation time.
|
|
154
|
-
"""
|
|
155
|
-
|
|
156
|
-
path: str
|
|
157
|
-
read_sim_time: float
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
class BufferedArticulationState(Message):
|
|
161
|
-
"""
|
|
162
|
-
Buffered articulation state with joint names for filtering.
|
|
163
|
-
"""
|
|
164
|
-
|
|
165
|
-
pose: Pose
|
|
166
|
-
joint_states: list[JointState]
|
|
167
|
-
joint_names: list[str]
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
class BufferArticulationWrite(Message):
|
|
171
|
-
"""
|
|
172
|
-
Request to buffer articulation write at target simulation time.
|
|
173
|
-
"""
|
|
174
|
-
|
|
175
|
-
path: str
|
|
176
|
-
write_sim_time: float
|
|
177
|
-
joint_names: list[str] | None = None
|
|
178
|
-
joint_targets: list[JointTarget] | None = None
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
class BufferArticulationWriteResponse(Message):
|
|
182
|
-
"""
|
|
183
|
-
Acknowledgment for buffered articulation write.
|
|
184
|
-
"""
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
from typing import Literal
|
|
2
|
-
|
|
3
|
-
from pydantic import Field
|
|
4
|
-
|
|
5
|
-
from common.message import Message, Vector3
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class AddBasisCurveSemiCircle(Message):
|
|
9
|
-
"""
|
|
10
|
-
Add a basis curve semi-circle to the scene.
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
|
-
path: str = Field(description="USD path for the basis curve")
|
|
14
|
-
center: Vector3 = Field(default_factory=Vector3.zeros, description="Center of the basis curve")
|
|
15
|
-
radius: float = Field(default=1.0, description="Radius of the basis curve")
|
|
16
|
-
min_angle_deg: float = Field(default=0.0, description="Minimum angle of the basis curve in degrees")
|
|
17
|
-
max_angle_deg: float = Field(default=180.0, description="Maximum angle of the basis curve in degrees")
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class AddBasisCurveLine(Message):
|
|
21
|
-
"""
|
|
22
|
-
Add a basis curve line to the scene.
|
|
23
|
-
|
|
24
|
-
Supports two modes:
|
|
25
|
-
- Cartesian: Specify start and end points directly
|
|
26
|
-
- Polar: Specify start point, angle (degrees), and length
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
path: str = Field(description="USD path for the basis curve")
|
|
30
|
-
start: Vector3 = Field(description="Start point of the line")
|
|
31
|
-
end: Vector3 | None = Field(default=None, description="End point of the line (Cartesian mode)")
|
|
32
|
-
angle_deg: float | None = Field(default=None, description="Angle in degrees from +X axis in XY plane (polar mode)")
|
|
33
|
-
length: float | None = Field(default=None, description="Length of the line (polar mode)")
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class GetBasisCurve(Message):
|
|
37
|
-
"""
|
|
38
|
-
Get an existing basis curve view from a prim.
|
|
39
|
-
"""
|
|
40
|
-
|
|
41
|
-
path: str = Field(description="USD path for the basis curve")
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
class GetBasisCurveResponse(Message):
|
|
45
|
-
"""
|
|
46
|
-
Response from getting a basis curve.
|
|
47
|
-
"""
|
|
48
|
-
|
|
49
|
-
path: str
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class GetBasisCurveExtents(Message):
|
|
53
|
-
"""
|
|
54
|
-
Get the extents of a basis curve.
|
|
55
|
-
"""
|
|
56
|
-
|
|
57
|
-
path: str = Field(description="USD path for the basis curve")
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
class GetBasisCurveExtentsResponse(Message):
|
|
61
|
-
"""
|
|
62
|
-
Response from getting the extents of a basis curve.
|
|
63
|
-
"""
|
|
64
|
-
|
|
65
|
-
start: Vector3 = Field(description="Start point of the basis curve")
|
|
66
|
-
end: Vector3 = Field(description="End point of the basis curve")
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
class GetBasisCurvePoints(Message):
|
|
70
|
-
"""
|
|
71
|
-
Get the points of a basis curve.
|
|
72
|
-
"""
|
|
73
|
-
|
|
74
|
-
path: str = Field(description="USD path for the basis curve")
|
|
75
|
-
samples_per_segment: int = Field(default=10, description="The number of samples per segment")
|
|
76
|
-
sort_by: Literal["X", "Y", "Z"] | None = Field(default=None, description="The axis to sort the points by")
|
|
77
|
-
ascending: bool = Field(default=True, description="Whether to sort the points in ascending order")
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
class GetBasisCurvePointsResponse(Message):
|
|
81
|
-
"""
|
|
82
|
-
Response from getting the points of a basis curve.
|
|
83
|
-
"""
|
|
84
|
-
|
|
85
|
-
points: list[Vector3] = Field(description="The points of the basis curve")
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
class SetBasisCurveVisibility(Message):
|
|
89
|
-
"""
|
|
90
|
-
Set the visibility of a basis curve.
|
|
91
|
-
"""
|
|
92
|
-
|
|
93
|
-
path: str = Field(description="USD path for the basis curve")
|
|
94
|
-
visible: bool = Field(description="True to make visible, False to hide")
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
class RemoveBasisCurve(Message):
|
|
98
|
-
"""
|
|
99
|
-
Remove a basis curve from the scene.
|
|
100
|
-
"""
|
|
101
|
-
|
|
102
|
-
path: str = Field(description="USD path for the basis curve")
|