8000 Major update · Zyszu200/spatialmath-python@43dfeb7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 43dfeb7

Browse files
committed
Major update
moved tests to own folders and update __main__ code in each module major polish of twist code and doco, 2d and 3d minor polish of other code and doco lgtm pragmas added
1 parent 45daa55 commit 43dfeb7

33 files changed

+1421
-841
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Spatial Maths for Python
22

3-
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/spatialmath-python.svg)](https://pypi.python.org/pypi/spatialmath-python/)
3+
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/roboticstoolbox-python.svg)
44
[![pypi downloads](https://img.shields.io/pypi/dw/spatialmath-python)
55
![PyPI version](https://badge.fury.io/py/spatialmath-python.svg)](https://badge.fury.io/py/spatialmath-python)
66
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/petercorke/spatialmath-python.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/petercorke/spatialmath-python/context:python)

docs/source/2d_pose_twist.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
se(2) twist
22
^^^^^^^^^^^
33

4-
.. automodule:: spatialmath.Twist2
4+
.. autoclass:: spatialmath.Twist2
55
:members:
66
:undoc-members:
77
:show-inheritance:
88
:inherited-members:
9-
:special-members: __mul__, __truediv__, __add__, __sub__, __eq__, __ne__, __pow__, __init__
10-
:exclude-members: count, copy, index, sort, remove
9+
:special-members: __mul__, __truediv__, __add__, __sub__, __eq__, __ne__, __pow__, __init__
10+
:exclude-members: count, copy, index, sort, remove, arghandler, binop, unop, __add__,

docs/source/3d_pose_twist.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
se(3) twist
22
^^^^^^^^^^^
33

4-
.. automodule:: spatialmath.Twist3
4+
.. autoclass:: spatialmath.Twist3
55
:members:
66
:undoc-members:
77
:show-inheritance:
88
:inherited-members:
9-
:special-members: __mul__, __truediv__, __add__, __sub__, __eq__, __ne__, __pow__, __init__
10-
:exclude-members: count, copy, index, sort, remove
9+
:special-members: __mul__, __truediv__, __add__, __sub__, __eq__, __ne__, __pow__, __init__
10+
:exclude-members: count, copy, index, sort, remove, arghandler, binop, unop, __add__,

docs/source/classes-2d.rst

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,3 @@
1-
2D-space
2-
========
3-
4-
Pose in 2D
5-
----------
6-
7-
SE(2) matrix
8-
^^^^^^^^^^^^
9-
10-
.. autclass:: spatialmath.pose2d.SE2
11-
:members:
12-
:undoc-members:
13-
:show-inheritance:
14-
:inherited-members:
15-
:special-members: __mul__, __truediv__, __add__, __sub__, __eq__, __ne__, __pow__, __init__
16-
:exclude-members: count, copy, index, sort, remove
17-
18-
se(2) twist
19-
^^^^^^^^^^^
20-
21-
.. automodule:: spatialmath.Twist2
22-
:members:
23-
:undoc-members:
24-
:show-inheritance:
25-
:inherited-members:
26-
:special-members: __mul__, __truediv__, __add__, __sub__, __eq__, __ne__, __pow__, __init__
27-
:exclude-members: count, copy, index, sort, remove
28-
29-
Orientation in 2D
30-
-----------------
31-
32-
SO(2) matrix
33-
^^^^^^^^^^^^
34-
35-
.. autclass:: spatialmath.pose2d.SO2
36-
:members:
37-
:undoc-members:
38-
:show-inheritance:
39-
:inherited-members:
40-
:special-members: __mul__, __truediv__, __add__, __sub__, __eq__, __ne__, __pow__, __init__
41-
:exclude-members: count, copy, index, sort, remove
421

432

443

docs/source/classes-3d.rst

Lines changed: 0 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1 @@
1-
3D-space
2-
========
31

4-
Pose in 3D
5-
----------
6-
7-
SE(3) matrix
8-
^^^^^^^^^^^^
9-
10-
.. autoclass:: spatialmath.pose3d.SE3
11-
:members:
12-
:undoc-members:
13-
:show-inheritance:
14-
:inherited-members:
15-
:special-members: __mul__, __truediv__, __add__, __sub__, __eq__, __ne__, __pow__, __init__
16-
:exclude-members: count, copy, index, sort, remove, arghandler, binop, unop
17-
18-
se(3) twist
19-
^^^^^^^^^^^
20-
21-
.. automodule:: spatialmath.Twist3
22-
:members:
23-
:undoc-members:
24-
:show-inheritance:
25-
:inherited-members:
26-
:special-members: __mul__, __truediv__, __add__, __sub__, __eq__, __ne__, __pow__, __init__
27-
:exclude-members: count, copy, index, sort, remove
28-
29-
Orientation in 3D
30-
-----------------
31-
32-
SO(3) matrix
33-
^^^^^^^^^^^^
34-
35-
.. autoclass:: spatialmath.pose3d.SO3
36-
:members:
37-
:undoc-members:
38-
:show-inheritance:
39-
:inherited-members:
40-
:special-members: __mul__, __truediv__, __add__, __sub__, __eq__, __ne__, __pow__, __init__
41-
:exclude-members: count, copy, index, sort, remove
42-
43-
Unit quaternion
44-
^^^^^^^^^^^^^^^
45-
46-
.. autoclass:: spatialmath.quaternion.UnitQuaternion
47-
:members:
48-
:undoc-members:
49-
:show-inheritance:
50-
:inherited-members:
51-
:special-members: __mul__, __truediv__, __add__, __sub__, __eq__, __ne__, __pow__, __init__
52-
:exclude-members: count, copy, index, sort, remove
53-
54-
55-
6D spatial vectors
56-
------------------
57-
58-
.. automodule:: spatialmath.spatialvector
59-
:members:
60-
:undoc-members:
61-
:show-inheritance:
62-
:inherited-members:
63-
:special-members: __mul__, __truediv__, __add__, __sub__, __eq__, __ne__, __pow__, __init__
64-
:exclude-members: count, copy, index, sort, remove
65-
66-
67-
General quaternions
68-
-------------------
69-
70-
.. autoclass:: spatialmath.quaternion.Quaternion
71-
:members:
72-
:undoc-members:
73-
:show-inheritance:
74-
:inherited-members:
75-
:special-members: __mul__, __truediv__, __add__, __sub__, __eq__, __ne__, __pow__, __init__
76-
:exclude-members: count, copy, index, sort, remove
77-
78-
Geometry
79-
--------
80-
81-
.. automodule:: spatialmath.geom3d
82-
:members:
83-
:undoc-members:
84-
:show-inheritance:
85-
:inherited-members:
86-
:special-members: __mul__, __rmul__, __eq__, __ne__, __init__, __or__, __xor__

spatialmath/base/argcheck.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ def isvector(v, dim=None):
397397
return False
398398

399399

400-
def getunit(v, unit):
400+
def getunit(v, unit='rad'):
401401
"""
402402
Convert value according to angular units
403403
@@ -528,4 +528,4 @@ def islistof(value, what, n=None):
528528
if __name__ == '__main__':
529529
import pathlib
530530

531-
exec(open(pathlib.Path(__file__).parent.absolute() / "test_argcheck.py").read()) # pylint: disable=exec-used
531+
exec(open(pathlib.Path(__file__).parent.absolute() / "test" / "test_argcheck.py").read()) # pylint: disable=exec-used

spatialmath/base/quaternions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,4 +814,4 @@ def qprint(q, delim=('<', '>'), fmt='{: .4f}', file=sys.stdout):
814814
if __name__ == '__main__': # pragma: no cover
815815
import pathlib
816816

817-
exec(open(pathlib.Path(__file__).parent.absolute() / "test_quaternions.py").read()) # pylint: disable=exec-used
817+
exec(open(pathlib.Path(__file__).parent.absolute() / "test" / "test_quaternions.py").read()) # pylint: disable=exec-used

0 commit comments

Comments
 (0)
0