rvc3python 0.2.3__tar.gz → 0.9.1__tar.gz
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.
- {rvc3python-0.2.3 → rvc3python-0.9.1}/MANIFEST.in +1 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/PKG-INFO +149 -50
- rvc3python-0.2.3/rvc3python.egg-info/PKG-INFO → rvc3python-0.9.1/README.md +128 -62
- rvc3python-0.9.1/RVC3/__init__.py +5 -0
- rvc3python-0.9.1/RVC3/bin/bdsim_path.py +10 -0
- rvc3python-0.9.1/RVC3/bin/rvctool.py +354 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/IBVS-arm-main.py +14 -16
- rvc3python-0.9.1/RVC3/models/IBVS-arm.bd +1486 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/IBVS-holonomic-main.py +21 -13
- rvc3python-0.9.1/RVC3/models/IBVS-holonomic.bd +1382 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/IBVS-main.py +1 -8
- rvc3python-0.9.1/RVC3/models/IBVS-nonholonomic-main.py +85 -0
- rvc3python-0.9.1/RVC3/models/IBVS-nonholonomic.bd +2388 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/IBVS-partitioned-main.py +16 -18
- rvc3python-0.9.1/RVC3/models/IBVS-partitioned.bd +1630 -0
- rvc3python-0.9.1/RVC3/models/IBVS-quadrotor-main.py +158 -0
- rvc3python-0.9.1/RVC3/models/IBVS-quadrotor.bd +2343 -0
- rvc3python-0.9.1/RVC3/models/IBVS.bd +1036 -0
- rvc3python-0.9.1/RVC3/models/RRMC.bd +383 -0
- rvc3python-0.9.1/RVC3/models/RRMC.py +39 -0
- rvc3python-0.9.1/RVC3/models/RRMC2.bd +640 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/RRMC2.py +15 -10
- rvc3python-0.9.1/RVC3/models/SEA-main.py +30 -0
- rvc3python-0.9.1/RVC3/models/SEA.bd +1470 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/SEA.py +25 -15
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/__init__.py +0 -0
- rvc3python-0.9.1/RVC3/models/braitenberg.bd +906 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/braitenberg.py +34 -23
- rvc3python-0.9.1/RVC3/models/cartspace.bd +258 -0
- rvc3python-0.9.1/RVC3/models/computed-torque-main.py +26 -0
- rvc3python-0.9.1/RVC3/models/computed-torque.bd +925 -0
- rvc3python-0.9.1/RVC3/models/driveconfig.bd +1550 -0
- rvc3python-0.9.1/RVC3/models/driveconfig.py +137 -0
- rvc3python-0.9.1/RVC3/models/driveline.bd +917 -0
- rvc3python-0.9.1/RVC3/models/driveline.py +70 -0
- rvc3python-0.9.1/RVC3/models/drivepoint.bd +963 -0
- rvc3python-0.9.1/RVC3/models/drivepoint.py +66 -0
- rvc3python-0.9.1/RVC3/models/drivepursuit.bd +807 -0
- rvc3python-0.9.1/RVC3/models/drivepursuit.py +93 -0
- rvc3python-0.9.1/RVC3/models/feedforward-main.py +32 -0
- rvc3python-0.9.1/RVC3/models/feedforward.bd +1174 -0
- rvc3python-0.9.1/RVC3/models/jointspace.bd +323 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/jointspace.py +10 -5
- rvc3python-0.9.1/RVC3/models/lanechange.bd +202 -0
- rvc3python-0.9.1/RVC3/models/lanechange.py +26 -0
- rvc3python-0.9.1/RVC3/models/opspace-main.py +84 -0
- rvc3python-0.9.1/RVC3/models/opspace.bd +2084 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/opspace.py +50 -34
- rvc3python-0.9.1/RVC3/models/ploop.bd +826 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/ploop.py +18 -11
- rvc3python-0.9.1/RVC3/models/ploop_test.bd +417 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/ploop_test.py +18 -15
- rvc3python-0.9.1/RVC3/models/quad_model.py +132 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/quadrotor-main.py +23 -14
- rvc3python-0.9.1/RVC3/models/quadrotor.bd +1914 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/quadrotor.py +51 -30
- rvc3python-0.9.1/RVC3/models/vloop.bd +1217 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/vloop.py +19 -14
- rvc3python-0.9.1/RVC3/models/vloop_test.bd +625 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/vloop_test.py +19 -21
- rvc3python-0.9.1/RVC3/models/zerotorque.bd +138 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/models/zerotorque.py +10 -4
- rvc3python-0.9.1/pyproject.toml +120 -0
- rvc3python-0.2.3/README.md → rvc3python-0.9.1/rvc3python.egg-info/PKG-INFO +162 -41
- {rvc3python-0.2.3 → rvc3python-0.9.1}/rvc3python.egg-info/SOURCES.txt +37 -29
- rvc3python-0.9.1/rvc3python.egg-info/entry_points.txt +3 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/rvc3python.egg-info/requires.txt +2 -1
- rvc3python-0.9.1/rvc3python.egg-info/top_level.txt +1 -0
- rvc3python-0.2.3/RVC3/bin/bdsim_path +0 -6
- rvc3python-0.2.3/RVC3/bin/rvctool +0 -296
- rvc3python-0.2.3/RVC3/models/IBVS-nonholonomic-main.py +0 -75
- rvc3python-0.2.3/RVC3/models/IBVS-quadrotor-main.py +0 -98
- rvc3python-0.2.3/RVC3/models/RRMC.py +0 -42
- rvc3python-0.2.3/RVC3/models/driveconfig.py +0 -113
- rvc3python-0.2.3/RVC3/models/driveline.py +0 -56
- rvc3python-0.2.3/RVC3/models/drivepoint.py +0 -54
- rvc3python-0.2.3/RVC3/models/drivepursuit.py +0 -88
- rvc3python-0.2.3/RVC3/models/lanechange.py +0 -19
- rvc3python-0.2.3/RVC3/models/puma_collapse.py +0 -33
- rvc3python-0.2.3/rvc3python.egg-info/top_level.txt +0 -2
- rvc3python-0.2.3/setup.py +0 -81
- rvc3python-0.2.3/tools/__init__.py +0 -0
- rvc3python-0.2.3/tools/bookcheck.py +0 -107
- rvc3python-0.2.3/tools/bookurls.py +0 -63
- rvc3python-0.2.3/tools/crop.py +0 -55
- rvc3python-0.2.3/tools/export.py +0 -19
- rvc3python-0.2.3/tools/fixidx.py +0 -23
- rvc3python-0.2.3/tools/grepall.py +0 -56
- rvc3python-0.2.3/tools/https.py +0 -69
- rvc3python-0.2.3/tools/ipy.py +0 -54
- rvc3python-0.2.3/tools/m2p.py +0 -109
- rvc3python-0.2.3/tools/mgrepall.py +0 -56
- rvc3python-0.2.3/tools/pvplus.py +0 -444
- rvc3python-0.2.3/tools/pycon.py +0 -30
- rvc3python-0.2.3/tools/pyrun (original).py +0 -650
- rvc3python-0.2.3/tools/pyrun-old.py +0 -168
- rvc3python-0.2.3/tools/pyrun-old2.py +0 -648
- rvc3python-0.2.3/tools/pyrun-working.py +0 -147
- rvc3python-0.2.3/tools/pyrun.py +0 -679
- rvc3python-0.2.3/tools/rmfigs.py +0 -50
- rvc3python-0.2.3/tools/rmoldfigs.py +0 -36
- rvc3python-0.2.3/tools/runall.py +0 -59
- rvc3python-0.2.3/tools/rvcprint.py +0 -164
- rvc3python-0.2.3/tools/test1.py +0 -47
- rvc3python-0.2.3/tools/tex2py.py +0 -51
- {rvc3python-0.2.3 → rvc3python-0.9.1}/LICENSE +0 -0
- {rvc3python-0.2.3/RVC3 → rvc3python-0.9.1/RVC3/bin}/__init__.py +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/examples/__init__.py +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/examples/hershey/genhershey.py +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/examples/hershey/hershey.json +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/examples/hershey/hershey.txt +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/examples/hershey/roman-plain.txt +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/examples/hershey/roman-simplex.txt +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/examples/hershey/roman-triplex.txt +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/examples/imu_data.py +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/examples/mosaic.py +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/examples/ransac_line.py +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/examples/visodom.py +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/examples/walking.py +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/examples/writing.py +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/tools/__init__.py +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/RVC3/tools/rvcprint.py +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/Untitled.ipynb +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/rvc3python.egg-info/dependency_links.txt +0 -0
- {rvc3python-0.2.3 → rvc3python-0.9.1}/setup.cfg +0 -0
|
@@ -1,24 +1,35 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rvc3python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.1
|
|
4
4
|
Summary: Support for book: Robotics, Vision & Control 3 in Python
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Project-URL: Documentation, https://petercorke.github.io/RVC3-python
|
|
5
|
+
Author-email: Peter Corke <rvc@petercorke.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/petercorke/RVC3-python
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/petercorke/RVC3-python/issues
|
|
9
8
|
Project-URL: Source, https://github.com/petercorke/RVC3-python
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Keywords: robotics,robot,manipulator,robot arm,mobile robot,mobile manipulation,path planning,SLAM,pose graph,Dubins,Reeds-Shepp,lattice planner,RRT,PRM,rapidly exploring random tree,probabilistic roadmap planner,force control,kinematics,Jacobian,position control,velocity control,spatial math,SO(2),SE(2),SO(3),SE(3),twist,product of exponential,translation,orientation,angle-axis,Lie group,skew symmetric matrix,pose,translation,rotation matrix,rigid body transform,homogeneous transformation,Euler angles,roll-pitch-yaw angles,quaternion,unit-quaternion,computer vision,machine vision,robotic vision,color space,blackbody,image segmentation,blobs,Hough transform,k-means,homography,camera calibration,visual odometry,bundle adjustment,stereo vision,rectification
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
11
|
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
12
|
Classifier: Programming Language :: Python :: 3.7
|
|
16
13
|
Classifier: Programming Language :: Python :: 3.8
|
|
17
14
|
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
19
|
+
Classifier: Operating System :: OS Independent
|
|
18
20
|
Requires-Python: >=3.7
|
|
19
21
|
Description-Content-Type: text/markdown
|
|
20
|
-
Provides-Extra: pytorch
|
|
21
22
|
License-File: LICENSE
|
|
23
|
+
Requires-Dist: matplotlib
|
|
24
|
+
Requires-Dist: roboticstoolbox-python>=1
|
|
25
|
+
Requires-Dist: machinevision-toolbox-python
|
|
26
|
+
Requires-Dist: bdsim>=1.1
|
|
27
|
+
Requires-Dist: IPython
|
|
28
|
+
Requires-Dist: sympy
|
|
29
|
+
Requires-Dist: pybullet
|
|
30
|
+
Provides-Extra: pytorch
|
|
31
|
+
Requires-Dist: torch; extra == "pytorch"
|
|
32
|
+
Requires-Dist: torchvision; extra == "pytorch"
|
|
22
33
|
|
|
23
34
|
# Robotics, Vision & Control: 3rd edition in Python (2023)
|
|
24
35
|
[](https://github.com/petercorke/robotics-toolbox-python)
|
|
@@ -29,22 +40,41 @@ License-File: LICENSE
|
|
|
29
40
|

|
|
30
41
|
[](https://pypistats.org/packages/rvc3python)
|
|
31
42
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
43
|
+
<table style="border:0px">
|
|
44
|
+
<tr style="border:0px">
|
|
45
|
+
<td style="border:0px">
|
|
35
46
|
<img src="https://github.com/petercorke/RVC3-python/raw/main/doc/frontcover.png" alt="Front cover 978-3-031-06468-5_5208" width="300">
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<
|
|
47
|
+
</td>
|
|
48
|
+
<td style="border:0px">
|
|
49
|
+
Welcome to the online hub for the book:
|
|
50
|
+
<ul type="none">
|
|
51
|
+
<li><b>Robotics, Vision & Control</b>: fundamental algorithms in Python (3rd edition)
|
|
52
|
+
<li>Peter Corke, published by Springer-Nature 2023.</li>
|
|
53
|
+
<li><b>ISBN</b> 978-3-031-06468-5 (hardcopy), 978-3-031-06469-2 (eBook)</li>
|
|
54
|
+
<li><b>DOI</b> <a href="https://doi.org/10.1007/978-3-031-06469-2">10.1007/978-3-031-06469-2</a></li>
|
|
55
|
+
</ul>
|
|
56
|
+
<br><br>
|
|
57
|
+
<p>Report an issue with the book or its supporting code <a href="https://github.com/petercorke/RVC3-python/issues/new/choose">here</a>.</p>
|
|
58
|
+
|
|
59
|
+
<p>Known errata for the book can be viewed <a href="https://github.com/petercorke/RVC3-python/wiki/Errata">here</a>.</p>
|
|
60
|
+
</td>
|
|
61
|
+
</tr>
|
|
62
|
+
</table>
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
This book uses many examples based on the following open-source Python packages
|
|
66
|
+
|
|
67
|
+
<a href="https://github.com/petercorke/robotics-toolbox-python"><img alt="Robotics Toolbox for Python" src="https://github.com/petercorke/robotics-toolbox-python/raw/master/docs/figs/RobToolBox_RoundLogoB.png" width="130"></a>
|
|
40
68
|
<a href="https://github.com/petercorke/machinevision-toolbox-python"><img alt="Machine Vision Toolbox for Python" src="https://github.com/petercorke/machinevision-toolbox-python/raw/master/figs/VisionToolboxLogo_NoBackgnd@2x.png" width="150"></a>
|
|
69
|
+
<a href="https://github.com/petercorke/spatialmath-python"><img alt="Spatial Maths Toolbox for Python" src="https://github.com/petercorke/spatialmath-python/raw/master/docs/figs/CartesianSnakes_LogoW.png" width="130"></a>
|
|
70
|
+
<a href="https://github.com/petercorke/bdsim"><img alt="Block diagram simulation for Python" src="https://github.com/petercorke/bdsim/raw/master/figs/BDSimLogo_NoBackgnd@2x.png" width="250"></a>
|
|
41
71
|
|
|
42
|
-
|
|
72
|
+
**Robotics Toolbox for Python**, **Machine Vision Toolbox for Python**, **Spatial Maths Toolbox for Python**, **Block Diagram Simulation for Python**. These in turn have dependencies on other packages created by the author and
|
|
43
73
|
third parties.
|
|
44
74
|
|
|
45
75
|
## Installing the package
|
|
46
76
|
|
|
47
|
-
This package provides a simple one-step installation of the required Toolboxes
|
|
77
|
+
This package provides a simple one-step installation of *all* the required Toolboxes
|
|
48
78
|
```shell
|
|
49
79
|
pip install rvc3python
|
|
50
80
|
```
|
|
@@ -53,11 +83,24 @@ or
|
|
|
53
83
|
conda install rvc3python
|
|
54
84
|
```
|
|
55
85
|
|
|
86
|
+
There are a lot of dependencies and this might take a minute or so. You now have a very
|
|
87
|
+
powerful computing environment for robotics and computer vision.
|
|
88
|
+
|
|
89
|
+
### Python version
|
|
90
|
+
|
|
91
|
+
Given the rapid rate of language additions, particularly around type hinting, use at
|
|
92
|
+
least Python 3.8. Python 3.7 goes end of life in June 2023.
|
|
93
|
+
|
|
94
|
+
Not all package dependencies will work with the latest release of Python. In particular, check:
|
|
95
|
+
* [PyTorch](https://pypi.org/project/torch/) used for segmentation examples in Chapter 12
|
|
96
|
+
* [Open3D](https://pypi.org/project/open3d), used for point cloud examples in Chapter 14.
|
|
97
|
+
|
|
56
98
|
### Installing into a Conda environment
|
|
57
99
|
|
|
58
100
|
It's probably a good idea to create a virtual environment to keep this package
|
|
59
|
-
and its dependencies separated from your other Python code and projects.
|
|
60
|
-
|
|
101
|
+
and its dependencies separated from your other Python code and projects. If you've
|
|
102
|
+
never used virtual environments before this might be a good time to start, and it
|
|
103
|
+
is really easy [using Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html):
|
|
61
104
|
```shell
|
|
62
105
|
conda create -n RVC3 python=3.10
|
|
63
106
|
conda activate RVC3
|
|
@@ -73,7 +116,7 @@ pip install rvc3python[pytorch]
|
|
|
73
116
|
```
|
|
74
117
|
or
|
|
75
118
|
```shell
|
|
76
|
-
conda install rvc3python
|
|
119
|
+
conda install rvc3python
|
|
77
120
|
```
|
|
78
121
|
## Using the Toolboxes
|
|
79
122
|
|
|
@@ -87,36 +130,43 @@ $ rvctool
|
|
|
87
130
|
| _ < (_) | |_) | (_) | |_| | (__\__ \_ \ V / | \__ \ | (_) | | | | | (_> < | |__| (_) | | | | |_| | | (_) | | ___) |
|
|
88
131
|
|_| \_\___/|_.__/ \___/ \__|_|\___|___( ) \_/ |_|___/_|\___/|_| |_| \___/\/ \____\___/|_| |_|\__|_| \___/|_| |____/
|
|
89
132
|
|/
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
import
|
|
94
|
-
import
|
|
95
|
-
from
|
|
96
|
-
|
|
97
|
-
from spatialmath
|
|
98
|
-
from
|
|
99
|
-
from
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
133
|
+
|
|
134
|
+
for Python (RTB==1.1.0, MVTB==0.9.5, SG==1.1.7, SMTB==1.1.7, NumPy==1.24.2, SciPy==1.10.1, Matplotlib==3.7.1)
|
|
135
|
+
|
|
136
|
+
import math
|
|
137
|
+
import numpy as np
|
|
138
|
+
from scipy import linalg, optimize
|
|
139
|
+
import matplotlib.pyplot as plt
|
|
140
|
+
from spatialmath import *
|
|
141
|
+
from spatialmath.base import *
|
|
142
|
+
from spatialmath.base import sym
|
|
143
|
+
from spatialgeometry import *
|
|
144
|
+
from roboticstoolbox import *
|
|
145
|
+
from machinevisiontoolbox import *
|
|
146
|
+
import machinevisiontoolbox.base as mvb
|
|
147
|
+
|
|
148
|
+
# useful variables
|
|
149
|
+
from math import pi
|
|
150
|
+
puma = models.DH.Puma560()
|
|
151
|
+
panda = models.DH.Panda()
|
|
152
|
+
|
|
153
|
+
func/object? - show brief help
|
|
154
|
+
help(func/object) - show detailed help
|
|
155
|
+
func/object?? - show source code
|
|
106
156
|
|
|
107
157
|
Results of assignments will be displayed, use trailing ; to suppress
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
Python 3.8.5 (default, Sep 4 2020, 02:22:02)
|
|
158
|
+
|
|
159
|
+
Python 3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:24:27) [Clang 14.0.6 ]
|
|
111
160
|
Type 'copyright', 'credits' or 'license' for more information
|
|
112
|
-
IPython 8.0
|
|
161
|
+
IPython 8.11.0 -- An enhanced Interactive Python. Type '?' for help.
|
|
113
162
|
|
|
114
163
|
|
|
115
164
|
>>>
|
|
116
165
|
```
|
|
117
166
|
|
|
118
|
-
This provides an interactive Python
|
|
119
|
-
|
|
167
|
+
This provides an interactive Python
|
|
168
|
+
([IPython](https://ipython.readthedocs.io/en/stable)) session with all the Toolboxes and
|
|
169
|
+
supporting packages imported, and ready to go. It's a highly capable, convenient, and
|
|
120
170
|
"MATLAB-like" workbench environment for robotics and computer vision.
|
|
121
171
|
|
|
122
172
|
For example to load an ETS model of a Panda robot, solve a forward kinematics
|
|
@@ -176,7 +226,8 @@ matches
|
|
|
176
226
|
|
|
177
227
|
`rvctool` is a wrapper around
|
|
178
228
|
[IPython](https://ipython.readthedocs.io/en/stable) where:
|
|
179
|
-
- functions and classes can be accessed without needing
|
|
229
|
+
- robotics and vision functions and classes can be accessed without needing
|
|
230
|
+
package prefixes
|
|
180
231
|
- results are displayed by default like MATLAB does, and like MATLAB you need to
|
|
181
232
|
put a semicolon on the end of the line to prevent this
|
|
182
233
|
- the prompt is the standard Python REPL prompt `>>>` rather than the IPython
|
|
@@ -189,16 +240,64 @@ examples.
|
|
|
189
240
|
|
|
190
241
|
`rvctool` imports the all the above mentioned packages using `import *` which is
|
|
191
242
|
not considered best Python practice. It is very convenient for interactive
|
|
192
|
-
experimentation, but in your own code you can
|
|
243
|
+
experimentation, but in your own code you can handle the imports as you see
|
|
193
244
|
fit.
|
|
194
245
|
|
|
246
|
+
### Cutting and pasting
|
|
247
|
+
|
|
248
|
+
IPython is very forgiving when it comes to cutting and pasting in blocks of Python
|
|
249
|
+
code. It will strip off the `>>>` prompt character and ignore indentation. The normal
|
|
250
|
+
python REPL is not so forgiving. IPython also maintains a command history and
|
|
251
|
+
allows command editing.
|
|
252
|
+
### Simple scripting
|
|
253
|
+
You can write very simple scripts, for example `test.py` is
|
|
254
|
+
|
|
255
|
+
```python
|
|
256
|
+
T = puma.fkine(puma.qn)
|
|
257
|
+
sol = puma.ikine_LM(T)
|
|
258
|
+
sol.q
|
|
259
|
+
puma.plot(sol.q);
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
then
|
|
263
|
+
|
|
264
|
+
```shell
|
|
265
|
+
$ rvctool test.py
|
|
266
|
+
0 0 1 0.5963
|
|
267
|
+
0 1 0 -0.1501
|
|
268
|
+
-1 0 0 0.6575
|
|
269
|
+
0 0 0 1
|
|
270
|
+
|
|
271
|
+
IKSolution(q=array([7.235e-08, -0.8335, 0.09396, 3.142, 0.8312, -3.142]), success=True, iterations=15, searches=1, residual=1.406125546650288e-07, reason='Success')
|
|
272
|
+
array([7.235e-08, -0.8335, 0.09396, 3.142, 0.8312, -3.142])
|
|
273
|
+
PyPlot3D backend, t = 0.05, scene:
|
|
274
|
+
robot: Text(0.0, 0.0, 'Puma 560')
|
|
275
|
+
>>>
|
|
276
|
+
```
|
|
277
|
+
and you are dropped into an IPython session after the script has run.
|
|
278
|
+
|
|
279
|
+
## Issues running on Apple Silicon
|
|
280
|
+
|
|
281
|
+
Check out the [wiki page](https://github.com/petercorke/RVC3-python/wiki/Running-on-Apple-Silicon).
|
|
282
|
+
|
|
283
|
+
## Using Jupyter and Colab
|
|
284
|
+
|
|
285
|
+
Graphics and animations are problematic in these environments, some things work
|
|
286
|
+
well, some don't. As much as possible I've tweaked the Jupyter notebooks to work
|
|
287
|
+
as best they can in these environments.
|
|
288
|
+
|
|
289
|
+
For local use the [Jupyter plugin for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter) is pretty decent. Colab suffers
|
|
290
|
+
from old versions of major packages (though they are getting better at keeping up to date)
|
|
291
|
+
and animations can suffer from slow update over the network.
|
|
195
292
|
## Other command line tools
|
|
196
293
|
|
|
197
|
-
|
|
294
|
+
Additional command line tools available (from the Robotics Toolbox) include:
|
|
198
295
|
- `eigdemo`, animation showing linear transformation of a rotating unit vector
|
|
199
296
|
which demonstrates eigenvalues and eigenvectors.
|
|
200
|
-
- `tripleangledemo`, experiment with various triple-angle sequences.
|
|
201
|
-
- `twistdemo`, experiment with 3D twists.
|
|
297
|
+
- `tripleangledemo`, Swift visualization that lets you experiment with various triple-angle sequences.
|
|
298
|
+
- `twistdemo`, Swift visualization that lets you experiment with 3D twists. The screw axis is the blue rod and you can
|
|
299
|
+
position and orient it using the sliders, and adjust its pitch. Then apply a rotation
|
|
300
|
+
about the screw using the bottom slider.
|
|
202
301
|
# Block diagram models
|
|
203
302
|
|
|
204
303
|
<a href="https://github.com/petercorke/bdsim"><img
|
|
@@ -246,7 +345,7 @@ This GitHub repo provides additional resources for readers including:
|
|
|
246
345
|
- All example scripts, see the [`examples`](examples) folder.
|
|
247
346
|
- To run the visual odometry example in Sect. 14.8.3 you need to download two image sequence, each over 100MB, [see the instructions here](https://github.com/petercorke/machinevision-toolbox-python/blob/master/mvtb-data/README.md#install-big-image-files).
|
|
248
347
|
|
|
249
|
-
To get
|
|
348
|
+
To get that material you must clone the repo
|
|
250
349
|
```shell
|
|
251
350
|
git clone https://github.com/petercorke/RVC3-python.git
|
|
252
351
|
```
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: rvc3python
|
|
3
|
-
Version: 0.2.3
|
|
4
|
-
Summary: Support for book: Robotics, Vision & Control 3 in Python
|
|
5
|
-
Home-page: https://github.com/petercorke/RVC3-python
|
|
6
|
-
Author: Peter Corke
|
|
7
|
-
License: MIT
|
|
8
|
-
Project-URL: Documentation, https://petercorke.github.io/RVC3-python
|
|
9
|
-
Project-URL: Source, https://github.com/petercorke/RVC3-python
|
|
10
|
-
Project-URL: Tracker, https://github.com/petercorke/RVC3-python/issues
|
|
11
|
-
Keywords: robotics,robot,manipulator,robot arm,mobile robot,mobile manipulation,path planning,SLAM,pose graph,Dubins,Reeds-Shepp,lattice planner,RRT,PRM,rapidly exploring random tree,probabilistic roadmap planner,force control,kinematics,Jacobian,position control,velocity control,spatial math,SO(2),SE(2),SO(3),SE(3),twist,product of exponential,translation,orientation,angle-axis,Lie group,skew symmetric matrix,pose,translation,rotation matrix,rigid body transform,homogeneous transformation,Euler angles,roll-pitch-yaw angles,quaternion,unit-quaternioncomputer vision,machine vision,robotic vision,color space,blackbody,image segmentation,blobs,Hough transform,k-means,homography,camera calibration,visual odometry,bundle adjustment,stereo vision,rectification
|
|
12
|
-
Classifier: Development Status :: 4 - Beta
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
-
Requires-Python: >=3.7
|
|
19
|
-
Description-Content-Type: text/markdown
|
|
20
|
-
Provides-Extra: pytorch
|
|
21
|
-
License-File: LICENSE
|
|
22
|
-
|
|
23
1
|
# Robotics, Vision & Control: 3rd edition in Python (2023)
|
|
24
2
|
[](https://github.com/petercorke/robotics-toolbox-python)
|
|
25
3
|
[](https://qcr.github.io)
|
|
@@ -29,22 +7,41 @@ License-File: LICENSE
|
|
|
29
7
|

|
|
30
8
|
[](https://pypistats.org/packages/rvc3python)
|
|
31
9
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
10
|
+
<table style="border:0px">
|
|
11
|
+
<tr style="border:0px">
|
|
12
|
+
<td style="border:0px">
|
|
35
13
|
<img src="https://github.com/petercorke/RVC3-python/raw/main/doc/frontcover.png" alt="Front cover 978-3-031-06468-5_5208" width="300">
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<
|
|
14
|
+
</td>
|
|
15
|
+
<td style="border:0px">
|
|
16
|
+
Welcome to the online hub for the book:
|
|
17
|
+
<ul type="none">
|
|
18
|
+
<li><b>Robotics, Vision & Control</b>: fundamental algorithms in Python (3rd edition)
|
|
19
|
+
<li>Peter Corke, published by Springer-Nature 2023.</li>
|
|
20
|
+
<li><b>ISBN</b> 978-3-031-06468-5 (hardcopy), 978-3-031-06469-2 (eBook)</li>
|
|
21
|
+
<li><b>DOI</b> <a href="https://doi.org/10.1007/978-3-031-06469-2">10.1007/978-3-031-06469-2</a></li>
|
|
22
|
+
</ul>
|
|
23
|
+
<br><br>
|
|
24
|
+
<p>Report an issue with the book or its supporting code <a href="https://github.com/petercorke/RVC3-python/issues/new/choose">here</a>.</p>
|
|
25
|
+
|
|
26
|
+
<p>Known errata for the book can be viewed <a href="https://github.com/petercorke/RVC3-python/wiki/Errata">here</a>.</p>
|
|
27
|
+
</td>
|
|
28
|
+
</tr>
|
|
29
|
+
</table>
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
This book uses many examples based on the following open-source Python packages
|
|
33
|
+
|
|
34
|
+
<a href="https://github.com/petercorke/robotics-toolbox-python"><img alt="Robotics Toolbox for Python" src="https://github.com/petercorke/robotics-toolbox-python/raw/master/docs/figs/RobToolBox_RoundLogoB.png" width="130"></a>
|
|
40
35
|
<a href="https://github.com/petercorke/machinevision-toolbox-python"><img alt="Machine Vision Toolbox for Python" src="https://github.com/petercorke/machinevision-toolbox-python/raw/master/figs/VisionToolboxLogo_NoBackgnd@2x.png" width="150"></a>
|
|
36
|
+
<a href="https://github.com/petercorke/spatialmath-python"><img alt="Spatial Maths Toolbox for Python" src="https://github.com/petercorke/spatialmath-python/raw/master/docs/figs/CartesianSnakes_LogoW.png" width="130"></a>
|
|
37
|
+
<a href="https://github.com/petercorke/bdsim"><img alt="Block diagram simulation for Python" src="https://github.com/petercorke/bdsim/raw/master/figs/BDSimLogo_NoBackgnd@2x.png" width="250"></a>
|
|
41
38
|
|
|
42
|
-
|
|
39
|
+
**Robotics Toolbox for Python**, **Machine Vision Toolbox for Python**, **Spatial Maths Toolbox for Python**, **Block Diagram Simulation for Python**. These in turn have dependencies on other packages created by the author and
|
|
43
40
|
third parties.
|
|
44
41
|
|
|
45
42
|
## Installing the package
|
|
46
43
|
|
|
47
|
-
This package provides a simple one-step installation of the required Toolboxes
|
|
44
|
+
This package provides a simple one-step installation of *all* the required Toolboxes
|
|
48
45
|
```shell
|
|
49
46
|
pip install rvc3python
|
|
50
47
|
```
|
|
@@ -53,11 +50,24 @@ or
|
|
|
53
50
|
conda install rvc3python
|
|
54
51
|
```
|
|
55
52
|
|
|
53
|
+
There are a lot of dependencies and this might take a minute or so. You now have a very
|
|
54
|
+
powerful computing environment for robotics and computer vision.
|
|
55
|
+
|
|
56
|
+
### Python version
|
|
57
|
+
|
|
58
|
+
Given the rapid rate of language additions, particularly around type hinting, use at
|
|
59
|
+
least Python 3.8. Python 3.7 goes end of life in June 2023.
|
|
60
|
+
|
|
61
|
+
Not all package dependencies will work with the latest release of Python. In particular, check:
|
|
62
|
+
* [PyTorch](https://pypi.org/project/torch/) used for segmentation examples in Chapter 12
|
|
63
|
+
* [Open3D](https://pypi.org/project/open3d), used for point cloud examples in Chapter 14.
|
|
64
|
+
|
|
56
65
|
### Installing into a Conda environment
|
|
57
66
|
|
|
58
67
|
It's probably a good idea to create a virtual environment to keep this package
|
|
59
|
-
and its dependencies separated from your other Python code and projects.
|
|
60
|
-
|
|
68
|
+
and its dependencies separated from your other Python code and projects. If you've
|
|
69
|
+
never used virtual environments before this might be a good time to start, and it
|
|
70
|
+
is really easy [using Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html):
|
|
61
71
|
```shell
|
|
62
72
|
conda create -n RVC3 python=3.10
|
|
63
73
|
conda activate RVC3
|
|
@@ -73,7 +83,7 @@ pip install rvc3python[pytorch]
|
|
|
73
83
|
```
|
|
74
84
|
or
|
|
75
85
|
```shell
|
|
76
|
-
conda install rvc3python
|
|
86
|
+
conda install rvc3python
|
|
77
87
|
```
|
|
78
88
|
## Using the Toolboxes
|
|
79
89
|
|
|
@@ -87,36 +97,43 @@ $ rvctool
|
|
|
87
97
|
| _ < (_) | |_) | (_) | |_| | (__\__ \_ \ V / | \__ \ | (_) | | | | | (_> < | |__| (_) | | | | |_| | | (_) | | ___) |
|
|
88
98
|
|_| \_\___/|_.__/ \___/ \__|_|\___|___( ) \_/ |_|___/_|\___/|_| |_| \___/\/ \____\___/|_| |_|\__|_| \___/|_| |____/
|
|
89
99
|
|/
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
import
|
|
94
|
-
import
|
|
95
|
-
from
|
|
96
|
-
|
|
97
|
-
from spatialmath
|
|
98
|
-
from
|
|
99
|
-
from
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
|
|
101
|
+
for Python (RTB==1.1.0, MVTB==0.9.5, SG==1.1.7, SMTB==1.1.7, NumPy==1.24.2, SciPy==1.10.1, Matplotlib==3.7.1)
|
|
102
|
+
|
|
103
|
+
import math
|
|
104
|
+
import numpy as np
|
|
105
|
+
from scipy import linalg, optimize
|
|
106
|
+
import matplotlib.pyplot as plt
|
|
107
|
+
from spatialmath import *
|
|
108
|
+
from spatialmath.base import *
|
|
109
|
+
from spatialmath.base import sym
|
|
110
|
+
from spatialgeometry import *
|
|
111
|
+
from roboticstoolbox import *
|
|
112
|
+
from machinevisiontoolbox import *
|
|
113
|
+
import machinevisiontoolbox.base as mvb
|
|
114
|
+
|
|
115
|
+
# useful variables
|
|
116
|
+
from math import pi
|
|
117
|
+
puma = models.DH.Puma560()
|
|
118
|
+
panda = models.DH.Panda()
|
|
119
|
+
|
|
120
|
+
func/object? - show brief help
|
|
121
|
+
help(func/object) - show detailed help
|
|
122
|
+
func/object?? - show source code
|
|
106
123
|
|
|
107
124
|
Results of assignments will be displayed, use trailing ; to suppress
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
Python 3.8.5 (default, Sep 4 2020, 02:22:02)
|
|
125
|
+
|
|
126
|
+
Python 3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:24:27) [Clang 14.0.6 ]
|
|
111
127
|
Type 'copyright', 'credits' or 'license' for more information
|
|
112
|
-
IPython 8.0
|
|
128
|
+
IPython 8.11.0 -- An enhanced Interactive Python. Type '?' for help.
|
|
113
129
|
|
|
114
130
|
|
|
115
131
|
>>>
|
|
116
132
|
```
|
|
117
133
|
|
|
118
|
-
This provides an interactive Python
|
|
119
|
-
|
|
134
|
+
This provides an interactive Python
|
|
135
|
+
([IPython](https://ipython.readthedocs.io/en/stable)) session with all the Toolboxes and
|
|
136
|
+
supporting packages imported, and ready to go. It's a highly capable, convenient, and
|
|
120
137
|
"MATLAB-like" workbench environment for robotics and computer vision.
|
|
121
138
|
|
|
122
139
|
For example to load an ETS model of a Panda robot, solve a forward kinematics
|
|
@@ -176,7 +193,8 @@ matches
|
|
|
176
193
|
|
|
177
194
|
`rvctool` is a wrapper around
|
|
178
195
|
[IPython](https://ipython.readthedocs.io/en/stable) where:
|
|
179
|
-
- functions and classes can be accessed without needing
|
|
196
|
+
- robotics and vision functions and classes can be accessed without needing
|
|
197
|
+
package prefixes
|
|
180
198
|
- results are displayed by default like MATLAB does, and like MATLAB you need to
|
|
181
199
|
put a semicolon on the end of the line to prevent this
|
|
182
200
|
- the prompt is the standard Python REPL prompt `>>>` rather than the IPython
|
|
@@ -189,16 +207,64 @@ examples.
|
|
|
189
207
|
|
|
190
208
|
`rvctool` imports the all the above mentioned packages using `import *` which is
|
|
191
209
|
not considered best Python practice. It is very convenient for interactive
|
|
192
|
-
experimentation, but in your own code you can
|
|
210
|
+
experimentation, but in your own code you can handle the imports as you see
|
|
193
211
|
fit.
|
|
194
212
|
|
|
213
|
+
### Cutting and pasting
|
|
214
|
+
|
|
215
|
+
IPython is very forgiving when it comes to cutting and pasting in blocks of Python
|
|
216
|
+
code. It will strip off the `>>>` prompt character and ignore indentation. The normal
|
|
217
|
+
python REPL is not so forgiving. IPython also maintains a command history and
|
|
218
|
+
allows command editing.
|
|
219
|
+
### Simple scripting
|
|
220
|
+
You can write very simple scripts, for example `test.py` is
|
|
221
|
+
|
|
222
|
+
```python
|
|
223
|
+
T = puma.fkine(puma.qn)
|
|
224
|
+
sol = puma.ikine_LM(T)
|
|
225
|
+
sol.q
|
|
226
|
+
puma.plot(sol.q);
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
then
|
|
230
|
+
|
|
231
|
+
```shell
|
|
232
|
+
$ rvctool test.py
|
|
233
|
+
0 0 1 0.5963
|
|
234
|
+
0 1 0 -0.1501
|
|
235
|
+
-1 0 0 0.6575
|
|
236
|
+
0 0 0 1
|
|
237
|
+
|
|
238
|
+
IKSolution(q=array([7.235e-08, -0.8335, 0.09396, 3.142, 0.8312, -3.142]), success=True, iterations=15, searches=1, residual=1.406125546650288e-07, reason='Success')
|
|
239
|
+
array([7.235e-08, -0.8335, 0.09396, 3.142, 0.8312, -3.142])
|
|
240
|
+
PyPlot3D backend, t = 0.05, scene:
|
|
241
|
+
robot: Text(0.0, 0.0, 'Puma 560')
|
|
242
|
+
>>>
|
|
243
|
+
```
|
|
244
|
+
and you are dropped into an IPython session after the script has run.
|
|
245
|
+
|
|
246
|
+
## Issues running on Apple Silicon
|
|
247
|
+
|
|
248
|
+
Check out the [wiki page](https://github.com/petercorke/RVC3-python/wiki/Running-on-Apple-Silicon).
|
|
249
|
+
|
|
250
|
+
## Using Jupyter and Colab
|
|
251
|
+
|
|
252
|
+
Graphics and animations are problematic in these environments, some things work
|
|
253
|
+
well, some don't. As much as possible I've tweaked the Jupyter notebooks to work
|
|
254
|
+
as best they can in these environments.
|
|
255
|
+
|
|
256
|
+
For local use the [Jupyter plugin for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter) is pretty decent. Colab suffers
|
|
257
|
+
from old versions of major packages (though they are getting better at keeping up to date)
|
|
258
|
+
and animations can suffer from slow update over the network.
|
|
195
259
|
## Other command line tools
|
|
196
260
|
|
|
197
|
-
|
|
261
|
+
Additional command line tools available (from the Robotics Toolbox) include:
|
|
198
262
|
- `eigdemo`, animation showing linear transformation of a rotating unit vector
|
|
199
263
|
which demonstrates eigenvalues and eigenvectors.
|
|
200
|
-
- `tripleangledemo`, experiment with various triple-angle sequences.
|
|
201
|
-
- `twistdemo`, experiment with 3D twists.
|
|
264
|
+
- `tripleangledemo`, Swift visualization that lets you experiment with various triple-angle sequences.
|
|
265
|
+
- `twistdemo`, Swift visualization that lets you experiment with 3D twists. The screw axis is the blue rod and you can
|
|
266
|
+
position and orient it using the sliders, and adjust its pitch. Then apply a rotation
|
|
267
|
+
about the screw using the bottom slider.
|
|
202
268
|
# Block diagram models
|
|
203
269
|
|
|
204
270
|
<a href="https://github.com/petercorke/bdsim"><img
|
|
@@ -246,7 +312,7 @@ This GitHub repo provides additional resources for readers including:
|
|
|
246
312
|
- All example scripts, see the [`examples`](examples) folder.
|
|
247
313
|
- To run the visual odometry example in Sect. 14.8.3 you need to download two image sequence, each over 100MB, [see the instructions here](https://github.com/petercorke/machinevision-toolbox-python/blob/master/mvtb-data/README.md#install-big-image-files).
|
|
248
314
|
|
|
249
|
-
To get
|
|
315
|
+
To get that material you must clone the repo
|
|
250
316
|
```shell
|
|
251
317
|
git clone https://github.com/petercorke/RVC3-python.git
|
|
252
318
|
```
|