standardbots 2.0.0.dev1772493130__tar.gz → 2.0.0.dev1772570485__tar.gz
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.
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/PKG-INFO +1 -1
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/setup.py +1 -1
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/standardbots/auto_generated/apis.py +45 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/standardbots/auto_generated/models.py +105 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/standardbots.egg-info/PKG-INFO +1 -1
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/README.md +0 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/setup.cfg +0 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/standardbots/__init__.py +0 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/standardbots/auto_generated/__init__.py +0 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/standardbots.egg-info/SOURCES.txt +0 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/standardbots.egg-info/dependency_links.txt +0 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/standardbots.egg-info/requires.txt +0 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/standardbots.egg-info/top_level.txt +0 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/tests/fixtures/__init__.py +0 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/tests/fixtures/client_fixt.py +0 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/tests/fixtures/robot_fixt.py +0 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/tests/fixtures/routines_fixt.py +0 -0
- {standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/tests/test_apis.py +0 -0
|
@@ -1270,6 +1270,51 @@ class Default:
|
|
|
1270
1270
|
if parsed is None and (is_user_error or is_unavailable):
|
|
1271
1271
|
parsed = models.parse_error_response(json.loads(response.data))
|
|
1272
1272
|
|
|
1273
|
+
return Response(
|
|
1274
|
+
parsed,
|
|
1275
|
+
response.status,
|
|
1276
|
+
response
|
|
1277
|
+
)
|
|
1278
|
+
except urllib3.exceptions.MaxRetryError:
|
|
1279
|
+
return Response(
|
|
1280
|
+
models.ErrorResponse(
|
|
1281
|
+
error=models.ErrorEnum.InternalServerError,
|
|
1282
|
+
message="Connection Refused"
|
|
1283
|
+
),
|
|
1284
|
+
503,
|
|
1285
|
+
None
|
|
1286
|
+
)
|
|
1287
|
+
def set_bolt_head_position(
|
|
1288
|
+
self,
|
|
1289
|
+
body: models.SetBoltHeadPositionRequest,
|
|
1290
|
+
) -> Response[
|
|
1291
|
+
Union[
|
|
1292
|
+
models.TeleopState,
|
|
1293
|
+
models.ErrorResponse,
|
|
1294
|
+
None
|
|
1295
|
+
],
|
|
1296
|
+
models.TeleopState
|
|
1297
|
+
]:
|
|
1298
|
+
"""
|
|
1299
|
+
Set static bolt head position
|
|
1300
|
+
"""
|
|
1301
|
+
path = "/api/v1/teleop/set-bolt-head-position"
|
|
1302
|
+
try:
|
|
1303
|
+
response = self._request_manager.request(
|
|
1304
|
+
"POST",
|
|
1305
|
+
path,
|
|
1306
|
+
headers=self._request_manager.json_headers(),
|
|
1307
|
+
body=json.dumps(models.serialize_set_bolt_head_position_request(body)),
|
|
1308
|
+
)
|
|
1309
|
+
parsed = None
|
|
1310
|
+
if response.status == 200:
|
|
1311
|
+
parsed = models.parse_teleop_state(json.loads(response.data))
|
|
1312
|
+
|
|
1313
|
+
is_user_error = response.status >= 400 and response.status <= 500
|
|
1314
|
+
is_unavailable = response.status == 503
|
|
1315
|
+
if parsed is None and (is_user_error or is_unavailable):
|
|
1316
|
+
parsed = models.parse_error_response(json.loads(response.data))
|
|
1317
|
+
|
|
1273
1318
|
return Response(
|
|
1274
1319
|
parsed,
|
|
1275
1320
|
response.status,
|
|
@@ -240,6 +240,66 @@ def parse_arm_position_update_request_response_kind_enum(data: object) -> ArmPos
|
|
|
240
240
|
def serialize_arm_position_update_request_response_kind_enum(data: Union[ArmPositionUpdateRequestResponseKindEnum, str]) -> object:
|
|
241
241
|
return ArmPositionUpdateRequestResponseKindEnum(data).value
|
|
242
242
|
|
|
243
|
+
@dataclass
|
|
244
|
+
class BoltHeadPosition:
|
|
245
|
+
"""Bolt head position in pitch, yaw, roll"""
|
|
246
|
+
pitch: Union[float, None] = None
|
|
247
|
+
yaw: Union[float, None] = None
|
|
248
|
+
roll: Union[float, None] = None
|
|
249
|
+
|
|
250
|
+
def validate_pitch(self, value: float) -> Tuple[bool, str]:
|
|
251
|
+
if value is None:
|
|
252
|
+
return [False, "pitch is required for BoltHeadPosition"]
|
|
253
|
+
|
|
254
|
+
if not isinstance(value, float):
|
|
255
|
+
return [False, "pitch must be of type float for BoltHeadPosition, got " + type(value).__name__]
|
|
256
|
+
|
|
257
|
+
return [True, ""]
|
|
258
|
+
|
|
259
|
+
def validate_yaw(self, value: float) -> Tuple[bool, str]:
|
|
260
|
+
if value is None:
|
|
261
|
+
return [False, "yaw is required for BoltHeadPosition"]
|
|
262
|
+
|
|
263
|
+
if not isinstance(value, float):
|
|
264
|
+
return [False, "yaw must be of type float for BoltHeadPosition, got " + type(value).__name__]
|
|
265
|
+
|
|
266
|
+
return [True, ""]
|
|
267
|
+
|
|
268
|
+
def validate_roll(self, value: float) -> Tuple[bool, str]:
|
|
269
|
+
if value is None:
|
|
270
|
+
return [False, "roll is required for BoltHeadPosition"]
|
|
271
|
+
|
|
272
|
+
if not isinstance(value, float):
|
|
273
|
+
return [False, "roll must be of type float for BoltHeadPosition, got " + type(value).__name__]
|
|
274
|
+
|
|
275
|
+
return [True, ""]
|
|
276
|
+
|
|
277
|
+
def __post_init__(self):
|
|
278
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
279
|
+
is_valid, error_str = self.validate_pitch(self.pitch)
|
|
280
|
+
if not is_valid:
|
|
281
|
+
raise TypeError(error_str)
|
|
282
|
+
is_valid, error_str = self.validate_yaw(self.yaw)
|
|
283
|
+
if not is_valid:
|
|
284
|
+
raise TypeError(error_str)
|
|
285
|
+
is_valid, error_str = self.validate_roll(self.roll)
|
|
286
|
+
if not is_valid:
|
|
287
|
+
raise TypeError(error_str)
|
|
288
|
+
|
|
289
|
+
def parse_bolt_head_position(data: object):
|
|
290
|
+
return BoltHeadPosition(
|
|
291
|
+
pitch=parse_f_64(data["pitch"]) if "pitch" in data and data.get("pitch") is not None else None,
|
|
292
|
+
yaw=parse_f_64(data["yaw"]) if "yaw" in data and data.get("yaw") is not None else None,
|
|
293
|
+
roll=parse_f_64(data["roll"]) if "roll" in data and data.get("roll") is not None else None,
|
|
294
|
+
)
|
|
295
|
+
|
|
296
|
+
def serialize_bolt_head_position(data: BoltHeadPosition) -> object:
|
|
297
|
+
return {
|
|
298
|
+
"pitch": serialize_f_64(data.pitch),
|
|
299
|
+
"yaw": serialize_f_64(data.yaw),
|
|
300
|
+
"roll": serialize_f_64(data.roll),
|
|
301
|
+
}
|
|
302
|
+
|
|
243
303
|
@dataclass
|
|
244
304
|
class BotIdentityData:
|
|
245
305
|
"""Data about the robot's identity"""
|
|
@@ -3859,6 +3919,36 @@ def parse_arm_position_update_request_response_event_stream_subscriptions_list(d
|
|
|
3859
3919
|
def serialize_arm_position_update_request_response_event_stream_subscriptions_list(data: ArmPositionUpdateRequestResponseEventStreamSubscriptionsList) -> List[object]:
|
|
3860
3920
|
return [serialize_arm_position_update_request_response_event_stream_subscription_kind_enum(item) for item in data]
|
|
3861
3921
|
|
|
3922
|
+
@dataclass
|
|
3923
|
+
class SetBoltHeadPositionRequest:
|
|
3924
|
+
"""Request to set static bolt head position"""
|
|
3925
|
+
position: Union[BoltHeadPosition, None] = None
|
|
3926
|
+
|
|
3927
|
+
def validate_position(self, value: BoltHeadPosition) -> Tuple[bool, str]:
|
|
3928
|
+
if value is None:
|
|
3929
|
+
return [False, "position is required for SetBoltHeadPositionRequest"]
|
|
3930
|
+
|
|
3931
|
+
if not isinstance(value, BoltHeadPosition):
|
|
3932
|
+
return [False, "position must be of type BoltHeadPosition for SetBoltHeadPositionRequest, got " + type(value).__name__]
|
|
3933
|
+
|
|
3934
|
+
return [True, ""]
|
|
3935
|
+
|
|
3936
|
+
def __post_init__(self):
|
|
3937
|
+
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
3938
|
+
is_valid, error_str = self.validate_position(self.position)
|
|
3939
|
+
if not is_valid:
|
|
3940
|
+
raise TypeError(error_str)
|
|
3941
|
+
|
|
3942
|
+
def parse_set_bolt_head_position_request(data: object):
|
|
3943
|
+
return SetBoltHeadPositionRequest(
|
|
3944
|
+
position=parse_bolt_head_position(data["position"]) if "position" in data and data.get("position") is not None else None,
|
|
3945
|
+
)
|
|
3946
|
+
|
|
3947
|
+
def serialize_set_bolt_head_position_request(data: SetBoltHeadPositionRequest) -> object:
|
|
3948
|
+
return {
|
|
3949
|
+
"position": serialize_bolt_head_position(data.position),
|
|
3950
|
+
}
|
|
3951
|
+
|
|
3862
3952
|
@dataclass
|
|
3863
3953
|
class BrakesState:
|
|
3864
3954
|
"""State of the robot joint brakes. Each joint contains a brake which can be engaged when the robot is at a standstill to prevent the robot from moving.
|
|
@@ -9031,6 +9121,7 @@ class TeleopConfig:
|
|
|
9031
9121
|
"""Config of the teleop"""
|
|
9032
9122
|
isSecondary: Union[bool, None] = None
|
|
9033
9123
|
bots: Union[BotTeleopDetailsList, None] = None
|
|
9124
|
+
enableBoltHeadTracking: Union[bool, None] = None
|
|
9034
9125
|
|
|
9035
9126
|
def validate_isSecondary(self, value: bool) -> Tuple[bool, str]:
|
|
9036
9127
|
if value is None:
|
|
@@ -9050,6 +9141,15 @@ class TeleopConfig:
|
|
|
9050
9141
|
|
|
9051
9142
|
return [True, ""]
|
|
9052
9143
|
|
|
9144
|
+
def validate_enableBoltHeadTracking(self, value: bool) -> Tuple[bool, str]:
|
|
9145
|
+
if value is None:
|
|
9146
|
+
return [True, ""]
|
|
9147
|
+
|
|
9148
|
+
if not isinstance(value, bool):
|
|
9149
|
+
return [False, "enableBoltHeadTracking must be of type bool for TeleopConfig, got " + type(value).__name__]
|
|
9150
|
+
|
|
9151
|
+
return [True, ""]
|
|
9152
|
+
|
|
9053
9153
|
def __post_init__(self):
|
|
9054
9154
|
# Type check incoming model - raise error if invalid (required or wrong type)
|
|
9055
9155
|
is_valid, error_str = self.validate_isSecondary(self.isSecondary)
|
|
@@ -9058,17 +9158,22 @@ class TeleopConfig:
|
|
|
9058
9158
|
is_valid, error_str = self.validate_bots(self.bots)
|
|
9059
9159
|
if not is_valid:
|
|
9060
9160
|
raise TypeError(error_str)
|
|
9161
|
+
is_valid, error_str = self.validate_enableBoltHeadTracking(self.enableBoltHeadTracking)
|
|
9162
|
+
if not is_valid:
|
|
9163
|
+
raise TypeError(error_str)
|
|
9061
9164
|
|
|
9062
9165
|
def parse_teleop_config(data: object):
|
|
9063
9166
|
return TeleopConfig(
|
|
9064
9167
|
isSecondary=parse_bool(data["isSecondary"]) if "isSecondary" in data and data.get("isSecondary") is not None else None,
|
|
9065
9168
|
bots=parse_bot_teleop_details_list(data["bots"]) if "bots" in data and data.get("bots") is not None else None,
|
|
9169
|
+
enableBoltHeadTracking=parse_bool(data["enableBoltHeadTracking"]) if "enableBoltHeadTracking" in data and data.get("enableBoltHeadTracking") is not None else None,
|
|
9066
9170
|
)
|
|
9067
9171
|
|
|
9068
9172
|
def serialize_teleop_config(data: TeleopConfig) -> object:
|
|
9069
9173
|
return {
|
|
9070
9174
|
"isSecondary": None if data.isSecondary is None else serialize_bool(data.isSecondary),
|
|
9071
9175
|
"bots": None if data.bots is None else serialize_bot_teleop_details_list(data.bots),
|
|
9176
|
+
"enableBoltHeadTracking": None if data.enableBoltHeadTracking is None else serialize_bool(data.enableBoltHeadTracking),
|
|
9072
9177
|
}
|
|
9073
9178
|
|
|
9074
9179
|
@dataclass
|
|
File without changes
|
|
File without changes
|
{standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/standardbots/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/tests/fixtures/__init__.py
RENAMED
|
File without changes
|
{standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/tests/fixtures/client_fixt.py
RENAMED
|
File without changes
|
{standardbots-2.0.0.dev1772493130 → standardbots-2.0.0.dev1772570485}/tests/fixtures/robot_fixt.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|