bosdyn-mission 4.0.3__py3-none-any.whl → 4.1.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.
@@ -12,8 +12,9 @@ from bosdyn.deprecated import moved_to
12
12
 
13
13
 
14
14
 
15
- @deprecated(reason='The ResponseContext helper class has moved to a common location. Please use '
16
- 'bosdyn.client.server_util.ResponseContext.', version='2.3.5', action="always")
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,43 @@ 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]) -> nodes_pb2.SetBlackboard:
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
+ _SEVERITY_TO_LOG_LEVEL = {
391
+ alerts_pb2.AlertData.SeverityLevel.SEVERITY_LEVEL_INFO:
392
+ logging.INFO,
393
+ alerts_pb2.AlertData.SeverityLevel.SEVERITY_LEVEL_WARN:
394
+ logging.WARN,
395
+ alerts_pb2.AlertData.SeverityLevel.SEVERITY_LEVEL_ERROR:
396
+ logging.ERROR,
397
+ # A critical mission prompt or text message does not indicate a critical robot failure,
398
+ # and is usually expected depending on how a mission plays out. For this reason, we
399
+ # reduce the severity from CRITICAL to ERROR for logs.
400
+ # See Prompt.severity in nodes.proto for more info.
401
+ alerts_pb2.AlertData.SeverityLevel.SEVERITY_LEVEL_CRITICAL:
402
+ logging.ERROR,
403
+ }
404
+
405
+
406
+ def severity_to_log_level(text_level):
407
+ """Converts alert data severity enum to a logger level for printing purposes."""
408
+ return _SEVERITY_TO_LOG_LEVEL.get(text_level, logging.INFO)
409
+
410
+
411
+ # We want to be able to port spotcam-ptz missions to the argos-ptz sensor.
412
+ def append_alternate_sensor_names(sensor_names):
413
+ if "argos-ptz" in sensor_names:
414
+ sensor_names.append("spotcam-ptz")
415
+
416
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bosdyn-mission
3
- Version: 4.0.3
3
+ Version: 4.1.1
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.3)
19
- Requires-Dist: bosdyn-api (==4.0.3)
18
+ Requires-Dist: bosdyn-client (==4.1.1)
19
+ Requires-Dist: bosdyn-api (==4.1.1)
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=_ts77W8yGq9BXhgOWwtMCXaxDjUxoorEPk1-YooEUNA,1508
8
- bosdyn/mission/util.py,sha256=30_LIam0ve6JTXZfXmZyza0Vey1FC3LHln81rUeAm_w,15616
9
- bosdyn_mission-4.0.3.dist-info/METADATA,sha256=8HL2Y5Ks7JdgTn4EN461rYm4oPsDy8kw792Bk1zyUqg,1760
10
- bosdyn_mission-4.0.3.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
11
- bosdyn_mission-4.0.3.dist-info/top_level.txt,sha256=an2OWgx1ej2jFjmBjPWNQ68ZglvUfKhmXWW-WhTtDmA,7
12
- bosdyn_mission-4.0.3.dist-info/RECORD,,
7
+ bosdyn/mission/server_util.py,sha256=xd9D5VwP6mjbxUcUGCV4gN2AvsmRpL9wyvMpKR6Bmxk,1505
8
+ bosdyn/mission/util.py,sha256=JzufUi49GwganMKR5L03X1j-rp3clt1tObhS3nofGNs,16938
9
+ bosdyn_mission-4.1.1.dist-info/METADATA,sha256=xy4YS79GpBMgndsSsw3iiWrWf-0gvCSO5FLcvKsLOz8,1760
10
+ bosdyn_mission-4.1.1.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
11
+ bosdyn_mission-4.1.1.dist-info/top_level.txt,sha256=an2OWgx1ej2jFjmBjPWNQ68ZglvUfKhmXWW-WhTtDmA,7
12
+ bosdyn_mission-4.1.1.dist-info/RECORD,,