Skip to content

Commit 826e6aa

Browse files
committed
Try replaceing github/petercorke with github/bdaiinstitute
1 parent c04abc7 commit 826e6aa

File tree

4 files changed

+61
-64
lines changed

4 files changed

+61
-64
lines changed

.github/workflows/sphinx.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
run: |
1818
python -m pip install --upgrade pip
1919
pip install .[dev,docs]
20-
pip install git+https://github.com/petercorke/sphinx-autorun.git
20+
pip install git+https://github.com/bdaiinstitute/sphinx-autorun.git
2121
pip install sympy
2222
sudo apt-get install graphviz
2323
- name: Build docs
@@ -29,7 +29,7 @@ jobs:
2929
cd ../
3030
- name: Commit documentation changes
3131
run: |
32-
git clone https://github.com/petercorke/spatialmath-python.git --branch gh-pages --single-branch gh-pages
32+
git clone https://github.com/bdaiinstitute/spatialmath-python.git --branch gh-pages --single-branch gh-pages
3333
cp -r docs/build/html/* gh-pages/
3434
cd gh-pages
3535
git config --local user.email "[email protected]"

README.md

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

3-
[![A Python Robotics Package](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/py_collection.min.svg)](https://github.com/petercorke/robotics-toolbox-python)
3+
[![A Python Robotics Package](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/py_collection.min.svg)](https://github.com/bdaiinstitute/robotics-toolbox-python)
44
[![QUT Centre for Robotics Open Source](https://github.com/qcr/qcr.github.io/raw/master/misc/badge.svg)](https://qcr.github.io)
55

66
[![PyPI version](https://badge.fury.io/py/spatialmath-python.svg)](https://badge.fury.io/py/spatialmath-python)
@@ -20,7 +20,7 @@
2020
<td style="border:0px">
2121
<img src="https://github.com/bdaiinstitute/spatialmath-python/raw/master/docs/figs/CartesianSnakes_LogoW.png" width="200"></td>
2222
<td style="border:0px">
23-
A Python implementation of the <a href="https://github.com/petercorke/spatial-math">Spatial Math Toolbox for MATLAB<sup>&reg;</sup></a>
23+
A Python implementation of the <a href="https://github.com/bdaiinstitute/spatial-math">Spatial Math Toolbox for MATLAB<sup>&reg;</sup></a>
2424
<ul>
2525
<li><a href="https://github.com/bdaiinstitute/spatialmath-python">GitHub repository </a></li>
2626
<li><a href="https://bdaiinstitute.github.io/spatialmath-python">Documentation</a></li>
@@ -45,8 +45,8 @@ space:
4545
| ------------ | ---------------- | -------- |
4646
| pose | ``SE3`` ``Twist3`` ``UnitDualQuaternion`` | ``SE2`` ``Twist2`` |
4747
| orientation | ``SO3`` ``UnitQuaternion`` | ``SO2`` |
48-
49-
48+
49+
5050
More specifically:
5151

5252
* `SE3` matrices belonging to the group $\mathbf{SE}(3)$ for position and orientation (pose) in 3-dimensions
@@ -80,7 +80,7 @@ The class, method and functions names largely mirror those of the MATLAB toolbox
8080

8181
# Citing
8282

83-
Check out our ICRA 2021 paper on [IEEE Xplore](https://ieeexplore.ieee.org/document/9561366) or get the PDF from [Peter's website](https://bit.ly/icra_rtb). This describes the [Robotics Toolbox for Python](https://github.com/petercorke/robotics-toolbox-python) as well Spatial Maths.
83+
Check out our ICRA 2021 paper on [IEEE Xplore](https://ieeexplore.ieee.org/document/9561366) or get the PDF from [Peter's website](https://bit.ly/icra_rtb). This describes the [Robotics Toolbox for Python](https://github.com/bdaiinstitute/robotics-toolbox-python) as well Spatial Maths.
8484

8585
If the toolbox helped you in your research, please cite
8686

@@ -160,26 +160,26 @@ For example, to create an object representing a rotation of 0.3 radians about th
160160
>>> from spatialmath import SO3, SE3
161161
>>> R1 = SO3.Rx(0.3)
162162
>>> R1
163-
1 0 0
164-
0 0.955336 -0.29552
165-
0 0.29552 0.955336
163+
1 0 0
164+
0 0.955336 -0.29552
165+
0 0.29552 0.955336
166166
```
167167
while a rotation of 30 deg about the z-axis is
168168

169169
```python
170170
>>> R2 = SO3.Rz(30, 'deg')
171171
>>> R2
172-
0.866025 -0.5 0
173-
0.5 0.866025 0
174-
0 0 1
172+
0.866025 -0.5 0
173+
0.5 0.866025 0
174+
0 0 1
175175
```
176-
and the composition of these two rotations is
176+
and the composition of these two rotations is
177177

178178
```python
179179
>>> R = R1 * R2
180-
0.866025 -0.5 0
181-
0.433013 0.75 -0.5
182-
0.25 0.433013 0.866025
180+
0.866025 -0.5 0
181+
0.433013 0.75 -0.5
182+
0.25 0.433013 0.866025
183183
```
184184

185185
We can find the corresponding Euler angles (in radians)
@@ -198,16 +198,16 @@ Frequently in robotics we want a sequence, a trajectory, of rotation matrices or
198198
>>> len(R)
199199
3
200200
>>> R[1]
201-
1 0 0
202-
0 0.955336 -0.29552
203-
0 0.29552 0.955336
201+
1 0 0
202+
0 0.955336 -0.29552
203+
0 0.29552 0.955336
204204
```
205205
and this can be used in `for` loops and list comprehensions.
206206

207207
An alternative way of constructing this would be (`R1`, `R2` defined above)
208208

209209
```python
210-
>>> R = SO3( [ SO3(), R1, R2 ] )
210+
>>> R = SO3( [ SO3(), R1, R2 ] )
211211
>>> len(R)
212212
3
213213
```
@@ -233,7 +233,7 @@ will produce a result where each element is the product of each element of the l
233233
Similarly
234234

235235
```python
236-
>>> A = SO3.Ry(0.5) * R
236+
>>> A = SO3.Ry(0.5) * R
237237
>>> len(R)
238238
32
239239
```
@@ -242,7 +242,7 @@ will produce a result where each element is the product of the left-hand side wi
242242
Finally
243243

244244
```python
245-
>>> A = R * R
245+
>>> A = R * R
246246
>>> len(R)
247247
32
248248
```
@@ -267,10 +267,10 @@ We can print and plot these objects as well
267267
```
268268
>>> T = SE3(1,2,3) * SE3.Rx(30, 'deg')
269269
>>> T.print()
270-
1 0 0 1
271-
0 0.866025 -0.5 2
272-
0 0.5 0.866025 3
273-
0 0 0 1
270+
1 0 0 1
271+
0 0.866025 -0.5 2
272+
0 0.5 0.866025 3
273+
0 0 0 1
274274
275275
>>> T.printline()
276276
t = 1, 2, 3; rpy/zyx = 30, 0, 0 deg
@@ -339,7 +339,7 @@ array([[1., 0., 1.],
339339
[0., 0., 1.]])
340340
341341
transl2( (1,2) )
342-
Out[444]:
342+
Out[444]:
343343
array([[1., 0., 1.],
344344
[0., 1., 2.],
345345
[0., 0., 1.]])
@@ -349,7 +349,7 @@ array([[1., 0., 1.],
349349

350350
```
351351
transl2( np.array([1,2]) )
352-
Out[445]:
352+
Out[445]:
353353
array([[1., 0., 1.],
354354
[0., 1., 2.],
355355
[0., 0., 1.]])
@@ -436,7 +436,7 @@ Out[259]: int
436436
437437
a = T[1,1]
438438
a
439-
Out[256]:
439+
Out[256]:
440440
cos(theta)
441441
type(a)
442442
Out[255]: cos
@@ -447,6 +447,6 @@ Similarly when we assign an element or slice of the symbolic matrix to a numeric
447447

448448
## History & Contributors
449449

450-
This package was originally created by [Peter Corke](https://github.com/petercorke) and [Jesse Haviland](https://github.com/jhavl) and was inspired by the [Spatial Math Toolbox for MATLAB](https://github.com/petercorke/spatialmath-matlab). It supports the textbook [Robotics, Vision & Control in Python 3e](https://github.com/petercorke/RVC3-python).
450+
This package was originally created by [Peter Corke](https://github.com/bdaiinstitute) and [Jesse Haviland](https://github.com/jhavl) and was inspired by the [Spatial Math Toolbox for MATLAB](https://github.com/bdaiinstitute/spatialmath-matlab). It supports the textbook [Robotics, Vision & Control in Python 3e](https://github.com/bdaiinstitute/RVC3-python).
451451

452452
The package is now a collaboration with [Boston Dynamics AI Institute](https://theaiinstitute.com/).

docs/source/intro.rst

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Introduction
44
************
55

66

7-
Spatial maths capability underpins all of robotics and robotic vision.
8-
It provides the means to describe the relative position and orientation of objects in 2D or 3D space.
7+
Spatial maths capability underpins all of robotics and robotic vision.
8+
It provides the means to describe the relative position and orientation of objects in 2D or 3D space.
99
This package provides Python classes and functions to represent, print, plot, manipulate and covert between such representations.
10-
This includes relevant mathematical objects such as rotation matrices :math:`\mat{R} \in \SO{2}, \SO{3}`,
10+
This includes relevant mathematical objects such as rotation matrices :math:`\mat{R} \in \SO{2}, \SO{3}`,
1111
homogeneous transformation matrices :math:`\mat{T} \in \SE{2}, \SE{3}`, unit quaternions :math:`\q \in \mathrm{S}^3`,
1212
and twists :math:`S \in \se{2}, \se{3}`.
1313

@@ -27,7 +27,7 @@ which results in a NumPy :math:`4 \times 4` array that belongs to the group
2727
>>> from spatialmath import *
2828
>>> T = SE3.Rx(30, 'deg')
2929
>>> type(T)
30-
>>> print(T)
30+
>>> print(T)
3131

3232
which is *internally* represented as a :math:`4 \times 4` NumPy array.
3333

@@ -81,7 +81,7 @@ Group Name Class
8181
================================ ============================== ======================
8282

8383

84-
In addition to the merits of classes outlined above, classes ensure that the numerical value is always valid because the
84+
In addition to the merits of classes outlined above, classes ensure that the numerical value is always valid because the
8585
constraints (eg. orthogonality, unit norm) are enforced when the object is constructed. For example::
8686

8787
>>> SE3(np.zeros((4,4)))
@@ -90,7 +90,7 @@ constraints (eg. orthogonality, unit norm) are enforced when the object is const
9090
.
9191
AssertionError: array must have valid value for the class
9292

93-
Type safety and type validity are particularly important when we deal with a sequence of values.
93+
Type safety and type validity are particularly important when we deal with a sequence of values.
9494
In robotics we frequently deal with a multiplicity of objects (poses, cameras), or a trajectory of
9595
objects moving over time.
9696
However a list of these items, for example::
@@ -114,7 +114,7 @@ The Spatial Math package give these classes list *super powers* so that, for exa
114114
>>> from spatialmath import *
115115
>>> X = SE3.Rx([0, 0.2, 0.4, 0.6])
116116
>>> len(X)
117-
>>> print(X[1])
117+
>>> print(X[1])
118118

119119

120120
The classes form a rich hierarchy
@@ -127,7 +127,7 @@ The classes form a rich hierarchy
127127
Ultimately they all inherit from ``collections.UserList`` and have all the functionality of Python lists, and this is discussed further in
128128
section :ref:`list-powers`
129129
The pose objects are a list subclass so we can index it or slice it as we
130-
would a list, but the result always belongs to the class it was sliced from.
130+
would a list, but the result always belongs to the class it was sliced from.
131131

132132

133133
Operators for pose objects
@@ -176,9 +176,9 @@ Vector transformation
176176
^^^^^^^^^^^^^^^^^^^^^
177177

178178

179-
The classes ``SE3``, ``SO3``, ``SE2``, ``SO2`` and ``UnitQuaternion`` support vector transformation when
179+
The classes ``SE3``, ``SO3``, ``SE2``, ``SO2`` and ``UnitQuaternion`` support vector transformation when
180180
premultiplying a vector (or a set of vectors columnwise in a NumPy array) using the ``*`` operator.
181-
This is either rotation about the origin (for ``SO3``, ``SO2`` and ``UnitQuaternion``) or rotation and translation (``SE3``, ``SE2``).
181+
This is either rotation about the origin (for ``SO3``, ``SO2`` and ``UnitQuaternion``) or rotation and translation (``SE3``, ``SE2``).
182182
The implementation depends on the class of the object involved:
183183

184184
- for ``UnitQuaternion`` this is performed directly using Hamilton products
@@ -238,7 +238,7 @@ Compare this to the unit quaternion case:
238238
>>> 2 * q
239239

240240
Noting that unit quaternions are denoted by double angle bracket delimiters of their vector part,
241-
whereas a general quaternion uses single angle brackets. The product of a general quaternion and a
241+
whereas a general quaternion uses single angle brackets. The product of a general quaternion and a
242242
unit quaternion is always a general quaternion.
243243

244244

@@ -386,7 +386,7 @@ a Python list
386386
>>> len(R)
387387
>>> R = SO3.Rx(np.arange(0, 2*np.pi, 0.2))
388388
>>> len(R)
389-
>>> R[0]
389+
>>> R[0]
390390
>>> R[-1]
391391
>>> R[2:4]
392392

@@ -404,12 +404,12 @@ In particular it supports iteration which allows looping and comprehensions:
404404
>>> eul = [x.eul() for x in R]
405405
>>> len(eul)
406406
>>> eul[10]
407-
407+
408408
Useful functions that be used on such objects include
409409

410-
============= ================================================
410+
============= ================================================
411411
Method Operation
412-
============= ================================================
412+
============= ================================================
413413
``clear`` Clear all elements, object now has zero length
414414
``append`` Append a single element
415415
``del``
@@ -421,7 +421,7 @@ Method Operation
421421
``pop`` Remove first element and return it
422422
``slice`` Index from a slice object
423423
``zip`` Iterate over the elments
424-
============= ================================================
424+
============= ================================================
425425

426426

427427
Vectorization
@@ -444,7 +444,7 @@ the lengths of the operands and the results are given by
444444
====== ====== ====== ========================
445445
operands results
446446
--------------- --------------------------------
447-
len(X) len(Y) len(Z) results
447+
len(X) len(Y) len(Z) results
448448
====== ====== ====== ========================
449449
1 1 1 Z = X op Y
450450
1 M M Z[i] = X op Y[i]
@@ -523,34 +523,34 @@ Spatial object equivalent class NumPy ndarray.shape
523523
n/a Quaternion (4,)
524524
================= ================ ===================
525525

526-
.. note:: ``SpatialVector`` and ``Line3`` objects have no equivalent in the
526+
.. note:: ``SpatialVector`` and ``Line3`` objects have no equivalent in the
527527
``base`` package.
528528

529529
Inputs to functions in this package are either floats, lists, tuples or
530-
numpy.ndarray objects describing vectors or arrays.
530+
numpy.ndarray objects describing vectors or arrays.
531531

532532
NumPy arrays have a shape described by a shape tuple which is a list of the
533533
dimensions. Typically all ``ndarray`` **vectors** have the shape ``(N,)``, that is,
534534
they have only one dimension. The ``@`` product of an ``(M,N)`` array and a ``(N,)``
535-
vector is an ``(M,)`` vector.
535+
vector is an ``(M,)`` vector.
536536

537537
A numpy column vector has shape ``(N,1)`` and a row vector
538-
has shape ``(1,N)`` but functions also accept row ``(1,N)`` and column ``(N,1)``
539-
where a vector argument is required.
538+
has shape ``(1,N)`` but functions also accept row ``(1,N)`` and column ``(N,1)``
539+
where a vector argument is required.
540540

541541
.. warning:: For a user transitioning from MATLAB the most significant
542542
differences are:
543543
- the use of 1D arrays -- all MATLAB arrays have two dimensions,
544544
even if one of them is equal to one.
545545
- Iterating over a 1D NumPy array (N,) returns consecutive elements
546-
- Iterating over a 2D NumPy array is done by row, not columns as in MATLAB.
546+
- Iterating over a 2D NumPy array is done by row, not columns as in MATLAB.
547547
- Iterating over a row vector ``(1,N)`` returns the entire row
548548
- Iterating a column vector ``(N,1)`` returns consecutive elements (rows).
549549

550550
.. note::
551551
- Functions that require vector can be passed a list, tuple or numpy.ndarray
552552
for a vector -- described in the documentation as being of type
553-
*array_like*.
553+
*array_like*.
554554
- This toolbox documentation refers to NumPy arrays succinctly as:
555555

556556
- ``ndarray(N)`` for a 1D array of length ``N``
@@ -633,7 +633,7 @@ If ``matplotlib`` is installed then we can add 2D coordinate frames to a figure
633633
>>> trplot2( transl2(4, 3)@trot2(math.pi/3), color='green', frame='c')
634634
>>> plt.grid(True)
635635
636-
.. figure:: ../figs/transforms2d.png
636+
.. figure:: ../figs/transforms2d.png
637637
:align: center
638638

639639
Output of ``trplot2``
@@ -689,7 +689,7 @@ matrix
689689
>>> a
690690
>>> type(a)
691691
>>> a = T[1,1]
692-
>>> a
692+
>>> a
693693
>>> type(a)
694694

695695
We see that the symbolic constants have been converted back to Python numeric
@@ -718,9 +718,9 @@ Relationship to MATLAB tools
718718
----------------------------
719719

720720
This package replicates, as much as possible, the functionality of the `Spatial
721-
Math Toolbox <https://github.com/petercorke/spatial-math>`__ for MATLAB®
721+
Math Toolbox <https://github.com/bdaiinstitute/spatial-math>`__ for MATLAB®
722722
which underpins the `Robotics Toolbox
723-
<https://github.com/petercorke/robotics-toolbox-matlab>`__ for MATLAB®. It
723+
<https://github.com/bdaiinstitute/robotics-toolbox-matlab>`__ for MATLAB®. It
724724
comprises:
725725

726726
* the *classic* functions (which date back to the origin of the Robotics Toolbox
@@ -730,7 +730,7 @@ comprises:
730730
>>> from spatialmath.base import rotx, trotx
731731

732732
and works with NumPy arrays. This package also includes a set of functions,
733-
not present in the MATLAB version, to handle quaternions, unit-quaternions
733+
not present in the MATLAB version, to handle quaternions, unit-quaternions
734734
which are represented as 4-element NumPy arrays, and twists.
735735
* the classes (which appeared in Robotics Toolbox for MATLAB release 10 in 2017) such as ``SE3``, ``UnitQuaternion`` etc. The only significant difference
736736
is that the MATLAB ``Twist`` class is now called ``Twist3``.
@@ -766,6 +766,3 @@ which has the familiar *classic* functions like ``rotx`` and ``rpy2r`` available
766766
R2 = rpy2r(0.1, 0.2, 0.3)
767767
768768
T = SE3(1, 2, 3)
769-
770-
771-

tests/base/test_quaternions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is part of the SpatialMath toolbox for Python
2-
# https://github.com/petercorke/spatialmath-python
2+
# https://github.com/bdaiinstitute/spatialmath-python
33
#
44
# MIT License
55
#

0 commit comments

Comments
 (0)