bosdyn-mission 4.0.2__py3-none-any.whl → 4.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.
- bosdyn/mission/server_util.py +3 -2
- bosdyn/mission/util.py +26 -2
- {bosdyn_mission-4.0.2.dist-info → bosdyn_mission-4.1.0.dist-info}/METADATA +3 -3
- {bosdyn_mission-4.0.2.dist-info → bosdyn_mission-4.1.0.dist-info}/RECORD +6 -6
- {bosdyn_mission-4.0.2.dist-info → bosdyn_mission-4.1.0.dist-info}/WHEEL +0 -0
- {bosdyn_mission-4.0.2.dist-info → bosdyn_mission-4.1.0.dist-info}/top_level.txt +0 -0
bosdyn/mission/server_util.py
CHANGED
|
@@ -12,8 +12,9 @@ from bosdyn.deprecated import moved_to
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
@deprecated(
|
|
16
|
-
|
|
15
|
+
@deprecated(
|
|
16
|
+
reason='The ResponseContext helper class has moved to a common location. Please use '
|
|
17
|
+
'bosdyn.client.server_util.ResponseContext.', version='2.3.5', action="always")
|
|
17
18
|
class ResponseContext(object):
|
|
18
19
|
|
|
19
20
|
def __init__(self, response, request, rpc_logger=None):
|
bosdyn/mission/util.py
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import copy
|
|
8
8
|
import json
|
|
9
|
+
import logging
|
|
9
10
|
import operator
|
|
10
11
|
import re
|
|
11
12
|
from builtins import str as text
|
|
@@ -17,7 +18,7 @@ import google.protobuf.text_format
|
|
|
17
18
|
from deprecated.sphinx import deprecated
|
|
18
19
|
from google.protobuf import message_factory
|
|
19
20
|
|
|
20
|
-
from bosdyn.api import data_acquisition_pb2, geometry_pb2, gripper_camera_param_pb2
|
|
21
|
+
from bosdyn.api import alerts_pb2, data_acquisition_pb2, geometry_pb2, gripper_camera_param_pb2
|
|
21
22
|
from bosdyn.api.autowalk import walks_pb2
|
|
22
23
|
from bosdyn.api.docking import docking_pb2
|
|
23
24
|
from bosdyn.api.graph_nav import graph_nav_pb2, map_pb2
|
|
@@ -373,12 +374,35 @@ def define_blackboard(dict_values: Dict[str, util_pb2.Value]) -> nodes_pb2.Defin
|
|
|
373
374
|
return node_to_return
|
|
374
375
|
|
|
375
376
|
|
|
376
|
-
def set_blackboard(dict_values: Dict[str, util_pb2.Value]
|
|
377
|
+
def set_blackboard(dict_values: Dict[str, util_pb2.Value],
|
|
378
|
+
subfield_values: Dict[str, util_pb2.Value] = {}) -> nodes_pb2.SetBlackboard:
|
|
377
379
|
"""Returns a SetBlackboard protobuf message for the key-value pairs in `dict_values`.
|
|
378
380
|
"""
|
|
379
381
|
node_to_return = nodes_pb2.SetBlackboard()
|
|
380
382
|
for (key, value) in dict_values.items():
|
|
381
383
|
node_to_return.blackboard_variables.add().CopyFrom(util_pb2.KeyValue(key=key, value=value))
|
|
384
|
+
for (key, value) in subfield_values.items():
|
|
385
|
+
node_to_return.blackboard_variable_subfields.add().CopyFrom(
|
|
386
|
+
util_pb2.KeyValue(key=key, value=value))
|
|
382
387
|
return node_to_return
|
|
383
388
|
|
|
384
389
|
|
|
390
|
+
def severity_to_log_level(text_level):
|
|
391
|
+
"""Converts alert data severity enum to a logger level for printing purposes."""
|
|
392
|
+
match text_level:
|
|
393
|
+
case alerts_pb2.AlertData.SeverityLevel.SEVERITY_LEVEL_INFO:
|
|
394
|
+
return logging.INFO
|
|
395
|
+
case alerts_pb2.AlertData.SeverityLevel.SEVERITY_LEVEL_WARN:
|
|
396
|
+
return logging.WARN
|
|
397
|
+
case alerts_pb2.AlertData.SeverityLevel.SEVERITY_LEVEL_ERROR:
|
|
398
|
+
return logging.ERROR
|
|
399
|
+
case alerts_pb2.AlertData.SeverityLevel.SEVERITY_LEVEL_CRITICAL:
|
|
400
|
+
# A critical mission prompt or text message does not indicate a critical robot failure,
|
|
401
|
+
# and is usually expected depending on how a mission plays out. For this reason, we
|
|
402
|
+
# reduce the servity from CRITICAL to ERROR for logs.
|
|
403
|
+
# See Prompt.severity in nodes.proto for more info.
|
|
404
|
+
return logging.ERROR
|
|
405
|
+
case _:
|
|
406
|
+
return logging.INFO
|
|
407
|
+
|
|
408
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: bosdyn-mission
|
|
3
|
-
Version: 4.0
|
|
3
|
+
Version: 4.1.0
|
|
4
4
|
Summary: Boston Dynamics mission code
|
|
5
5
|
Home-page: https://dev.bostondynamics.com/
|
|
6
6
|
Author: Boston Dynamics
|
|
@@ -15,8 +15,8 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
15
15
|
Classifier: License :: Other/Proprietary License
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
|
-
Requires-Dist: bosdyn-client (==4.0
|
|
19
|
-
Requires-Dist: bosdyn-api (==4.0
|
|
18
|
+
Requires-Dist: bosdyn-client (==4.1.0)
|
|
19
|
+
Requires-Dist: bosdyn-api (==4.1.0)
|
|
20
20
|
|
|
21
21
|
<!--
|
|
22
22
|
Copyright (c) 2023 Boston Dynamics, Inc. All rights reserved.
|
|
@@ -4,9 +4,9 @@ bosdyn/mission/client.py,sha256=_jjFZ1FCDNaKKcJ0pzHZ6suADTKcaaXHqp0GV5691M8,2243
|
|
|
4
4
|
bosdyn/mission/constants.py,sha256=oSsl0XR1-fNzHASGNqs541YEO8qi64eewvbY9ICKaxE,435
|
|
5
5
|
bosdyn/mission/exceptions.py,sha256=UqGT0XK3zA6Bgwo_7KNC44yi_MvW9h3c8_pHKML8ELQ,3941
|
|
6
6
|
bosdyn/mission/remote_client.py,sha256=quGWyqLzpASgrR6MlnEPoRFCmnTMSBZ6tmr-Wyy9YW0,12190
|
|
7
|
-
bosdyn/mission/server_util.py,sha256=
|
|
8
|
-
bosdyn/mission/util.py,sha256=
|
|
9
|
-
bosdyn_mission-4.0.
|
|
10
|
-
bosdyn_mission-4.0.
|
|
11
|
-
bosdyn_mission-4.0.
|
|
12
|
-
bosdyn_mission-4.0.
|
|
7
|
+
bosdyn/mission/server_util.py,sha256=xd9D5VwP6mjbxUcUGCV4gN2AvsmRpL9wyvMpKR6Bmxk,1505
|
|
8
|
+
bosdyn/mission/util.py,sha256=nf7VGuTda_AqyNMBJlz9vH9kgCThi5ys_ikA3hRx3YE,16815
|
|
9
|
+
bosdyn_mission-4.1.0.dist-info/METADATA,sha256=tXGpqCA77S6hbAed64mPU0A6ErS9u_9diV68iy-1UAc,1760
|
|
10
|
+
bosdyn_mission-4.1.0.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
|
|
11
|
+
bosdyn_mission-4.1.0.dist-info/top_level.txt,sha256=an2OWgx1ej2jFjmBjPWNQ68ZglvUfKhmXWW-WhTtDmA,7
|
|
12
|
+
bosdyn_mission-4.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|