antioch-py 2.1.0__py3-none-any.whl → 2.2.1__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.

@@ -54,6 +54,9 @@ class BasisCurve(SessionContainer):
54
54
  radius: float = 1.0,
55
55
  min_angle_deg: float = 0.0,
56
56
  max_angle_deg: float = 180.0,
57
+ guide: bool = False,
58
+ color: Vector3 | None = None,
59
+ width: float = 0.005,
57
60
  ) -> "BasisCurve":
58
61
  """
59
62
  Add a semi-circle basis curve to the scene.
@@ -63,12 +66,24 @@ class BasisCurve(SessionContainer):
63
66
  :param radius: Radius of the basis curve.
64
67
  :param min_angle_deg: Minimum angle of the basis curve in degrees.
65
68
  :param max_angle_deg: Maximum angle of the basis curve in degrees.
69
+ :param guide: If True, mark as guide purpose (invisible to cameras). If False, default purpose.
70
+ :param color: Optional RGB color [0-1].
71
+ :param width: Width of the curve.
66
72
  :return: The basis curve instance.
67
73
  """
68
74
 
69
75
  Session.get_current().query_sim_rpc(
70
76
  endpoint="basis_curve/add_semi_circle",
71
- payload={"path": path, "center": center, "radius": radius, "min_angle_deg": min_angle_deg, "max_angle_deg": max_angle_deg},
77
+ payload={
78
+ "path": path,
79
+ "center": center,
80
+ "radius": radius,
81
+ "min_angle_deg": min_angle_deg,
82
+ "max_angle_deg": max_angle_deg,
83
+ "guide": guide,
84
+ "color": color,
85
+ "width": width,
86
+ },
72
87
  )
73
88
  return cls(path)
74
89
 
@@ -80,6 +95,9 @@ class BasisCurve(SessionContainer):
80
95
  end: Vector3 | None = None,
81
96
  angle_deg: float | None = None,
82
97
  length: float | None = None,
98
+ guide: bool = False,
99
+ color: Vector3 | None = None,
100
+ width: float = 0.005,
83
101
  ) -> "BasisCurve":
84
102
  """
85
103
  Add a line basis curve to the scene.
@@ -93,13 +111,25 @@ class BasisCurve(SessionContainer):
93
111
  :param end: End point of the line (Cartesian mode).
94
112
  :param angle_deg: Angle in degrees from +X axis in XY plane (polar mode).
95
113
  :param length: Length of the line (polar mode).
114
+ :param guide: If True, mark as guide purpose (invisible to cameras). If False, default purpose.
115
+ :param color: Optional RGB color [0-1].
116
+ :param width: Width of the curve.
96
117
  :return: The basis curve instance.
97
118
  :raises ValueError: If both modes are specified or neither mode is complete.
98
119
  """
99
120
 
100
121
  Session.get_current().query_sim_rpc(
101
122
  endpoint="basis_curve/add_line",
102
- payload={"path": path, "start": start, "end": end, "angle_deg": angle_deg, "length": length},
123
+ payload={
124
+ "path": path,
125
+ "start": start,
126
+ "end": end,
127
+ "angle_deg": angle_deg,
128
+ "length": length,
129
+ "guide": guide,
130
+ "color": color,
131
+ "width": width,
132
+ },
103
133
  )
104
134
  return cls(path)
105
135
 
antioch/session/scene.py CHANGED
@@ -415,6 +415,15 @@ class Scene(SessionContainer):
415
415
  payload={"root_path": root_path, "target": target},
416
416
  )
417
417
 
418
+ def delete_prim(self, path: str) -> None:
419
+ """
420
+ Delete a prim from the scene.
421
+
422
+ :param path: USD path for the prim to delete.
423
+ """
424
+
425
+ self._session.query_sim_rpc(endpoint="scene/delete_prim", payload={"path": path})
426
+
418
427
  def add_asset(
419
428
  self,
420
429
  path: str,
@@ -1150,6 +1159,9 @@ class Scene(SessionContainer):
1150
1159
  radius: float = 1.0,
1151
1160
  min_angle_deg: float = 0.0,
1152
1161
  max_angle_deg: float = 180.0,
1162
+ guide: bool = False,
1163
+ color: Vector3 | list[float] | tuple[float, float, float] | None = None,
1164
+ width: float = 0.005,
1153
1165
  ) -> BasisCurve:
1154
1166
  """
1155
1167
  Add a basis curve semi-circle to the scene.
@@ -1159,6 +1171,9 @@ class Scene(SessionContainer):
1159
1171
  :param radius: Radius of the basis curve.
1160
1172
  :param min_angle_deg: Minimum angle of the basis curve in degrees.
1161
1173
  :param max_angle_deg: Maximum angle of the basis curve in degrees.
1174
+ :param guide: If True, mark as guide purpose (invisible to cameras). If False, default purpose.
1175
+ :param color: Optional RGB color [0-1].
1176
+ :param width: Width of the curve.
1162
1177
  :return: The basis curve instance.
1163
1178
  """
1164
1179
 
@@ -1168,6 +1183,9 @@ class Scene(SessionContainer):
1168
1183
  radius=radius,
1169
1184
  min_angle_deg=min_angle_deg,
1170
1185
  max_angle_deg=max_angle_deg,
1186
+ guide=guide,
1187
+ color=Vector3.from_any(color) if color is not None else None,
1188
+ width=width,
1171
1189
  )
1172
1190
 
1173
1191
  @overload
@@ -1177,6 +1195,9 @@ class Scene(SessionContainer):
1177
1195
  *,
1178
1196
  start: Vector3 | list[float] | tuple[float, float, float],
1179
1197
  end: Vector3 | list[float] | tuple[float, float, float],
1198
+ guide: bool = False,
1199
+ color: Vector3 | list[float] | tuple[float, float, float] | None = None,
1200
+ width: float = 0.005,
1180
1201
  ) -> BasisCurve: ...
1181
1202
 
1182
1203
  @overload
@@ -1187,6 +1208,9 @@ class Scene(SessionContainer):
1187
1208
  start: Vector3 | list[float] | tuple[float, float, float],
1188
1209
  angle_deg: float,
1189
1210
  length: float,
1211
+ guide: bool = False,
1212
+ color: Vector3 | list[float] | tuple[float, float, float] | None = None,
1213
+ width: float = 0.005,
1190
1214
  ) -> BasisCurve: ...
1191
1215
 
1192
1216
  def add_basis_curve_line(
@@ -1197,6 +1221,9 @@ class Scene(SessionContainer):
1197
1221
  end: Vector3 | list[float] | tuple[float, float, float] | None = None,
1198
1222
  angle_deg: float | None = None,
1199
1223
  length: float | None = None,
1224
+ guide: bool = False,
1225
+ color: Vector3 | list[float] | tuple[float, float, float] | None = None,
1226
+ width: float = 0.005,
1200
1227
  ) -> BasisCurve:
1201
1228
  """
1202
1229
  Add a basis curve line to the scene.
@@ -1226,6 +1253,9 @@ class Scene(SessionContainer):
1226
1253
  :param end: End point of the line (Cartesian mode).
1227
1254
  :param angle_deg: Angle in degrees from +X axis in XY plane (polar mode).
1228
1255
  :param length: Length of the line (polar mode).
1256
+ :param guide: If True, mark as guide purpose (invisible to cameras). If False, default purpose.
1257
+ :param color: Optional RGB color [0-1].
1258
+ :param width: Width of the curve.
1229
1259
  :return: The basis curve instance.
1230
1260
  :raises ValueError: If both modes are specified or neither mode is complete.
1231
1261
  """
@@ -1244,6 +1274,9 @@ class Scene(SessionContainer):
1244
1274
  end=Vector3.from_any(end) if end is not None else None,
1245
1275
  angle_deg=angle_deg,
1246
1276
  length=length,
1277
+ guide=guide,
1278
+ color=Vector3.from_any(color) if color is not None else None,
1279
+ width=width,
1247
1280
  )
1248
1281
 
1249
1282
  def get_basis_curve(self, path: str) -> BasisCurve:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: antioch-py
3
- Version: 2.1.0
3
+ Version: 2.2.1
4
4
  Summary: The Antioch Python SDK
5
5
  Author-email: Antioch Robotics <support@antioch.dev>
6
6
  License-Expression: MIT
@@ -12,13 +12,13 @@ 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=LVUqNZc_PonI8X6tg5rrKSTv3zqdAQERt-QOk-g4MhA,58585
15
+ antioch/session/scene.py,sha256=srg2F8PH4tOx9f2an2Q9TULyDtGPcBpBC3Gm6gMzjo8,60036
16
16
  antioch/session/session.py,sha256=K25RZZ8HYMUpyeDoCzzWh-YLs1DcjBlrzxN2SvbtZ4E,6348
17
17
  antioch/session/task.py,sha256=OBGFAD-oWRjkQUAElO9bXhJ_SI-j7S6TxKpUmCgN1-M,11484
18
18
  antioch/session/objects/__init__.py,sha256=n7EYDfneWwro1OaXphbWGyasZ0tvAAAGe72PcUmTF_Y,1184
19
19
  antioch/session/objects/animation.py,sha256=FIgYsHG9TWcdi5aG3ycGorJv-nJBFkiHArDWXLEx8bY,5427
20
20
  antioch/session/objects/articulation.py,sha256=bSAvi6ZOAGOPTsXEtt8fGAG3VF8UR8TxSL0L1izGtbQ,6644
21
- antioch/session/objects/basis_curve.py,sha256=7LD7B92Ohr2bPm5Lh76NaMbFRiHFcUIxaKjWcMYtykc,4954
21
+ antioch/session/objects/basis_curve.py,sha256=I5x5CklyDeg7m3907Gs9vDa4PP9mjnMPZutjg7Vc8Kg,5918
22
22
  antioch/session/objects/camera.py,sha256=clFfSKKlvMlh8x_OZb7AmHrqmWxO9sI760_LGvIBwBM,2252
23
23
  antioch/session/objects/collision.py,sha256=ZGAINF7p3MbCoTwvx4Pzicc8dIfbJgjBgUn_TC_hrT0,1479
24
24
  antioch/session/objects/geometry.py,sha256=MuC6qnHCVGnxYGovHU8U2G-tRGbINoL273t3yYQAPCE,1954
@@ -31,9 +31,9 @@ antioch/session/objects/radar.py,sha256=BXl8OzngiY_urBRBB7kAlBHvtpR9aosWv7nuYcKS
31
31
  antioch/session/objects/rigid_body.py,sha256=TuJ04vG0eyzg4lFAVp7ZE0YTzOjhlcqLoNaeW2sZM0E,6294
32
32
  antioch/session/objects/xform.py,sha256=VkSDIfFEuutrDVuKO2F5sI4zKsGa0xZzxFeH-tRMjp0,3237
33
33
  common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
- common/constants.py,sha256=xlgBKdPoiDzAnWkeEsnktMJfXjBP5FTJkM3MGClTnuY,1085
34
+ common/constants.py,sha256=0jsX0pWUklL9UNLK4_rzGuo53qFWZX1_PIw9j2aKDnU,1652
35
35
  common/ark/__init__.py,sha256=Lu2lJ5k7-vN6ZGeX2sYhRwzXEyt9kCyXtgsyvdIaCiU,1472
36
- common/ark/ark.py,sha256=rToMvtpu634ylJbEfYlTD13Cb3udF_S4SfI8xQsL1P4,2376
36
+ common/ark/ark.py,sha256=RqD8fmSPK_cjnaUOsscAj9406BsMXVCEynu_RtGa6qk,2444
37
37
  common/ark/hardware.py,sha256=5AH9jkrjIvVK6JBfWM7Okpqm9Iqbs7gtyxktlzBS4oI,2252
38
38
  common/ark/kinematics.py,sha256=BCPQKmQ5vWlZBCie861TIImmR3X5BniiuGRPoIvByDM,748
39
39
  common/ark/module.py,sha256=IwkoirFb4dZkfVpn3tjgChRy5S6hVPbrtR9XgJ5UIBI,1922
@@ -43,7 +43,7 @@ common/ark/sim.py,sha256=SQtZkf97QF91oLWkTUEhq62GYL3yk7-LLDDR-lXVKcA,900
43
43
  common/assets/__init__.py,sha256=We71LsStYI5-hknGd2XHrvHg8G4k1dity887BnI5oPI,102
44
44
  common/core/__init__.py,sha256=L8rvLHQd-mOCfDQ2WN9BZiMqU0skeTTkeQvpJ59ouqI,1110
45
45
  common/core/agent.py,sha256=EBNSTuxCOUM66UV7e1LA1aQLyYgIsRjFZXWqbbp-lR0,8613
46
- common/core/auth.py,sha256=TeJIhYm8buQLAkl3jORuGV03pP1MNOhetHunE9z2nsM,9347
46
+ common/core/auth.py,sha256=ihMnlhyDWJ73VhxqSulLTPxgorDK76WT7Mx97RCAhLY,9244
47
47
  common/core/registry.py,sha256=J2Ihhgr6aTfovm-zSiGEcyHB8iBcpFcZVw6vVYKFjNg,11399
48
48
  common/core/task.py,sha256=eybV7yQ8nPYgQtYuse-QvoMJ87Msh6rAN_LUOTGmN94,629
49
49
  common/message/__init__.py,sha256=JHTTMFuMYUF9jspydMihfz2dK9-Mp37zWOTMZBUwK5g,1802
@@ -78,8 +78,8 @@ common/utils/comms.py,sha256=1lpnb9ra5I3xv-Eo0GFZ7nR4TjKseOeDNf9QMWQZbds,17283
78
78
  common/utils/logger.py,sha256=VcZ4dduWut8xWPs-F5ye8RRrNdBehSSG3r1LAWc-IBY,3389
79
79
  common/utils/time.py,sha256=kGDzObbaqWOep4vT1Y2W-BheunxdjYBI4V3Nfp4Ck3Q,790
80
80
  common/utils/usd.py,sha256=to4VPtnamMDIQK-pwDIVfiuzUnNzEImj5szOar1NHiE,253
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,,
81
+ antioch_py-2.2.1.dist-info/METADATA,sha256=tAfB1wW9PidvVyBtDfXQBpCt3DoP3jboH_QbI9isJeo,3485
82
+ antioch_py-2.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
83
+ antioch_py-2.2.1.dist-info/entry_points.txt,sha256=1bLTH5BXCOsQkS8k6L_wJ6Nj62j4aoU9Ey_PhWzsRRM,59
84
+ antioch_py-2.2.1.dist-info/top_level.txt,sha256=GtzNccsep3YdBt9VXQ7-ZFsFJFffr4hyZvqg0YqRqtw,15
85
+ antioch_py-2.2.1.dist-info/RECORD,,
common/ark/ark.py CHANGED
@@ -65,6 +65,7 @@ class ArkVersionReference(Message):
65
65
  size_bytes: int
66
66
  asset_path: str | None = None
67
67
  asset_size_bytes: int | None = None
68
+ metadata: dict[str, str] = {}
68
69
 
69
70
 
70
71
  class ArkReference(Message):
@@ -88,6 +89,7 @@ class AssetVersionReference(Message):
88
89
  size_bytes: int
89
90
  created_at: str
90
91
  updated_at: str
92
+ metadata: dict[str, str] = {}
91
93
 
92
94
 
93
95
  class AssetReference(Message):
common/constants.py CHANGED
@@ -1,8 +1,22 @@
1
1
  import os
2
2
  from pathlib import Path
3
3
 
4
- ANTIOCH_API_URL = os.environ.get("ANTIOCH_API_URL", "https://staging.api.antioch.com")
5
- ANTIOCH_DIR = os.environ.get("ANTIOCH_DIR", str(Path.home() / ".antioch"))
4
+ ANTIOCH_ENV = os.environ.get("ANTIOCH_ENV", "prod").lower()
5
+ if ANTIOCH_ENV not in ("prod", "staging"):
6
+ raise ValueError(f"Invalid ANTIOCH_ENV: {ANTIOCH_ENV}")
7
+
8
+ if ANTIOCH_ENV == "staging":
9
+ ANTIOCH_API_URL = "https://staging.api.antioch.com"
10
+ AUTH_DOMAIN = "https://staging.auth.antioch.com"
11
+ AUTH_CLIENT_ID = "x0aOquV43Xe76ehqAm6Zir80O0MWpqTV"
12
+ else:
13
+ ANTIOCH_API_URL = "https://api.antioch.com"
14
+ AUTH_DOMAIN = "https://auth.antioch.com"
15
+ AUTH_CLIENT_ID = "8RLoPEgMP3ih10sfJsGPkwbUWGilsoyX"
16
+
17
+ ANTIOCH_API_URL = os.environ.get("ANTIOCH_API_URL", ANTIOCH_API_URL)
18
+ AUTH_DOMAIN = os.environ.get("AUTH_DOMAIN", AUTH_DOMAIN)
19
+ ANTIOCH_DIR = os.environ.get("ANTIOCH_DIR", str(Path.home() / ".antioch" / ANTIOCH_ENV))
6
20
 
7
21
 
8
22
  def get_auth_dir() -> Path:
common/core/auth.py CHANGED
@@ -7,15 +7,13 @@ from pathlib import Path
7
7
  import requests
8
8
  from pydantic import BaseModel
9
9
 
10
- from common.constants import get_auth_dir
10
+ from common.constants import AUTH_CLIENT_ID, AUTH_DOMAIN, get_auth_dir
11
11
 
12
12
  # Authentication routes
13
- AUTH_DOMAIN = os.environ.get("AUTH_DOMAIN", "https://staging.auth.antioch.com")
14
13
  AUTH_TOKEN_URL = f"{AUTH_DOMAIN}/oauth/token"
15
14
  DEVICE_CODE_URL = f"{AUTH_DOMAIN}/oauth/device/code"
16
15
 
17
16
  # Authentication constants
18
- AUTH_CLIENT_ID = "x0aOquV43Xe76ehqAm6Zir80O0MWpqTV"
19
17
  ALGORITHMS = ["RS256"]
20
18
  AUDIENCE = "https://sessions.antioch.com"
21
19
  AUTH_SCOPE = "openid profile email"