bosdyn-orbit 5.0.0__py3-none-any.whl → 5.0.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.
- bosdyn/orbit/client.py +34 -9
- {bosdyn_orbit-5.0.0.dist-info → bosdyn_orbit-5.0.1.1.dist-info}/METADATA +1 -1
- bosdyn_orbit-5.0.1.1.dist-info/RECORD +9 -0
- bosdyn_orbit-5.0.0.dist-info/RECORD +0 -9
- {bosdyn_orbit-5.0.0.dist-info → bosdyn_orbit-5.0.1.1.dist-info}/WHEEL +0 -0
- {bosdyn_orbit-5.0.0.dist-info → bosdyn_orbit-5.0.1.1.dist-info}/top_level.txt +0 -0
bosdyn/orbit/client.py
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
""" The client uses a web API to send HTTPs requests to a number of REStful endpoints using the Requests library.
|
|
8
8
|
"""
|
|
9
|
+
import warnings
|
|
9
10
|
from typing import Dict, Iterable
|
|
10
11
|
|
|
11
12
|
import requests
|
|
@@ -792,26 +793,51 @@ class Client():
|
|
|
792
793
|
"siteDockUuid": site_dock_uuid
|
|
793
794
|
}, **kwargs)
|
|
794
795
|
|
|
795
|
-
def post_dispatch_mission_to_robot(self, robot_nickname: str, driver_id: str,
|
|
796
|
-
|
|
797
|
-
|
|
796
|
+
def post_dispatch_mission_to_robot(self, robot_nickname: str, driver_id: str,
|
|
797
|
+
mission_uuid: str = None, delete_mission: bool = False,
|
|
798
|
+
force_acquire_estop: bool = False,
|
|
799
|
+
skip_initialization: bool = True, walk=None,
|
|
800
|
+
**kwargs) -> requests.Response:
|
|
798
801
|
""" Dispatch the robot to a mission given a mission uuid.
|
|
799
802
|
|
|
800
803
|
Args:
|
|
801
804
|
robot_nickname: the nickname of the robot.
|
|
802
805
|
driver_id: the current driver ID of the mission.
|
|
803
|
-
mission_uuid:
|
|
804
|
-
delete_mission:
|
|
806
|
+
mission_uuid: Deprecated. Use 'walk' instead.
|
|
807
|
+
delete_mission: DEPRECATED and no longer supported. Instead, use a temporary walk file that will not be reused.
|
|
805
808
|
force_acquire_estop: whether to force acquire E-stop from the previous client.
|
|
806
809
|
skip_initialization: whether to skip initialization when starting the return to dock mission.
|
|
810
|
+
walk: the walk to dispatch the robot to. If this is set, mission_uuid should be None.
|
|
807
811
|
kwargs(**): a variable number of keyword arguments for the post request.
|
|
808
812
|
Raises:
|
|
813
|
+
ValueError: if neither or both of mission_uuid and walk are set.
|
|
814
|
+
AssertionError: if delete_mission is set to True.
|
|
809
815
|
RequestExceptions: exceptions thrown by the Requests library.
|
|
810
816
|
UnauthenticatedClientError: indicates that the client is not authenticated properly.
|
|
811
817
|
Returns:
|
|
812
818
|
requests.Response: The response associated with the post request.
|
|
813
819
|
"""
|
|
814
820
|
# Payload required for dispatching a mission
|
|
821
|
+
if (mission_uuid is not None and walk is not None) or (mission_uuid is None and
|
|
822
|
+
walk is None):
|
|
823
|
+
raise ValueError(
|
|
824
|
+
"Exactly one of mission_uuid or walk must be set (not both or neither).")
|
|
825
|
+
|
|
826
|
+
if delete_mission:
|
|
827
|
+
raise AssertionError(
|
|
828
|
+
"'delete_mission' is deprecated and no longer supported. "
|
|
829
|
+
"Instead, pass in a 'walk' object that only temporarily exists and will not be reused."
|
|
830
|
+
)
|
|
831
|
+
|
|
832
|
+
dispatch_target = {}
|
|
833
|
+
if mission_uuid is not None:
|
|
834
|
+
warnings.warn(
|
|
835
|
+
"'mission_uuid' is deprecated and will be removed in a future release. "
|
|
836
|
+
"Please use 'walk' instead.", DeprecationWarning, stacklevel=2)
|
|
837
|
+
dispatch_target["missionId"] = mission_uuid
|
|
838
|
+
if walk is not None:
|
|
839
|
+
dispatch_target["walk"] = walk
|
|
840
|
+
|
|
815
841
|
payload = {
|
|
816
842
|
"agent": {
|
|
817
843
|
"nickname": robot_nickname
|
|
@@ -829,15 +855,14 @@ class Client():
|
|
|
829
855
|
}
|
|
830
856
|
},
|
|
831
857
|
"task": {
|
|
832
|
-
"
|
|
858
|
+
"dispatchTarget": dispatch_target,
|
|
833
859
|
"forceAcquireEstop": force_acquire_estop,
|
|
834
|
-
"deleteMission": delete_mission,
|
|
835
860
|
"requireDocked": False,
|
|
836
861
|
"skipInitialization": skip_initialization
|
|
837
862
|
},
|
|
838
863
|
"eventMetadata": {
|
|
839
|
-
"name": "
|
|
840
|
-
}
|
|
864
|
+
"name": f"Driver Triggered Mission ({driver_id})"
|
|
865
|
+
},
|
|
841
866
|
}
|
|
842
867
|
return self.post_resource(
|
|
843
868
|
f'calendar/mission/dispatch/{robot_nickname}?currentDriverId={driver_id}', json=payload,
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
bosdyn/__init__.py,sha256=CMQioQKK1NlMk3kZuY49b_Aw-JyvDeOtuqOCAul1I0s,330
|
|
2
|
+
bosdyn/orbit/__init__.py,sha256=L_VSEXjtWZNHVHs3Jdr_TF2pJ2ju2yysAi0-YZsbJoU,266
|
|
3
|
+
bosdyn/orbit/client.py,sha256=GQc2J79FTjAZPsHT3yZZOHs3NoEgpw5tOcvNiPJt2fc,50308
|
|
4
|
+
bosdyn/orbit/exceptions.py,sha256=eaeHSlGh27JlZUEjcpLKxR1CNdW6Twp4e685pUgEjyQ,711
|
|
5
|
+
bosdyn/orbit/utils.py,sha256=n6tQFcII6JJ5aQt7lzNvXnLKM_Oc7l7VZT7gZp6CM1k,15178
|
|
6
|
+
bosdyn_orbit-5.0.1.1.dist-info/METADATA,sha256=ODEqgD5w7Py_sW1kXq1SxO-33IkeRW9cSmNZDMh8nvc,1896
|
|
7
|
+
bosdyn_orbit-5.0.1.1.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
|
|
8
|
+
bosdyn_orbit-5.0.1.1.dist-info/top_level.txt,sha256=an2OWgx1ej2jFjmBjPWNQ68ZglvUfKhmXWW-WhTtDmA,7
|
|
9
|
+
bosdyn_orbit-5.0.1.1.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
bosdyn/__init__.py,sha256=CMQioQKK1NlMk3kZuY49b_Aw-JyvDeOtuqOCAul1I0s,330
|
|
2
|
-
bosdyn/orbit/__init__.py,sha256=L_VSEXjtWZNHVHs3Jdr_TF2pJ2ju2yysAi0-YZsbJoU,266
|
|
3
|
-
bosdyn/orbit/client.py,sha256=q-5tN2I79O1p7fJ4ps9AsVJ0yOHGeCrfs4LktyfrIi8,48988
|
|
4
|
-
bosdyn/orbit/exceptions.py,sha256=eaeHSlGh27JlZUEjcpLKxR1CNdW6Twp4e685pUgEjyQ,711
|
|
5
|
-
bosdyn/orbit/utils.py,sha256=n6tQFcII6JJ5aQt7lzNvXnLKM_Oc7l7VZT7gZp6CM1k,15178
|
|
6
|
-
bosdyn_orbit-5.0.0.dist-info/METADATA,sha256=9FncibzU5qz7lJHzN_f-9PQIJV9nLGJz0qpkODdIG6o,1894
|
|
7
|
-
bosdyn_orbit-5.0.0.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
|
|
8
|
-
bosdyn_orbit-5.0.0.dist-info/top_level.txt,sha256=an2OWgx1ej2jFjmBjPWNQ68ZglvUfKhmXWW-WhTtDmA,7
|
|
9
|
-
bosdyn_orbit-5.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|