10000 update intro text · flyinger/spatialmath-python@c9190b4 · GitHub
[go: up one dir, main page]

Skip to content

Commit c9190b4

Browse files
committed
update intro text
make language more consistent
1 parent dbf1c51 commit c9190b4

File tree

3 files changed

+14440
-5429
lines changed

3 files changed

+14440
-5429
lines changed

docs/source/intro.rst

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ Introduction
77
Spatial maths capability underpins all of robotics and robotic vision.
88
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:`R \in SO(2), SO(3)`, homogeneous transformation matrices :math:`T \in SE(2), SE(3)` and quaternions :math:`q \in \mathbb{H}`.
10+
This includes relevant mathematical objects such as rotation matrices :math:`R \in SO(2), SO(3)`,
11+
homogeneous transformation matrices :math:`T \in SE(2), SE(3)`, quaternions :math:`q \in \mathbb{H}`,
12+
and twists :math:`t in se(2), se(3)`.
1113

1214
For example, we can create a rigid-body transformation that is a rotation about the x-axis of 30 degrees::
1315

@@ -20,7 +22,7 @@ For example, we can create a rigid-body transformation that is a rotation about
2022
which results in a NumPy 4x4 array that belongs to the group SE(3). We could also create a class instance::
2123

2224
>>> from spatialmath import *
23-
>>> T = sm.SE3.Rx(30, 'deg')
25+
>>> T = SE3.Rx(30, 'deg')
2426
>>> type(T)
2527
<class 'spatialmath.pose3d.SE3'>
2628
>>> print(T)
@@ -40,9 +42,19 @@ While functions and classes can provide similar functionality the class provide
4042

4143

4244
Relationship to MATLAB tools
43-
============================
45+
----------------------------
4446
This package replicates, as much as possible, the functionality of the `Spatial Math Toolbox <https://github.com/petercorke/spatial-math>`__ for MATLAB |reg|
45-
which underpins the `Robotics Toolbox <https://github.com/petercorke/robotics-toolbox-matlab>`__ for MATLAB.
47+
which underpins the `Robotics Toolbox <https://github.com/petercorke/robotics-toolbox-matlab>`__ for MATLAB. It comprises:
48+
49+
* the *classic* functions (which date back to the origin of the Robotics Toolbox for MATLAB) such as ``rotx``, ``trotz``, ``eul2tr`` etc. as the ``base`` package which you can access by::
50+
51+
from spatialmath.base import *
52+
53+
and works with NumPy arrays. This package also includes a set of functions to deal with quaternions and unit-quaternions represented as 4-element
54+
Numpy arrays.
55+
* the classes (which appeared in Robotics Toolbox for MATLAB release 10 in 2017) such as ``SE3``, ``UnitQuaternion`` etc. The only significant difference
56+
is that the MATLAB ``Twist`` class is now called ``Twist3``.
57+
4658
The design considerations included:
4759

4860
- being as similar as possible to the MATLAB Toolbox function names and semantics
@@ -57,7 +69,19 @@ The design considerations included:
5769
Spatial math classes
5870
====================
5971

60-
The package provides classes to abstract and implementing appropriate operations for the following groups:
72+
The package provides classes to represent pose and orientation in 3D and 2D
73+
space:
74+
75+
============ ================== =============
76+
Represents in 3D in 2D
77+
============ ================== =============
78+
pose ``SE3`` ``SE2``
79+
``Twist3`` ``Twist2``
80+
orientation ``SO3`` ``SO2``
81+
``UnitQuaternion``
82+
============ ================== =============
83+
84+
These classes to abstract and implementing appropriate operations for the following groups:
6185

6286
====================== ============================ =======================
6387
Group Name Class
@@ -67,8 +91,8 @@ Group Name Class
6791
:math:`S^3` unit quaternion ``UnitQuaternion``
6892
:math:`\mbox{SE(2)}` rigid-body translation in 2D ``SE2``
6993
:math:`\mbox{SO(2)}` orientation in 2D ``SO2``
94+
:math:`\mbox{se(3)}` twist in 3D ``Twist3``
7095
:math:`\mbox{se(2)}` twist in 2D ``Twist2``
71-
:math:`\mbox{se(3)}` twist in 3D ``Twist``
7296
:math:`\mathbb{H}` quaternion ``Quaternion``
7397
:math:`M^6` spatial velocity ``SpatialVelocity``
7498
:math:`M^6` spatial acceleration ``SpatialAcceleration``
@@ -78,7 +102,7 @@ Group Name Class
78102
====================== ============================ =======================
79103

80104

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

84108
>>> SE3(np.zeros((4,4)))
@@ -94,12 +118,12 @@ However a list of these items::
94118

95119
>>> X = [SE3.Rx(0), SE3.Rx(0.2), SE3.Rx(0.4), SE3.Rx(0.6)]
96120

97-
has the type `list` and the elements are not enforced to be homogeneous, ie. a list could contain a mixture of classes.
121+
has the type `list` and the elements are not guaranteed to be homogeneous, ie. a list could contain a mixture of classes.
98122
This requires careful coding, or additional user code to check the validity of all elements in the list.
99-
We could create a NumPy array of these objects, the upside being it could be a multi-dimensional array, but the again NumPy does not
123+
We could create a NumPy array of these objects, the upside being it could be more than one-dimensional, but the again NumPy does not
100124
enforce homogeneity of object types in an array.
101125

102-
The Spatial Math package give these classes list *super powers* so that, for example, a single `SE3` object can contain a list of SE(3) poses::
126+
The Spatial Math package give these classes list *super powers* so that, for example, a single `SE3` object can contain a sequence of SE(3) values::
103127

104128
>>> X = SE3.Rx([0, 0.2, 0.4, 0.6])
105129
>>> len(x)

0 commit comments

Comments
 (0)
0