bosdyn-core 5.0.1.1__py3-none-any.whl → 5.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/bddf/base_data_reader.py +1 -1
- bosdyn/bddf/data_reader.py +2 -4
- bosdyn/bddf/protobuf_reader.py +1 -1
- bosdyn/bddf/stream_data_reader.py +1 -1
- bosdyn/geometry.py +4 -2
- bosdyn/util.py +1 -1
- {bosdyn_core-5.0.1.1.dist-info → bosdyn_core-5.1.0.dist-info}/METADATA +2 -2
- {bosdyn_core-5.0.1.1.dist-info → bosdyn_core-5.1.0.dist-info}/RECORD +10 -10
- {bosdyn_core-5.0.1.1.dist-info → bosdyn_core-5.1.0.dist-info}/WHEEL +0 -0
- {bosdyn_core-5.0.1.1.dist-info → bosdyn_core-5.1.0.dist-info}/top_level.txt +0 -0
bosdyn/bddf/base_data_reader.py
CHANGED
|
@@ -30,7 +30,7 @@ class BaseDataReader: # pylint: disable=too-many-instance-attributes
|
|
|
30
30
|
if not self._file:
|
|
31
31
|
if not self._filename:
|
|
32
32
|
raise ValueError("One of infile or filename must be specified")
|
|
33
|
-
self._file = open(self._filename, 'rb')
|
|
33
|
+
self._file = open(self._filename, 'rb') # pylint: disable=consider-using-with
|
|
34
34
|
self._file_descriptor = None
|
|
35
35
|
self._spec_index = None
|
|
36
36
|
self._index_offset = None
|
bosdyn/bddf/data_reader.py
CHANGED
|
@@ -26,7 +26,7 @@ class DataReader(BaseDataReader): # pylint: disable=too-many-instance-attribute
|
|
|
26
26
|
infile: binary file-like object for reading (e.g., from open(fname, "rb")).
|
|
27
27
|
filename: path of input file, if applicable.
|
|
28
28
|
"""
|
|
29
|
-
super(
|
|
29
|
+
super().__init__(infile, filename)
|
|
30
30
|
self._series_index_to_descriptor = {}
|
|
31
31
|
self._series_index_to_block_index = {} # {series_index -> SeriesBlockIndex}
|
|
32
32
|
self._read_index()
|
|
@@ -90,9 +90,7 @@ class DataReader(BaseDataReader): # pylint: disable=too-many-instance-attribute
|
|
|
90
90
|
if self._index_offset < len(MAGIC):
|
|
91
91
|
raise ParseError('Invalid offset to index: {})'.format(self._index_offset))
|
|
92
92
|
self._file_index = self._read_desc_block_at("file_index", self._index_offset)
|
|
93
|
-
self._spec_index = [
|
|
94
|
-
key: value for key, value in desc.spec.items()
|
|
95
|
-
} for desc in self._file_index.series_identifiers]
|
|
93
|
+
self._spec_index = [dict(desc.spec.items()) for desc in self._file_index.series_identifiers]
|
|
96
94
|
|
|
97
95
|
def _seek_to(self, location):
|
|
98
96
|
if location < len(MAGIC):
|
bosdyn/bddf/protobuf_reader.py
CHANGED
|
@@ -15,7 +15,7 @@ class ProtobufReader(MessageReader):
|
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
def __init__(self, data_reader):
|
|
18
|
-
super(
|
|
18
|
+
super().__init__(data_reader, require_protobuf=True)
|
|
19
19
|
|
|
20
20
|
def get_message(self, series_index, protobuf_type, index_in_series):
|
|
21
21
|
"""Return a deserialized protobuf from bytes stored in the file.
|
|
@@ -21,7 +21,7 @@ class StreamDataReader(BaseDataReader):
|
|
|
21
21
|
outfile: binary file-like object for reading (e.g., from open(fname, "rb")).
|
|
22
22
|
"""
|
|
23
23
|
self._hasher = sha1() # This computes a checksum
|
|
24
|
-
super(
|
|
24
|
+
super().__init__(outfile)
|
|
25
25
|
self._indexer = FileIndexer()
|
|
26
26
|
self._series_index_to_block_index = {} # {series_index -> SeriesBlockIndex}
|
|
27
27
|
|
bosdyn/geometry.py
CHANGED
|
@@ -9,7 +9,7 @@ import math
|
|
|
9
9
|
from bosdyn.api.geometry_pb2 import Quaternion
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class EulerZXY
|
|
12
|
+
class EulerZXY:
|
|
13
13
|
"""Orientation represented by Yaw('Z')-Roll('X')-Pitch('Y') order Euler angles.
|
|
14
14
|
Each angle is expressed in radians."""
|
|
15
15
|
|
|
@@ -19,6 +19,7 @@ class EulerZXY(object):
|
|
|
19
19
|
self.pitch = pitch
|
|
20
20
|
|
|
21
21
|
def to_quaternion(self):
|
|
22
|
+
"""Convert to a Quaternion."""
|
|
22
23
|
cy = math.cos(0.5 * self.yaw)
|
|
23
24
|
cr = math.cos(0.5 * self.roll)
|
|
24
25
|
cp = math.cos(0.5 * self.pitch)
|
|
@@ -49,6 +50,7 @@ def _matrix_from_quaternion(q):
|
|
|
49
50
|
|
|
50
51
|
|
|
51
52
|
def to_euler_zxy(self):
|
|
53
|
+
"""Convert a Quaternion to EulerZXY."""
|
|
52
54
|
if not isinstance(self, Quaternion):
|
|
53
55
|
raise ValueError('Must input object of type Quaternion')
|
|
54
56
|
|
|
@@ -58,7 +60,7 @@ def to_euler_zxy(self):
|
|
|
58
60
|
cos_roll = math.sqrt((m[2][0] * m[2][0]) + (m[2][2] * m[2][2]))
|
|
59
61
|
euler_angle.roll = math.atan2(sin_roll, cos_roll)
|
|
60
62
|
|
|
61
|
-
if
|
|
63
|
+
if cos_roll < 1e-22:
|
|
62
64
|
euler_angle.yaw = math.atan2(m[1][0], m[0][0])
|
|
63
65
|
euler_angle.pitch = 0
|
|
64
66
|
else:
|
bosdyn/util.py
CHANGED
|
@@ -28,7 +28,7 @@ _clock_source_fn: ClockFn = time.time
|
|
|
28
28
|
|
|
29
29
|
def set_clock_source(clock_fn: ClockFn) -> None:
|
|
30
30
|
"""Set the clock source to use the input clock source."""
|
|
31
|
-
global _clock_source_fn
|
|
31
|
+
global _clock_source_fn # pylint: disable=global-statement
|
|
32
32
|
_clock_source_fn = clock_fn
|
|
33
33
|
|
|
34
34
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: bosdyn-core
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.1.0
|
|
4
4
|
Summary: Boston Dynamics API Core code and interfaces
|
|
5
5
|
Home-page: https://dev.bostondynamics.com/
|
|
6
6
|
Author: Boston Dynamics
|
|
@@ -15,7 +15,7 @@ Classifier: License :: Other/Proprietary License
|
|
|
15
15
|
Classifier: Operating System :: OS Independent
|
|
16
16
|
Requires-Python: >=3.7
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
|
-
Requires-Dist: bosdyn-api (==5.
|
|
18
|
+
Requires-Dist: bosdyn-api (==5.1.0)
|
|
19
19
|
Requires-Dist: Deprecated (~=1.2.10)
|
|
20
20
|
|
|
21
21
|
<!--
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
bosdyn/__init__.py,sha256=CMQioQKK1NlMk3kZuY49b_Aw-JyvDeOtuqOCAul1I0s,330
|
|
2
2
|
bosdyn/deprecated.py,sha256=ND0eBVsxvEhosH1IN-IhQu5lCDO4_OXtWVUG53uutGI,1889
|
|
3
|
-
bosdyn/geometry.py,sha256=
|
|
4
|
-
bosdyn/util.py,sha256=
|
|
3
|
+
bosdyn/geometry.py,sha256=kQ4zwKtFmi7S496DPexlzz61n8VoWfTvR132nKiNhpw,2457
|
|
4
|
+
bosdyn/util.py,sha256=RJkKxQa91mx2qevdGEoG0yO_yXnrGSxeyNk-LXwxsm8,13233
|
|
5
5
|
bosdyn/bddf/__init__.py,sha256=m-3eQsJOfmkTN7h5g_hcPZOLcFocLAxbaQVHLM8NTYw,1828
|
|
6
|
-
bosdyn/bddf/base_data_reader.py,sha256=
|
|
6
|
+
bosdyn/bddf/base_data_reader.py,sha256=qHSVelKW3A8yYRaWOGOZt4RyxuqXxdJHhidKkZhnLRc,7704
|
|
7
7
|
bosdyn/bddf/block_writer.py,sha256=OB5Qu6syp6TDD72mFxTBLsuYY7O_KNv53YrdZPS-qJw,3300
|
|
8
8
|
bosdyn/bddf/bosdyn.py,sha256=WZBouAEu9kQ5zXayv9S0wM7NeJMVaNoIQaXlk34LY-4,1439
|
|
9
9
|
bosdyn/bddf/common.py,sha256=sGi96F7e1-JuQo3KG7qTs-Uh3S61QL8jxNFTAYljhPk,2498
|
|
10
|
-
bosdyn/bddf/data_reader.py,sha256=
|
|
10
|
+
bosdyn/bddf/data_reader.py,sha256=Unb3DqYUWhozK6iJwC4ovn3Vxkt2IOpv4KJDYb8UhMc,4634
|
|
11
11
|
bosdyn/bddf/data_writer.py,sha256=c1576ZZ0XsCf0mhnZOuu41jUYSMK2xtDxD_j8rzanss,6464
|
|
12
12
|
bosdyn/bddf/file_indexer.py,sha256=NE-rxVHM_ILz_O48LBfxk24OId1I5HraZK-hW6UK7BM,8435
|
|
13
13
|
bosdyn/bddf/grpc_proto_reader.py,sha256=F7KXOD1IQdCsvaZA3YRiL2_mM7UCH6KRe0fs1xqG1lE,1527
|
|
@@ -18,10 +18,10 @@ bosdyn/bddf/message_reader.py,sha256=RIPlRSdfgqJQ1OVF5Gw6YW155hmXAzGs0x_SX8CJR1o
|
|
|
18
18
|
bosdyn/bddf/pod_series_reader.py,sha256=YHNIlp2StK-PrO9cG6cnsiI5-q1XrVEUMFvIjdcVTvs,3375
|
|
19
19
|
bosdyn/bddf/pod_series_writer.py,sha256=3huIUsFn1Dx09c537JQ5IZkWOVSBEJmynRg7ECPUbyU,4028
|
|
20
20
|
bosdyn/bddf/protobuf_channel_reader.py,sha256=mf1VnVZe28CMoLLWQ0hs8HKGBeaCNYTAaVw3lraCt8Y,2656
|
|
21
|
-
bosdyn/bddf/protobuf_reader.py,sha256=
|
|
21
|
+
bosdyn/bddf/protobuf_reader.py,sha256=L8F72ecc52FoToLS8NKaQSlra5E8U8QFwUHOL-DNybU,1336
|
|
22
22
|
bosdyn/bddf/protobuf_series_writer.py,sha256=TnbBHwG-xxPnOLAbKqsC0ea_ULd-BW-FJylnyTg9J5Q,2361
|
|
23
|
-
bosdyn/bddf/stream_data_reader.py,sha256=
|
|
24
|
-
bosdyn_core-5.
|
|
25
|
-
bosdyn_core-5.
|
|
26
|
-
bosdyn_core-5.
|
|
27
|
-
bosdyn_core-5.
|
|
23
|
+
bosdyn/bddf/stream_data_reader.py,sha256=UYciyszGGyZYdXODDVPz71azmb1JucE_p26MHkHFvHU,4352
|
|
24
|
+
bosdyn_core-5.1.0.dist-info/METADATA,sha256=QzwOZ61ZVgdeqeHDv5IVL2cKVX3CqByShVAVo0mvn8s,1704
|
|
25
|
+
bosdyn_core-5.1.0.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
|
|
26
|
+
bosdyn_core-5.1.0.dist-info/top_level.txt,sha256=an2OWgx1ej2jFjmBjPWNQ68ZglvUfKhmXWW-WhTtDmA,7
|
|
27
|
+
bosdyn_core-5.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|