bosdyn-client 4.0.3__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/client/channel.py +3 -1
- bosdyn/client/command_line.py +260 -2
- bosdyn/client/common.py +62 -5
- bosdyn/client/data_acquisition.py +0 -3
- bosdyn/client/data_acquisition_helpers.py +0 -3
- bosdyn/client/data_acquisition_plugin_service.py +28 -1
- bosdyn/client/data_acquisition_store.py +112 -7
- bosdyn/client/frame_helpers.py +2 -0
- bosdyn/client/gps/NMEAParser.py +4 -3
- bosdyn/client/gps/aggregator_client.py +0 -1
- bosdyn/client/gps/gps_listener.py +1 -3
- bosdyn/client/graph_nav.py +98 -37
- bosdyn/client/image.py +5 -2
- bosdyn/client/image_service_helpers.py +1 -3
- bosdyn/client/map_processing.py +0 -3
- bosdyn/client/power.py +5 -13
- bosdyn/client/recording.py +4 -4
- bosdyn/client/robot.py +6 -5
- bosdyn/client/robot_command.py +2 -2
- bosdyn/client/sdk.py +3 -0
- bosdyn/client/server_util.py +2 -0
- bosdyn/client/service_customization_helpers.py +5 -3
- bosdyn/client/spot_cam/streamquality.py +0 -1
- bosdyn/client/spot_check.py +0 -155
- bosdyn/client/time_sync.py +38 -0
- bosdyn/client/util.py +3 -6
- bosdyn/client/world_object.py +6 -39
- {bosdyn_client-4.0.3.dist-info → bosdyn_client-4.1.0.dist-info}/METADATA +4 -4
- {bosdyn_client-4.0.3.dist-info → bosdyn_client-4.1.0.dist-info}/RECORD +31 -31
- {bosdyn_client-4.0.3.dist-info → bosdyn_client-4.1.0.dist-info}/WHEEL +0 -0
- {bosdyn_client-4.0.3.dist-info → bosdyn_client-4.1.0.dist-info}/top_level.txt +0 -0
bosdyn/client/robot_command.py
CHANGED
|
@@ -1584,7 +1584,7 @@ class RobotCommandBuilder(object):
|
|
|
1584
1584
|
arm_cartesian_traj = arm_cartesian_command.pose_trajectory_in_task
|
|
1585
1585
|
arm_cartesian_traj.pos_interpolation = trajectory_pb2.POS_INTERP_CUBIC
|
|
1586
1586
|
arm_cartesian_traj.ang_interpolation = trajectory_pb2.ANG_INTERP_CUBIC_EULER
|
|
1587
|
-
for i,
|
|
1587
|
+
for i, point_time in enumerate(times):
|
|
1588
1588
|
# Add a new trajectory point to our trajectory
|
|
1589
1589
|
traj_point = arm_cartesian_traj.points.add()
|
|
1590
1590
|
|
|
@@ -1604,7 +1604,7 @@ class RobotCommandBuilder(object):
|
|
|
1604
1604
|
traj_point.velocity.CopyFrom(se3_velocity)
|
|
1605
1605
|
|
|
1606
1606
|
# Set our time_since_reference for this trajectory point
|
|
1607
|
-
traj_point.time_since_reference.CopyFrom(seconds_to_duration(
|
|
1607
|
+
traj_point.time_since_reference.CopyFrom(seconds_to_duration(point_time))
|
|
1608
1608
|
|
|
1609
1609
|
if ref_time is not None:
|
|
1610
1610
|
# Set a reference time if desired. If not, we'll automatically set the reference time
|
bosdyn/client/sdk.py
CHANGED
|
@@ -202,6 +202,9 @@ class Sdk(object):
|
|
|
202
202
|
self.max_send_message_length = DEFAULT_MAX_MESSAGE_LENGTH
|
|
203
203
|
self.max_receive_message_length = DEFAULT_MAX_MESSAGE_LENGTH
|
|
204
204
|
|
|
205
|
+
# ThreadPoolExecutor instance for asynchronous streaming calls.
|
|
206
|
+
self.executor = None
|
|
207
|
+
|
|
205
208
|
|
|
206
209
|
def create_robot(
|
|
207
210
|
self,
|
bosdyn/client/server_util.py
CHANGED
|
@@ -77,6 +77,8 @@ class ResponseContext(object):
|
|
|
77
77
|
else:
|
|
78
78
|
channel = self.channel_prefix + "/" + self.response.DESCRIPTOR.full_name
|
|
79
79
|
self.rpc_logger.add_protobuf_async(self.response, channel)
|
|
80
|
+
if not self.response.header.HasField("response_timestamp"):
|
|
81
|
+
self.response.header.response_timestamp.CopyFrom(bosdyn.util.now_timestamp())
|
|
80
82
|
|
|
81
83
|
|
|
82
84
|
class GrpcServiceRunner(object):
|
|
@@ -135,7 +135,7 @@ def list_params_to_list(list_param: ListParam, list_spec: ListParam.Spec,
|
|
|
135
135
|
|
|
136
136
|
|
|
137
137
|
def oneof_param_to_dict(oneof_param: OneOfParam, oneof_spec: OneOfParam.Spec,
|
|
138
|
-
validate: bool = True) ->
|
|
138
|
+
validate: bool = True) -> Dict:
|
|
139
139
|
if validate:
|
|
140
140
|
validator = _OneOfParamValidator(oneof_spec)
|
|
141
141
|
validator.validate_spec()
|
|
@@ -183,7 +183,6 @@ class _ParamValidatorInterface(ABC):
|
|
|
183
183
|
Returns:
|
|
184
184
|
None for a valid spec, and raises a CustomParamError with a status besides STATUS_OK for an invalid spec
|
|
185
185
|
"""
|
|
186
|
-
pass
|
|
187
186
|
|
|
188
187
|
@abstractmethod
|
|
189
188
|
def validate_value(self, param_value) -> Optional[CustomParamError]:
|
|
@@ -196,7 +195,6 @@ class _ParamValidatorInterface(ABC):
|
|
|
196
195
|
Returns:
|
|
197
196
|
None for a valid value, and returns a service_customization_pb2.CustomParamError with a status besides STATUS_OK for an invalid value
|
|
198
197
|
"""
|
|
199
|
-
pass
|
|
200
198
|
|
|
201
199
|
|
|
202
200
|
class _DictParamValidator(_ParamValidatorInterface):
|
|
@@ -554,6 +552,8 @@ class _OneOfParamValidator(_ParamValidatorInterface):
|
|
|
554
552
|
return full_error
|
|
555
553
|
|
|
556
554
|
|
|
555
|
+
|
|
556
|
+
|
|
557
557
|
class _CustomParamValidator(_ParamValidatorInterface):
|
|
558
558
|
"""
|
|
559
559
|
ParamValidator class for a service_customization_pb2.CustomParam.Spec
|
|
@@ -766,6 +766,8 @@ def bool_spec_to_default(spec):
|
|
|
766
766
|
return BoolParam(value=spec.default_value.value)
|
|
767
767
|
|
|
768
768
|
|
|
769
|
+
|
|
770
|
+
|
|
769
771
|
def one_of_spec_to_default(spec):
|
|
770
772
|
"""
|
|
771
773
|
Create a default service_customization_pb2.OneOfParam based off of the service_customization_pb2.OneOfParam.Spec argument
|
bosdyn/client/spot_check.py
CHANGED
|
@@ -103,44 +103,6 @@ class CameraCalibrationTimedOutError(Exception):
|
|
|
103
103
|
"""Timed out waiting for SUCCESS response from calibration."""
|
|
104
104
|
|
|
105
105
|
|
|
106
|
-
class GripperCameraCalibrationResponseError(SpotCheckError):
|
|
107
|
-
"""General class of errors for gripper camera calibration routines."""
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
class GripperCameraCalibrationUserCanceledError(GripperCameraCalibrationResponseError):
|
|
111
|
-
"""API client canceled calibration."""
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
class GripperCameraCalibrationPowerError(GripperCameraCalibrationResponseError):
|
|
115
|
-
"""The robot is not powered on."""
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
class GripperCameraCalibrationLeaseError(GripperCameraCalibrationResponseError):
|
|
119
|
-
"""The Lease is invalid."""
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
class GripperCameraCalibrationTargetNotCenteredError(GripperCameraCalibrationResponseError):
|
|
123
|
-
"""Invalid starting configuration of robot."""
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
class GripperCameraCalibrationTargetUpsideDownError(GripperCameraCalibrationResponseError):
|
|
127
|
-
"""The target is incorrectly oriented."""
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
class GripperCameraCalibrationCalibrationError(GripperCameraCalibrationResponseError):
|
|
131
|
-
"""Calibration algorithm failure occurred."""
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
class GripperCameraCalibrationInitializationError(GripperCameraCalibrationResponseError):
|
|
135
|
-
"""Initialization error occurred ."""
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
class GripperCameraCalibrationInternalError(GripperCameraCalibrationResponseError):
|
|
139
|
-
"""Internal error occurred ."""
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
class GripperCameraCalibrationStuckError(GripperCameraCalibrationResponseError):
|
|
143
|
-
"""Timed out waiting for robot to reach goal pose."""
|
|
144
106
|
|
|
145
107
|
|
|
146
108
|
class SpotCheckClient(BaseClient):
|
|
@@ -210,41 +172,6 @@ class SpotCheckClient(BaseClient):
|
|
|
210
172
|
return self.call_async(self._stub.CameraCalibrationFeedback, request, None,
|
|
211
173
|
_calibration_feedback_error_from_response, **kwargs)
|
|
212
174
|
|
|
213
|
-
def gripper_camera_calibration_command(self, request, **kwargs):
|
|
214
|
-
"""Issue a gripper camera calibration command to the robot.
|
|
215
|
-
|
|
216
|
-
Raises:
|
|
217
|
-
Error on header error or lease use result error.
|
|
218
|
-
"""
|
|
219
|
-
return self.call(self._stub.GripperCameraCalibrationCommand, request, None,
|
|
220
|
-
_gripper_calibration_command_error_from_response, **kwargs)
|
|
221
|
-
|
|
222
|
-
def gripper_camera_calibration_command_async(self, request, **kwargs):
|
|
223
|
-
"""Async version of gripper_camera_calibration_command()
|
|
224
|
-
|
|
225
|
-
Raises:
|
|
226
|
-
Error on header error or lease use result error.
|
|
227
|
-
"""
|
|
228
|
-
return self.call_async(self._stub.GripperCameraCalibrationCommand, request, None,
|
|
229
|
-
_gripper_calibration_command_error_from_response, **kwargs)
|
|
230
|
-
|
|
231
|
-
def gripper_camera_calibration_feedback(self, request, **kwargs):
|
|
232
|
-
"""Check the current status of gripper camera calibration.
|
|
233
|
-
|
|
234
|
-
Raises:
|
|
235
|
-
GripperCameraCalibrationResponseError on any feedback error.
|
|
236
|
-
"""
|
|
237
|
-
return self.call(self._stub.GripperCameraCalibrationFeedback, request, None,
|
|
238
|
-
_gripper_calibration_feedback_error_from_response, **kwargs)
|
|
239
|
-
|
|
240
|
-
def gripper_camera_calibration_feedback_async(self, request, **kwargs):
|
|
241
|
-
"""Async version of gripper_camera_calibration_feedback()
|
|
242
|
-
|
|
243
|
-
Raises:
|
|
244
|
-
GripperCameraCalibrationResponseError on any feedback error.
|
|
245
|
-
"""
|
|
246
|
-
return self.call_async(self._stub.GripperCameraCalibrationFeedback, request, None,
|
|
247
|
-
_gripper_calibration_feedback_error_from_response, **kwargs)
|
|
248
175
|
|
|
249
176
|
|
|
250
177
|
def run_spot_check(spot_check_client, lease, timeout_sec=212, update_frequency=0.25, verbose=False):
|
|
@@ -442,85 +369,3 @@ def _cal_status_error_from_response(response):
|
|
|
442
369
|
|
|
443
370
|
|
|
444
371
|
|
|
445
|
-
# Gripper Camera calibration error handlers.
|
|
446
|
-
@handle_common_header_errors
|
|
447
|
-
@handle_lease_use_result_errors
|
|
448
|
-
def _gripper_calibration_command_error_from_response(response):
|
|
449
|
-
return None
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
@handle_common_header_errors
|
|
453
|
-
def _gripper_calibration_feedback_error_from_response(response):
|
|
454
|
-
# Special handling of lease case.
|
|
455
|
-
if response.status == spot_check_pb2.GripperCameraCalibrationFeedbackResponse.STATUS_LEASE_ERROR:
|
|
456
|
-
return LeaseUseError(response, None)
|
|
457
|
-
return _gcal_status_error_from_response(response)
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
_GCAL_STATUS_TO_ERROR = collections.defaultdict(lambda:
|
|
461
|
-
(GripperCameraCalibrationResponseError, None))
|
|
462
|
-
_GCAL_STATUS_TO_ERROR.update({ # noqa
|
|
463
|
-
spot_check_pb2.GripperCameraCalibrationFeedbackResponse.STATUS_SUCCESS: (
|
|
464
|
-
None,
|
|
465
|
-
None,
|
|
466
|
-
),
|
|
467
|
-
spot_check_pb2.GripperCameraCalibrationFeedbackResponse.STATUS_PROCESSING: (
|
|
468
|
-
None,
|
|
469
|
-
None,
|
|
470
|
-
),
|
|
471
|
-
spot_check_pb2.GripperCameraCalibrationFeedbackResponse.STATUS_USER_CANCELED: (
|
|
472
|
-
GripperCameraCalibrationUserCanceledError,
|
|
473
|
-
GripperCameraCalibrationUserCanceledError.__doc__,
|
|
474
|
-
),
|
|
475
|
-
spot_check_pb2.GripperCameraCalibrationFeedbackResponse.STATUS_NEVER_RUN: (
|
|
476
|
-
None,
|
|
477
|
-
None,
|
|
478
|
-
),
|
|
479
|
-
spot_check_pb2.GripperCameraCalibrationFeedbackResponse.STATUS_POWER_ERROR: (
|
|
480
|
-
GripperCameraCalibrationPowerError,
|
|
481
|
-
GripperCameraCalibrationPowerError.__doc__,
|
|
482
|
-
),
|
|
483
|
-
spot_check_pb2.GripperCameraCalibrationFeedbackResponse.STATUS_LEASE_ERROR: (
|
|
484
|
-
GripperCameraCalibrationLeaseError,
|
|
485
|
-
GripperCameraCalibrationLeaseError.__doc__,
|
|
486
|
-
),
|
|
487
|
-
|
|
488
|
-
spot_check_pb2.GripperCameraCalibrationFeedbackResponse.STATUS_TARGET_NOT_CENTERED: (
|
|
489
|
-
GripperCameraCalibrationTargetNotCenteredError,
|
|
490
|
-
GripperCameraCalibrationTargetNotCenteredError.__doc__,
|
|
491
|
-
),
|
|
492
|
-
spot_check_pb2.GripperCameraCalibrationFeedbackResponse.STATUS_TARGET_NOT_IN_VIEW: (
|
|
493
|
-
GripperCameraCalibrationTargetNotCenteredError,
|
|
494
|
-
GripperCameraCalibrationTargetNotCenteredError.__doc__,
|
|
495
|
-
),
|
|
496
|
-
spot_check_pb2.GripperCameraCalibrationFeedbackResponse.STATUS_TARGET_UPSIDE_DOWN: (
|
|
497
|
-
GripperCameraCalibrationTargetUpsideDownError,
|
|
498
|
-
GripperCameraCalibrationTargetUpsideDownError.__doc__,
|
|
499
|
-
),
|
|
500
|
-
spot_check_pb2.GripperCameraCalibrationFeedbackResponse.STATUS_INITIALIZATION_ERROR: (
|
|
501
|
-
GripperCameraCalibrationInitializationError,
|
|
502
|
-
GripperCameraCalibrationInitializationError.__doc__,
|
|
503
|
-
),
|
|
504
|
-
spot_check_pb2.GripperCameraCalibrationFeedbackResponse.STATUS_INTERNAL_ERROR: (
|
|
505
|
-
GripperCameraCalibrationInternalError,
|
|
506
|
-
GripperCameraCalibrationInternalError.__doc__,
|
|
507
|
-
),
|
|
508
|
-
spot_check_pb2.GripperCameraCalibrationFeedbackResponse.STATUS_STUCK: (
|
|
509
|
-
GripperCameraCalibrationStuckError,
|
|
510
|
-
GripperCameraCalibrationStuckError.__doc__,
|
|
511
|
-
),
|
|
512
|
-
})
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
@handle_unset_status_error(
|
|
516
|
-
unset="STATUS_UNKNOWN",
|
|
517
|
-
statustype=spot_check_pb2.GripperCameraCalibrationFeedbackResponse,
|
|
518
|
-
)
|
|
519
|
-
def _gcal_status_error_from_response(response):
|
|
520
|
-
"""Return a custom exception based on response, None if no error."""
|
|
521
|
-
return error_factory(
|
|
522
|
-
response,
|
|
523
|
-
response.status,
|
|
524
|
-
status_to_string=spot_check_pb2.GripperCameraCalibrationFeedbackResponse.Status.Name,
|
|
525
|
-
status_to_error=_GCAL_STATUS_TO_ERROR,
|
|
526
|
-
)
|
bosdyn/client/time_sync.py
CHANGED
|
@@ -18,6 +18,7 @@ from google.protobuf import duration_pb2
|
|
|
18
18
|
|
|
19
19
|
from bosdyn.api import time_sync_pb2, time_sync_service_pb2_grpc
|
|
20
20
|
from bosdyn.api.time_range_pb2 import TimeRange
|
|
21
|
+
from bosdyn.client.robot_command import NoTimeSyncError, _TimeConverter
|
|
21
22
|
from bosdyn.util import (RobotTimeConverter, now_nsec, now_sec, nsec_to_timestamp, parse_timespan,
|
|
22
23
|
set_timestamp_from_nsec, timestamp_to_nsec)
|
|
23
24
|
|
|
@@ -161,6 +162,42 @@ def timespec_to_robot_timespan(timespan_spec, time_sync_endpoint=None):
|
|
|
161
162
|
return robot_time_range_from_datetimes(start_datetime, end_datetime, time_sync_endpoint)
|
|
162
163
|
|
|
163
164
|
|
|
165
|
+
def update_time_filter(client, timestamp, timesync_endpoint):
|
|
166
|
+
"""Set or convert fields of the proto that need timestamps in the robot's clock.
|
|
167
|
+
|
|
168
|
+
Args:
|
|
169
|
+
timestamp (float): Client time, such as from time.time().
|
|
170
|
+
timesync_endpoint (TimeSyncEndpoint): A timesync endpoint associated with the robot object.
|
|
171
|
+
|
|
172
|
+
Raises:
|
|
173
|
+
bosdyn.client.robot_command.NoTimeSyncError: Could not find the timesync endpoint for the robot to convert the time.
|
|
174
|
+
"""
|
|
175
|
+
# Input timestamp is a float. (from time.time())
|
|
176
|
+
if not timesync_endpoint:
|
|
177
|
+
raise NoTimeSyncError("[world object service] No timesync endpoint set for the robot.")
|
|
178
|
+
# Lazy RobotTimeConverter: initialized only if needed to make a conversion.
|
|
179
|
+
converter = _TimeConverter(client, timesync_endpoint)
|
|
180
|
+
return converter.robot_timestamp_from_local_secs(timestamp)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
def update_timestamp_filter(client, timestamp, timesync_endpoint):
|
|
184
|
+
"""Set or convert fields of the proto that need timestamps in the robot's clock.
|
|
185
|
+
|
|
186
|
+
Args:
|
|
187
|
+
timestamp (google.protobuf.Timestamp): Client time.
|
|
188
|
+
timesync_endpoint (TimeSyncEndpoint): A timesync endpoint associated with the robot object.
|
|
189
|
+
|
|
190
|
+
Raises:
|
|
191
|
+
bosdyn.client.robot_command.NoTimeSyncError: Could not find the timesync endpoint for the robot to convert the time.
|
|
192
|
+
"""
|
|
193
|
+
# Input timestamp is a google.protobuf.Timestamp
|
|
194
|
+
if not timesync_endpoint:
|
|
195
|
+
raise NoTimeSyncError("[world object service] No timesync endpoint set for the robot.")
|
|
196
|
+
converter = _TimeConverter(client, timesync_endpoint)
|
|
197
|
+
converter.convert_timestamp_from_local_to_robot(timestamp)
|
|
198
|
+
return timestamp
|
|
199
|
+
|
|
200
|
+
|
|
164
201
|
|
|
165
202
|
|
|
166
203
|
class TimeSyncEndpoint:
|
|
@@ -524,6 +561,7 @@ class TimeSyncThread:
|
|
|
524
561
|
else:
|
|
525
562
|
# When sync has been established, use default wait time.
|
|
526
563
|
self._event.wait(self.time_sync_interval_sec)
|
|
564
|
+
self._event.clear()
|
|
527
565
|
|
|
528
566
|
# Do RPC call to update time-sync information.
|
|
529
567
|
if not self.should_exit:
|
bosdyn/client/util.py
CHANGED
|
@@ -6,15 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
"""Helper functions and classes for creating client applications."""
|
|
8
8
|
|
|
9
|
-
import copy
|
|
10
9
|
import getpass
|
|
11
|
-
import glob
|
|
12
10
|
import logging
|
|
13
11
|
import os
|
|
14
|
-
import pathlib
|
|
15
12
|
import signal
|
|
16
13
|
import sys
|
|
17
|
-
import threading
|
|
18
14
|
import time
|
|
19
15
|
from concurrent import futures
|
|
20
16
|
from secrets import token_urlsafe
|
|
@@ -406,8 +402,9 @@ def safe_pb_enum_to_string(value, pb_enum_obj):
|
|
|
406
402
|
return '<unknown> (value: {})'.format(value)
|
|
407
403
|
|
|
408
404
|
|
|
409
|
-
@deprecated(
|
|
410
|
-
|
|
405
|
+
@deprecated(
|
|
406
|
+
reason='The GrpcServiceRunner class helper has moved to server_util.py. Please use '
|
|
407
|
+
'bosdyn.client.server_util.GrpcServiceRunner.', version='3.0.0', action="always")
|
|
411
408
|
class GrpcServiceRunner(object):
|
|
412
409
|
"""A runner to start a gRPC server on a background thread and allow easy cleanup.
|
|
413
410
|
|
bosdyn/client/world_object.py
CHANGED
|
@@ -11,7 +11,8 @@ from bosdyn.api import world_object_pb2, world_object_service_pb2
|
|
|
11
11
|
from bosdyn.api import world_object_service_pb2_grpc as world_object_service
|
|
12
12
|
from bosdyn.client.common import BaseClient, common_header_errors
|
|
13
13
|
from bosdyn.client.frame_helpers import *
|
|
14
|
-
from bosdyn.client.robot_command import NoTimeSyncError
|
|
14
|
+
from bosdyn.client.robot_command import NoTimeSyncError
|
|
15
|
+
from bosdyn.client.time_sync import update_time_filter, update_timestamp_filter
|
|
15
16
|
from bosdyn.util import now_timestamp
|
|
16
17
|
|
|
17
18
|
|
|
@@ -63,7 +64,7 @@ class WorldObjectClient(BaseClient):
|
|
|
63
64
|
time.
|
|
64
65
|
"""
|
|
65
66
|
if time_start_point is not None:
|
|
66
|
-
time_start_point = self
|
|
67
|
+
time_start_point = update_time_filter(self, time_start_point, self.timesync_endpoint)
|
|
67
68
|
req = world_object_pb2.ListWorldObjectRequest(object_type=object_type,
|
|
68
69
|
timestamp_filter=time_start_point)
|
|
69
70
|
return self.call(self._stub.ListWorldObjects, req,
|
|
@@ -73,7 +74,7 @@ class WorldObjectClient(BaseClient):
|
|
|
73
74
|
def list_world_objects_async(self, object_type=None, time_start_point=None, **kwargs):
|
|
74
75
|
"""Async version of list_world_objects()."""
|
|
75
76
|
if time_start_point is not None:
|
|
76
|
-
time_start_point = self
|
|
77
|
+
time_start_point = update_time_filter(self, time_start_point, self.timesync_endpoint)
|
|
77
78
|
req = world_object_pb2.ListWorldObjectRequest(object_type=object_type,
|
|
78
79
|
timestamp_filter=time_start_point)
|
|
79
80
|
return self.call_async(self._stub.ListWorldObjects, req,
|
|
@@ -100,7 +101,7 @@ class WorldObjectClient(BaseClient):
|
|
|
100
101
|
# Ensure the mutation request's object's time of detection is in robot time.
|
|
101
102
|
client_timestamp = mutation_req.mutation.object.acquisition_time
|
|
102
103
|
mutation_req.mutation.object.acquisition_time.CopyFrom(
|
|
103
|
-
self
|
|
104
|
+
update_timestamp_filter(self, client_timestamp, self.timesync_endpoint))
|
|
104
105
|
return self.call(self._stub.MutateWorldObjects, mutation_req,
|
|
105
106
|
value_from_response=_get_status, error_from_response=common_header_errors,
|
|
106
107
|
**kwargs)
|
|
@@ -111,46 +112,12 @@ class WorldObjectClient(BaseClient):
|
|
|
111
112
|
# Ensure the mutation request's object's time of detection is in robot time.
|
|
112
113
|
client_timestamp = mutation_req.mutation.object.acquisition_time
|
|
113
114
|
mutation_req.mutation.object.acquisition_time.CopyFrom(
|
|
114
|
-
self
|
|
115
|
+
update_timestamp_filter(self, client_timestamp, self.timesync_endpoint))
|
|
115
116
|
return self.call_async(self._stub.MutateWorldObjects, mutation_req,
|
|
116
117
|
value_from_response=_get_status,
|
|
117
118
|
error_from_response=common_header_errors, **kwargs)
|
|
118
119
|
|
|
119
120
|
|
|
120
|
-
def _update_time_filter(self, timestamp, timesync_endpoint):
|
|
121
|
-
"""Set or convert fields of the proto that need timestamps in the robot's clock.
|
|
122
|
-
|
|
123
|
-
Args:
|
|
124
|
-
timestamp (float): Client time, such as from time.time().
|
|
125
|
-
timesync_endpoint (TimeSyncEndpoint): A timesync endpoint associated with the robot object.
|
|
126
|
-
|
|
127
|
-
Raises:
|
|
128
|
-
NoTimeSyncError: Could not find the timesync endpoint for the robot to convert the time.
|
|
129
|
-
"""
|
|
130
|
-
# Input timestamp is a float. (from time.time())
|
|
131
|
-
if not timesync_endpoint:
|
|
132
|
-
raise NoTimeSyncError("[world object service] No timesync endpoint set for the robot.")
|
|
133
|
-
# Lazy RobotTimeConverter: initialized only if needed to make a conversion.
|
|
134
|
-
converter = _TimeConverter(self, timesync_endpoint)
|
|
135
|
-
return converter.robot_timestamp_from_local_secs(timestamp)
|
|
136
|
-
|
|
137
|
-
def _update_timestamp_filter(self, timestamp, timesync_endpoint):
|
|
138
|
-
"""Set or convert fields of the proto that need timestamps in the robot's clock.
|
|
139
|
-
|
|
140
|
-
Args:
|
|
141
|
-
timestamp (google.protobuf.Timestamp): Client time.
|
|
142
|
-
timesync_endpoint (TimeSyncEndpoint): A timesync endpoint associated with the robot object.
|
|
143
|
-
|
|
144
|
-
Raises:
|
|
145
|
-
NoTimeSyncError: Could not find the timesync endpoint for the robot to convert the time.
|
|
146
|
-
"""
|
|
147
|
-
# Input timestamp is a google.protobuf.Timestamp
|
|
148
|
-
if not timesync_endpoint:
|
|
149
|
-
raise NoTimeSyncError("[world object service] No timesync endpoint set for the robot.")
|
|
150
|
-
converter = _TimeConverter(self, timesync_endpoint)
|
|
151
|
-
converter.convert_timestamp_from_local_to_robot(timestamp)
|
|
152
|
-
return timestamp
|
|
153
|
-
|
|
154
121
|
def draw_sphere(self, name, x_rt_frame_name, y_rt_frame_name, z_rt_frame_name, frame_name,
|
|
155
122
|
radius=0.05, rgba=(255, 0, 0, 1), list_objects_now=True):
|
|
156
123
|
"""Create a drawable sphere world object that will be sent to the world object service
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: bosdyn-client
|
|
3
|
-
Version: 4.0
|
|
3
|
+
Version: 4.1.0
|
|
4
4
|
Summary: Boston Dynamics API client code and interfaces
|
|
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-api (==4.0
|
|
19
|
-
Requires-Dist: bosdyn-core (==4.0
|
|
18
|
+
Requires-Dist: bosdyn-api (==4.1.0)
|
|
19
|
+
Requires-Dist: bosdyn-core (==4.1.0)
|
|
20
20
|
Requires-Dist: grpcio
|
|
21
21
|
Requires-Dist: pyjwt
|
|
22
22
|
Requires-Dist: numpy
|
|
@@ -75,7 +75,7 @@ Some of the clients included in this wheel can also be accessed directly from th
|
|
|
75
75
|
python3 -m bosdyn.client hostname -h
|
|
76
76
|
usage: bosdyn.client [-h] [-v] [--username USERNAME] [--password PASSWORD]
|
|
77
77
|
hostname
|
|
78
|
-
{dir,id,state,log,time-sync,lease,become-estop,image,local_grid}
|
|
78
|
+
{dir,payload,fault,id,license,log-status,state,log,data,time-sync,lease,become-estop,estop,image,local_grid,acquire,self-ip,power,keepalive}
|
|
79
79
|
...
|
|
80
80
|
|
|
81
81
|
Command-line interface for interacting with robot services.
|
|
@@ -13,14 +13,14 @@ bosdyn/client/auto_return.py,sha256=kqT1gaaneLYIPFVAFzpvTHRwa8NYYQ2OBf7wViBQudE,
|
|
|
13
13
|
bosdyn/client/autowalk.py,sha256=e57FcAC4fu2BPD57Yy4j1F8DPIPPic0Qt1E0UM-oZWo,5734
|
|
14
14
|
bosdyn/client/bddf.py,sha256=ok_2JcflSCQfcM25lpEgzKnkEJl0FDcJ16Bgo9Rjyzc,1763
|
|
15
15
|
bosdyn/client/bddf_download.py,sha256=oDztm-aS5J_ABLb-cxomNtwNPrdlnFp8hEuOMVxVRH4,7586
|
|
16
|
-
bosdyn/client/channel.py,sha256=
|
|
17
|
-
bosdyn/client/command_line.py,sha256=
|
|
18
|
-
bosdyn/client/common.py,sha256=
|
|
19
|
-
bosdyn/client/data_acquisition.py,sha256=
|
|
20
|
-
bosdyn/client/data_acquisition_helpers.py,sha256=
|
|
16
|
+
bosdyn/client/channel.py,sha256=voNa-3S6LXsTlsXPXPLEoqNxYl2Xx5CNP7w9EELEtdY,8840
|
|
17
|
+
bosdyn/client/command_line.py,sha256=0f5ALKTQB1dR7xegHQk0GLTExwkrFCeiTZJkIpEAetA,98595
|
|
18
|
+
bosdyn/client/common.py,sha256=n4iTcdLCWTS9k0iH8_qrQAOhryqWjSfoEIgiBynjhOY,24997
|
|
19
|
+
bosdyn/client/data_acquisition.py,sha256=jd3XvrktXsGUh3mlL4zMzs6zSvynayVE2_GodnYgFH4,15226
|
|
20
|
+
bosdyn/client/data_acquisition_helpers.py,sha256=4eB0N2IEwhBm3LVp5d_ni2CkpYu3wTtkVS0k7qhYm2M,14805
|
|
21
21
|
bosdyn/client/data_acquisition_plugin.py,sha256=5IG2IYkL5FDPZhPRB8caoBjx34f63Eem5u5oZTHBaxo,6690
|
|
22
|
-
bosdyn/client/data_acquisition_plugin_service.py,sha256=
|
|
23
|
-
bosdyn/client/data_acquisition_store.py,sha256=
|
|
22
|
+
bosdyn/client/data_acquisition_plugin_service.py,sha256=tzUBUg9LVPKvDpgogTqEzkhVdlxvHds2HdxRdNDfIJQ,28217
|
|
23
|
+
bosdyn/client/data_acquisition_store.py,sha256=AeBUbgvybUCT7ROOwhvanN-fTKu6fH3ifvaxIRqOQHk,19647
|
|
24
24
|
bosdyn/client/data_buffer.py,sha256=Ta-7CCoy_-StzXDm8cLIjvOnMDgKEzKFc9mcDmVkubc,26661
|
|
25
25
|
bosdyn/client/data_chunk.py,sha256=6xq9zqLD-JH72ZxzEQEKYqhXvb34TlcZoeqAYaXRxCw,1959
|
|
26
26
|
bosdyn/client/data_service.py,sha256=aKfXJCciJ2M2WZRKfdWiLS2n-UEKWSRkOgcTnArbc5o,5201
|
|
@@ -31,11 +31,11 @@ bosdyn/client/door.py,sha256=dbBuGcuoZL3gRhxTQoQHKDlnzcML8ELBtQxCQqomYpo,3110
|
|
|
31
31
|
bosdyn/client/estop.py,sha256=-dy3SP6lcOryyTB_VXe0C_cFk-qK1TNJdSm9DKSz-MM,32073
|
|
32
32
|
bosdyn/client/exceptions.py,sha256=VQg5cSrzB9_pmFcUCbBaRF2QtBUKfdzpR94N3q2rNx0,5323
|
|
33
33
|
bosdyn/client/fault.py,sha256=ymo4M1Vy-bUasD8uOm1pxE1HnjheCds6qA9hZiJbAzY,6050
|
|
34
|
-
bosdyn/client/frame_helpers.py,sha256=
|
|
35
|
-
bosdyn/client/graph_nav.py,sha256=
|
|
34
|
+
bosdyn/client/frame_helpers.py,sha256=Rrm0Zx10LoaVsJv-FPCX02LVQwNkyKVO28lZz7Bmlvg,12572
|
|
35
|
+
bosdyn/client/graph_nav.py,sha256=cR7iWMGSnF0a-tj7rb5TRG6mioOJI9XETlEc-Cqmkpk,69146
|
|
36
36
|
bosdyn/client/gripper_camera_param.py,sha256=QKkHrA08c-BRhyLHrE4pDdh8AGUytoq6OABZpqsvVB0,2631
|
|
37
|
-
bosdyn/client/image.py,sha256=
|
|
38
|
-
bosdyn/client/image_service_helpers.py,sha256=
|
|
37
|
+
bosdyn/client/image.py,sha256=UepSlmgZhHD-GJeYKclStkExHNZ6_n4gCzqQxB4nJTQ,21355
|
|
38
|
+
bosdyn/client/image_service_helpers.py,sha256=u8sCev4slrz593m02RxPrMV9Kdns06xrspJkTIFHe9E,39374
|
|
39
39
|
bosdyn/client/inverse_kinematics.py,sha256=KBgvGdnt-JZJvDzbdJ72Kqw8RHoOsqKq_p9rQtvwuKo,1708
|
|
40
40
|
bosdyn/client/ir_enable_disable.py,sha256=6c5MAuO1Fj0RlVcjkP1vhs-qTLiOpM3RnD8F7_ik1Gw,2153
|
|
41
41
|
bosdyn/client/keepalive.py,sha256=C-Vf17-sSfAHq4cbuuVIh7JQM7NLzv2pRekjHJywfdU,13214
|
|
@@ -46,36 +46,36 @@ bosdyn/client/license.py,sha256=mJRBtwo3UHUVXqAKq-3eBf35v9U_Za_P9lPRXF9q9Lk,1736
|
|
|
46
46
|
bosdyn/client/local_grid.py,sha256=YszM_pTmeGuGIwExgRwB76PXJciO6rZqfaL2RHLxAf0,3475
|
|
47
47
|
bosdyn/client/log_status.py,sha256=Om5S7RPS5y-lwCfumWPPocygpYmokT5J9A6ri44Q6co,12563
|
|
48
48
|
bosdyn/client/manipulation_api_client.py,sha256=bdTTqZk73m7l9bty9CNC9Bs-hTTRFEA_wDweMb4mLu4,4204
|
|
49
|
-
bosdyn/client/map_processing.py,sha256=
|
|
49
|
+
bosdyn/client/map_processing.py,sha256=xmwTkAfIIvRbaRnOCj-JTkrfS13n4z_DAqg-sc8hL2Y,10239
|
|
50
50
|
bosdyn/client/math_helpers.py,sha256=yWGd4LW32KNXdaZ6TNIEWX-nriV72yBuawu37IjTtC4,47848
|
|
51
51
|
bosdyn/client/metrics_logging.py,sha256=9gjVK5Xu4JpOqMg4_tKMHd-XHOh--xaiU_OP9zcGOMs,6646
|
|
52
52
|
bosdyn/client/network_compute_bridge_client.py,sha256=L7RmgCRKiPBn3SVwIxCqP0hkEkhRhF5k5xz2BpC-Omk,7966
|
|
53
53
|
bosdyn/client/payload.py,sha256=12vZirEI4-gu9KPHsDg6MH0QCmnxbolWR1j81lvgfVw,2271
|
|
54
54
|
bosdyn/client/payload_registration.py,sha256=ilT-2W1iuCZImLeDlPLovPYg5HJCk7nLTHxod0Rn8nY,22316
|
|
55
55
|
bosdyn/client/point_cloud.py,sha256=EZO67eqzTEX31RPHBvWXhu2GSSM82BfNNoWALFv21Xk,8382
|
|
56
|
-
bosdyn/client/power.py,sha256=
|
|
56
|
+
bosdyn/client/power.py,sha256=teVPBPcwsUHvn996upF06Y5MJsfQrE-93ezMXAAYSmA,26955
|
|
57
57
|
bosdyn/client/processors.py,sha256=Z-Djf_I_lhfokB-f_L0PewAY8J95LThdWVju1zJ2BaE,1275
|
|
58
58
|
bosdyn/client/ray_cast.py,sha256=Ca1yJo0aY6OmVAazb19fy44L-9LzcKVxr_fHt_EoQtg,4465
|
|
59
|
-
bosdyn/client/recording.py,sha256=
|
|
60
|
-
bosdyn/client/robot.py,sha256=
|
|
61
|
-
bosdyn/client/robot_command.py,sha256=
|
|
59
|
+
bosdyn/client/recording.py,sha256=sQ34G_ckrE-M42ER2GUbYI7UibvdrjHycaia58IpJ2s,25913
|
|
60
|
+
bosdyn/client/robot.py,sha256=HlwDPETYiQ0GT1ko4jVv-9Atbu7qAhfdgFfAkWXD1Sg,30775
|
|
61
|
+
bosdyn/client/robot_command.py,sha256=LtoVKlJwwhTmADRMvJIWJ4B5rY_MpdhHnL72zKm1ECU,108248
|
|
62
62
|
bosdyn/client/robot_id.py,sha256=0VZHG9hltwTLAm1_Bt26Xq1O6EROswqNwHvjY7kaplk,2482
|
|
63
63
|
bosdyn/client/robot_state.py,sha256=h551ke5eHdAC7NgVuLphY8FZR899Ii8_lYwuoX1w1nk,7073
|
|
64
|
-
bosdyn/client/sdk.py,sha256=
|
|
65
|
-
bosdyn/client/server_util.py,sha256=
|
|
66
|
-
bosdyn/client/service_customization_helpers.py,sha256=
|
|
64
|
+
bosdyn/client/sdk.py,sha256=uyawohyi8-BpLoCJe7cKICIzfEsVD-hN5GtgKFuKRak,12861
|
|
65
|
+
bosdyn/client/server_util.py,sha256=uLT12vs5nAhdJ0ryaKuE82dxXnBOupebyDuzI8tbLRo,10560
|
|
66
|
+
bosdyn/client/service_customization_helpers.py,sha256=7x5of7UioiEN_jYshynFCRw7rjB8JhocCN1gpeyexaY,48335
|
|
67
67
|
bosdyn/client/signals_helpers.py,sha256=Sp91IrMxVU-PeH6TK2njzFCKmFMyshRJqNa4DYRMqDU,3682
|
|
68
|
-
bosdyn/client/spot_check.py,sha256=
|
|
69
|
-
bosdyn/client/time_sync.py,sha256=
|
|
68
|
+
bosdyn/client/spot_check.py,sha256=PKqN3kwL6oISkqwXEm_R4vz0uixIsfowWY9mC0mM8Cc,14619
|
|
69
|
+
bosdyn/client/time_sync.py,sha256=mDkcR5RlAKfAOwEUoBjwxtJFDKuGFGmiDcrOeCO2P_g,23089
|
|
70
70
|
bosdyn/client/token_cache.py,sha256=Vwf9YfsR7pTyu1fLRzXrvDo9hG5GBJcen8Azlo_5_iA,3507
|
|
71
71
|
bosdyn/client/token_manager.py,sha256=FvDFCXKIiGXZNkagKZM41Ut8Q0ChlYHN3O61CzrqMF8,3144
|
|
72
72
|
bosdyn/client/units_helpers.py,sha256=5SAmL8vsnl06oGNjzb57fUkuUbGvtbeNdg4NgW0wYAY,1084
|
|
73
|
-
bosdyn/client/util.py,sha256=
|
|
74
|
-
bosdyn/client/world_object.py,sha256=
|
|
75
|
-
bosdyn/client/gps/NMEAParser.py,sha256=
|
|
73
|
+
bosdyn/client/util.py,sha256=itOXkbGRuwLpMN0nOFCeLo2mHd1rcZofjawPGTcIrw4,19970
|
|
74
|
+
bosdyn/client/world_object.py,sha256=CNfZJxwdTjd-Oh35liNdkZ27sAzdnBVFTkpVIICfRTo,17066
|
|
75
|
+
bosdyn/client/gps/NMEAParser.py,sha256=XD-qCjZwm0IlZz7wb--riI-c_L2N-8rf4ZKrFATyC_g,8392
|
|
76
76
|
bosdyn/client/gps/__init__.py,sha256=1qUAbnMKYlERYZvxtGz4ThjYef7Tx-ZBclLoVE_ecjU,265
|
|
77
|
-
bosdyn/client/gps/aggregator_client.py,sha256=
|
|
78
|
-
bosdyn/client/gps/gps_listener.py,sha256=
|
|
77
|
+
bosdyn/client/gps/aggregator_client.py,sha256=hMlmUcFope-QO51h0OAcDKWd_VUmkTkmeI6kLhj7OrU,2361
|
|
78
|
+
bosdyn/client/gps/gps_listener.py,sha256=YJs_VLjXz7eQqjqqhndJWydRQzMdrTGMr05J5gaFSuw,6524
|
|
79
79
|
bosdyn/client/gps/registration_client.py,sha256=LqDLl_Ezv3HNUr9R1B4n2hcMArmGwLgg1asCkGhe2WA,1901
|
|
80
80
|
bosdyn/client/resources/__init__.py,sha256=1qUAbnMKYlERYZvxtGz4ThjYef7Tx-ZBclLoVE_ecjU,265
|
|
81
81
|
bosdyn/client/resources/robot.pem,sha256=kWAr4xK29RtTVC_EhbwW2_NblIuecYqVudR2YIdTh84,1874
|
|
@@ -89,9 +89,9 @@ bosdyn/client/spot_cam/media_log.py,sha256=CJJepePouHr1QoXuev8oJSMhA-JUYpcm6IBUq
|
|
|
89
89
|
bosdyn/client/spot_cam/network.py,sha256=W7z91ERPzba3BCK23jio8byDjVr6kYnucQ9zKg9BqUA,3023
|
|
90
90
|
bosdyn/client/spot_cam/power.py,sha256=HS3nJF8hXq9m1JziOIwLHGLtlNMyLgewWBgs-mRZmTM,5181
|
|
91
91
|
bosdyn/client/spot_cam/ptz.py,sha256=8e6fA07aGnymSXV2MB_QBx0Pv4PSAMOihxq1jyoinDU,10815
|
|
92
|
-
bosdyn/client/spot_cam/streamquality.py,sha256=
|
|
92
|
+
bosdyn/client/spot_cam/streamquality.py,sha256=e-RjizZPwZSOS4Jlqb5Ds-mC6uKam252dpEHkb58Oc8,6364
|
|
93
93
|
bosdyn/client/spot_cam/version.py,sha256=R82eyCAY9PfZqbN8D6hNzSeZatpgpsFr995dRt1Mbe0,2856
|
|
94
|
-
bosdyn_client-4.0.
|
|
95
|
-
bosdyn_client-4.0.
|
|
96
|
-
bosdyn_client-4.0.
|
|
97
|
-
bosdyn_client-4.0.
|
|
94
|
+
bosdyn_client-4.1.0.dist-info/METADATA,sha256=NoSWkd1tll0TvEfXY0iwBgpaMIVrxdVylGT1EEZwmMU,4014
|
|
95
|
+
bosdyn_client-4.1.0.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
|
|
96
|
+
bosdyn_client-4.1.0.dist-info/top_level.txt,sha256=an2OWgx1ej2jFjmBjPWNQ68ZglvUfKhmXWW-WhTtDmA,7
|
|
97
|
+
bosdyn_client-4.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|