rvc3python 0.9.2__tar.gz → 1.0.0__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.9.2/rvc3python.egg-info → rvc3python-1.0.0}/PKG-INFO +130 -90
- {rvc3python-0.9.2 → rvc3python-1.0.0}/README.md +110 -81
- rvc3python-1.0.0/RVC3/bin/_bintools.py +61 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/bin/bdsim_path.py +0 -0
- rvc3python-1.0.0/RVC3/bin/rvc3_model.py +42 -0
- rvc3python-1.0.0/RVC3/bin/rvctool.py +606 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/examples/imu_data.py +9 -9
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/examples/mosaic.py +8 -13
- rvc3python-1.0.0/RVC3/examples/visodom.py +190 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/IBVS-arm-main.py +2 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/IBVS-holonomic-main.py +1 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/IBVS-holonomic.bd +1 -1
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/IBVS-main.py +2 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/IBVS-nonholonomic-main.py +1 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/IBVS-nonholonomic.bd +8 -8
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/IBVS-partitioned-main.py +2 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/IBVS-quadrotor-main.py +2 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/IBVS-quadrotor.bd +2 -2
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/RRMC.py +2 -2
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/RRMC2.py +2 -2
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/__init__.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/braitenberg.py +1 -1
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/driveconfig.py +1 -1
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/drivepursuit.py +3 -3
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/feedforward-main.py +1 -1
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/jointspace.py +1 -1
- rvc3python-1.0.0/RVC3/tools/pvplus.py +441 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/pyproject.toml +18 -10
- {rvc3python-0.9.2 → rvc3python-1.0.0/rvc3python.egg-info}/PKG-INFO +130 -90
- {rvc3python-0.9.2 → rvc3python-1.0.0}/rvc3python.egg-info/SOURCES.txt +7 -3
- {rvc3python-0.9.2 → rvc3python-1.0.0}/rvc3python.egg-info/entry_points.txt +1 -0
- rvc3python-1.0.0/rvc3python.egg-info/requires.txt +25 -0
- rvc3python-1.0.0/tests/test_bin.py +57 -0
- rvc3python-1.0.0/tests/test_examples.py +51 -0
- rvc3python-1.0.0/tests/test_notebooks.py +51 -0
- rvc3python-0.9.2/MANIFEST.in +0 -17
- rvc3python-0.9.2/RVC3/bin/rvctool.py +0 -354
- rvc3python-0.9.2/RVC3/examples/visodom.py +0 -132
- rvc3python-0.9.2/Untitled.ipynb +0 -6
- rvc3python-0.9.2/rvc3python.egg-info/requires.txt +0 -12
- {rvc3python-0.9.2 → rvc3python-1.0.0}/LICENSE +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/__init__.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/bin/__init__.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/examples/__init__.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/examples/hershey/genhershey.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/examples/hershey/hershey.json +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/examples/hershey/hershey.txt +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/examples/hershey/roman-plain.txt +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/examples/hershey/roman-simplex.txt +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/examples/hershey/roman-triplex.txt +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/examples/ransac_line.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/examples/walking.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/examples/writing.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/IBVS-arm.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/IBVS-partitioned.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/IBVS.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/RRMC.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/RRMC2.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/SEA-main.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/SEA.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/SEA.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/braitenberg.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/cartspace.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/computed-torque-main.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/computed-torque.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/driveconfig.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/driveline.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/driveline.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/drivepoint.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/drivepoint.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/drivepursuit.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/feedforward.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/jointspace.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/lanechange.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/lanechange.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/opspace-main.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/opspace.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/opspace.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/ploop.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/ploop.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/ploop_test.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/ploop_test.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/quad_model.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/quadrotor-main.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/quadrotor.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/quadrotor.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/vloop.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/vloop.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/vloop_test.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/vloop_test.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/zerotorque.bd +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/models/zerotorque.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/tools/__init__.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/RVC3/tools/rvcprint.py +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/rvc3python.egg-info/dependency_links.txt +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/rvc3python.egg-info/top_level.txt +0 -0
- {rvc3python-0.9.2 → rvc3python-1.0.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: rvc3python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.0
|
|
4
4
|
Summary: Support for book: Robotics, Vision & Control 3 in Python
|
|
5
5
|
Author-email: Peter Corke <rvc@petercorke.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/petercorke/RVC3-python
|
|
@@ -9,37 +9,58 @@ Project-URL: Source, https://github.com/petercorke/RVC3-python
|
|
|
9
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
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
15
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
17
|
Classifier: License :: OSI Approved :: MIT License
|
|
19
18
|
Classifier: Operating System :: OS Independent
|
|
20
|
-
Requires-Python: >=3.
|
|
19
|
+
Requires-Python: >=3.10
|
|
21
20
|
Description-Content-Type: text/markdown
|
|
22
21
|
License-File: LICENSE
|
|
23
22
|
Requires-Dist: matplotlib
|
|
24
|
-
Requires-Dist: numpy
|
|
23
|
+
Requires-Dist: numpy>1
|
|
25
24
|
Requires-Dist: roboticstoolbox-python>=1
|
|
26
25
|
Requires-Dist: machinevision-toolbox-python
|
|
27
|
-
Requires-Dist: bdsim
|
|
26
|
+
Requires-Dist: bdsim
|
|
28
27
|
Requires-Dist: IPython
|
|
28
|
+
Requires-Dist: ipykernel
|
|
29
|
+
Requires-Dist: ipympl
|
|
29
30
|
Requires-Dist: sympy
|
|
30
|
-
Requires-Dist: pybullet
|
|
31
31
|
Provides-Extra: pytorch
|
|
32
32
|
Requires-Dist: torch; extra == "pytorch"
|
|
33
33
|
Requires-Dist: torchvision; extra == "pytorch"
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
36
|
+
Requires-Dist: nbstripout; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest; extra == "dev"
|
|
38
|
+
Requires-Dist: nbformat; extra == "dev"
|
|
39
|
+
Requires-Dist: nbclient; extra == "dev"
|
|
40
|
+
Provides-Extra: figures
|
|
41
|
+
Requires-Dist: pyvista; extra == "figures"
|
|
42
|
+
Requires-Dist: vtk; extra == "figures"
|
|
43
|
+
Requires-Dist: pillow; extra == "figures"
|
|
44
|
+
Dynamic: license-file
|
|
34
45
|
|
|
35
46
|
# Robotics, Vision & Control: 3rd edition in Python (2023)
|
|
36
|
-
[](https://github.com/petercorke/robotics-toolbox-python)
|
|
37
|
-
[](https://qcr.github.io)
|
|
38
|
-
[](https://opensource.org/licenses/MIT)
|
|
39
47
|
|
|
48
|
+
### Status & Project Health
|
|
40
49
|
[](https://badge.fury.io/py/rvc3python)
|
|
50
|
+
[](https://pepy.tech/projects/rvc3python)
|
|
41
51
|

|
|
42
|
-
[](https://opensource.org/licenses/MIT)
|
|
53
|
+
|
|
54
|
+
### Ecosystem & Dependencies
|
|
55
|
+
[](https://github.com/petercorke/robotics-toolbox-python)
|
|
56
|
+
[](https://qcr.github.io)
|
|
57
|
+
|
|
58
|
+
> [!NOTE]
|
|
59
|
+
> **Actively maintained — August 2026.** Every chapter notebook, the CLI
|
|
60
|
+
> tools (`rvctool`, `bdsim_path`, `rvc3-model`), and the packaging have
|
|
61
|
+
> been re-verified against current RTB/MVTB/SMTB/bdsim releases and fixed
|
|
62
|
+
> where they'd drifted. See [`errata.md`](errata.md) for the full list of
|
|
63
|
+
> what changed and why.
|
|
43
64
|
|
|
44
65
|
<table style="border:0px">
|
|
45
66
|
<tr style="border:0px">
|
|
@@ -66,9 +87,9 @@ Welcome to the online hub for the book:
|
|
|
66
87
|
This book uses many examples based on the following open-source Python packages
|
|
67
88
|
|
|
68
89
|
<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>
|
|
69
|
-
<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/
|
|
90
|
+
<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/main/docs/figs/VisionToolboxLogo_NoBackgnd@2x.png" width="150"></a>
|
|
70
91
|
<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>
|
|
71
|
-
<a href="https://github.com/petercorke/bdsim"><img alt="Block diagram simulation for Python" src="https://github.com/petercorke/bdsim/raw/
|
|
92
|
+
<a href="https://github.com/petercorke/bdsim"><img alt="Block diagram simulation for Python" src="https://github.com/petercorke/bdsim/raw/main/docs/figs/bdsim_logo.png" width="250"></a>
|
|
72
93
|
|
|
73
94
|
**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
|
|
74
95
|
third parties.
|
|
@@ -87,14 +108,35 @@ conda install rvc3python
|
|
|
87
108
|
There are a lot of dependencies and this might take a minute or so. You now have a very
|
|
88
109
|
powerful computing environment for robotics and computer vision.
|
|
89
110
|
|
|
111
|
+
To check everything installed and works correctly, run
|
|
112
|
+
```shell
|
|
113
|
+
rvctool --test
|
|
114
|
+
```
|
|
115
|
+
This is a quick, non-interactive check that prints package versions and exercises one
|
|
116
|
+
real code path per toolbox (RTB, MVTB, spatialgeometry, spatialmath, bdsim, and Open3D
|
|
117
|
+
if installed), reporting PASS/FAIL for each rather than just "it imported".
|
|
118
|
+
|
|
119
|
+
> [!NOTE]
|
|
120
|
+
> `pip`/`conda install` gives you the importable support code only. Jupyter
|
|
121
|
+
> notebooks, figure-generation scripts, and example data live in this
|
|
122
|
+
> GitHub repo — see [Additional book resources](#additional-book-resources)
|
|
123
|
+
> below, or just `git clone` now.
|
|
124
|
+
|
|
90
125
|
### Python version
|
|
91
126
|
|
|
92
|
-
|
|
93
|
-
least Python 3.8. Python 3.7 goes end of life in June 2023.
|
|
127
|
+
`rvc3python` requires **Python 3.10 or later**.
|
|
94
128
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
129
|
+
A handful of book examples need extra, optional packages that aren't installed by
|
|
130
|
+
default — each has its own platform or Python-version limits, worth knowing about
|
|
131
|
+
before you hit them as a surprise rather than as a bug:
|
|
132
|
+
* [PyTorch](https://pypi.org/project/torch/) (`pip install rvc3python[pytorch]`) —
|
|
133
|
+
used for the segmentation and object-detection examples in Chapter 12. Check
|
|
134
|
+
current platform support before installing.
|
|
135
|
+
* [Open3D](https://pypi.org/project/open3d) (`pip install machinevision-toolbox-python[open3d]`)
|
|
136
|
+
— used for the point cloud examples in Chapter 14. Doesn't yet ship wheels for
|
|
137
|
+
Python 3.13+.
|
|
138
|
+
* [coal](https://pypi.org/project/coal) (`pip install roboticstoolbox-python[collision]`)
|
|
139
|
+
— used for the collision-checking examples in Chapter 7. Not available on Windows.
|
|
98
140
|
|
|
99
141
|
### Installing into a Conda environment
|
|
100
142
|
|
|
@@ -103,14 +145,14 @@ and its dependencies separated from your other Python code and projects. If you
|
|
|
103
145
|
never used virtual environments before this might be a good time to start, and it
|
|
104
146
|
is really easy [using Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html):
|
|
105
147
|
```shell
|
|
106
|
-
conda create -n RVC3 python=3.
|
|
148
|
+
conda create -n RVC3 python=3.12
|
|
107
149
|
conda activate RVC3
|
|
108
150
|
pip install rvc3python
|
|
109
151
|
```
|
|
110
152
|
|
|
111
153
|
### Installing deep learning tools
|
|
112
154
|
|
|
113
|
-
Chapter
|
|
155
|
+
Chapter 12 has some deep learning examples based on PyTorch. If you don't have
|
|
114
156
|
PyTorch installed you can use the `pytorch` install option
|
|
115
157
|
```shell
|
|
116
158
|
pip install rvc3python[pytorch]
|
|
@@ -119,6 +161,26 @@ or
|
|
|
119
161
|
```shell
|
|
120
162
|
conda install rvc3python
|
|
121
163
|
```
|
|
164
|
+
|
|
165
|
+
## Additional book resources
|
|
166
|
+
|
|
167
|
+
<img src="https://github.com/petercorke/RVC3-python/raw/main/doc/frontcover.png" alt="Front cover 978-3-031-06468-5_5208" width="100">
|
|
168
|
+
|
|
169
|
+
This GitHub repo provides additional resources for readers including:
|
|
170
|
+
- Jupyter notebooks containing all code lines from each chapter, see
|
|
171
|
+
the [`notebooks`](notebooks) folder
|
|
172
|
+
- The code to produce every Python/Matplotlib (2D) figure in the book, see the [`figures`](figures) folder
|
|
173
|
+
- 3D points clouds from chapter 14, and the code to create them, see
|
|
174
|
+
the [`figures/pointclouds`](figures/pointclouds) folder.
|
|
175
|
+
- 3D figures from chapters 2-3, 7-9, and the code to create them, see the [`figures/3d`](figures/3d) folder.
|
|
176
|
+
- All example scripts, see the [`RVC3/examples`](RVC3/examples) folder.
|
|
177
|
+
- 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/main/packages/mvtb-data/README.md#install-really-big-image-files).
|
|
178
|
+
|
|
179
|
+
To get that material you must clone the repo
|
|
180
|
+
```shell
|
|
181
|
+
git clone https://github.com/petercorke/RVC3-python.git
|
|
182
|
+
```
|
|
183
|
+
|
|
122
184
|
## Using the Toolboxes
|
|
123
185
|
|
|
124
186
|
The simplest way to get going is to use the command line tool
|
|
@@ -132,7 +194,7 @@ $ rvctool
|
|
|
132
194
|
|_| \_\___/|_.__/ \___/ \__|_|\___|___( ) \_/ |_|___/_|\___/|_| |_| \___/\/ \____\___/|_| |_|\__|_| \___/|_| |____/
|
|
133
195
|
|/
|
|
134
196
|
|
|
135
|
-
for Python (RTB==1.1
|
|
197
|
+
for Python (RTB==1.3.1, MVTB==2.3.0, SG==1.3.0, SMTB==1.1.16, NumPy==2.5.2, SciPy==1.18.0, Matplotlib==3.11.1)
|
|
136
198
|
|
|
137
199
|
import math
|
|
138
200
|
import numpy as np
|
|
@@ -156,13 +218,10 @@ for Python (RTB==1.1.0, MVTB==0.9.5, SG==1.1.7, SMTB==1.1.7, NumPy==1.24.2, SciP
|
|
|
156
218
|
func/object?? - show source code
|
|
157
219
|
|
|
158
220
|
Results of assignments will be displayed, use trailing ; to suppress
|
|
159
|
-
|
|
160
|
-
Python 3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:24:27) [Clang 14.0.6 ]
|
|
161
|
-
Type 'copyright', 'credits' or 'license' for more information
|
|
162
|
-
IPython 8.11.0 -- An enhanced Interactive Python. Type '?' for help.
|
|
163
221
|
|
|
222
|
+
Default numeric formatting: %.3g
|
|
164
223
|
|
|
165
|
-
>>>
|
|
224
|
+
RVC3 >>>
|
|
166
225
|
```
|
|
167
226
|
|
|
168
227
|
This provides an interactive Python
|
|
@@ -174,7 +233,7 @@ For example to load an ETS model of a Panda robot, solve a forward kinematics
|
|
|
174
233
|
and inverse kinematics problem, and an interactive graphical display is simply:
|
|
175
234
|
|
|
176
235
|
```python
|
|
177
|
-
>>> panda = models.ETS.Panda()
|
|
236
|
+
RVC3 >>> panda = models.ETS.Panda()
|
|
178
237
|
ERobot: Panda (by Franka Emika), 7 joints (RRRRRRR)
|
|
179
238
|
┌─────┬───────┬───────┬────────┬─────────────────────────────────────────────┐
|
|
180
239
|
│link │ link │ joint │ parent │ ETS: parent to link │
|
|
@@ -196,34 +255,34 @@ ERobot: Panda (by Franka Emika), 7 joints (RRRRRRR)
|
|
|
196
255
|
│ qz │ 0° │ 0° │ 0° │ 0° │ 0° │ 0° │ 0° │
|
|
197
256
|
└─────┴─────┴────────┴─────┴───────┴─────┴───────┴──────┘
|
|
198
257
|
|
|
199
|
-
>>> panda.fkine(panda.qz)
|
|
258
|
+
RVC3 >>> panda.fkine(panda.qz)
|
|
200
259
|
0.7071 0.7071 0 0.088
|
|
201
260
|
0.7071 -0.7071 0 0
|
|
202
261
|
0 0 -1 0.823
|
|
203
262
|
0 0 0 1
|
|
204
|
-
>>> panda.ikine_LM(SE3.Trans(0.4, 0.5, 0.2) * SE3.Ry(pi/2))
|
|
263
|
+
RVC3 >>> panda.ikine_LM(SE3.Trans(0.4, 0.5, 0.2) * SE3.Ry(pi/2))
|
|
205
264
|
IKSolution(q=array([ -1.849, -2.576, -2.914, 1.22, -1.587, 2.056, -1.013]), success=True, iterations=13, searches=1, residual=3.3549072615799585e-10, reason='Success')
|
|
206
|
-
>>> panda.teach(panda.qz)
|
|
265
|
+
RVC3 >>> panda.teach(panda.qz)
|
|
207
266
|
```
|
|
208
267
|

|
|
209
268
|
|
|
210
269
|
Computer vision is just as easy. For example, we can import an image, blur it
|
|
211
270
|
and display it alongside the original
|
|
212
271
|
```python
|
|
213
|
-
>>> mona = Image.Read("monalisa.png")
|
|
214
|
-
>>> Image.Hstack([mona, mona.smooth(sigma=5)]).disp()
|
|
272
|
+
RVC3 >>> mona = Image.Read("monalisa.png")
|
|
273
|
+
RVC3 >>> Image.Hstack([mona, mona.smooth(sigma=5)]).disp()
|
|
215
274
|
```
|
|
216
|
-

|
|
217
276
|
|
|
218
277
|
or load two images of the same scene, compute SIFT features and display putative
|
|
219
278
|
matches
|
|
220
279
|
```python
|
|
221
|
-
>>> sf1 = Image.Read("eiffel-1.png", mono=True).SIFT()
|
|
222
|
-
>>> sf2 = Image.Read("eiffel-2.png", mono=True).SIFT()
|
|
223
|
-
>>> matches = sf1.match(sf2)
|
|
224
|
-
>>> matches.subset(100).plot("w")
|
|
280
|
+
RVC3 >>> sf1 = Image.Read("eiffel-1.png", mono=True).SIFT()
|
|
281
|
+
RVC3 >>> sf2 = Image.Read("eiffel-2.png", mono=True).SIFT()
|
|
282
|
+
RVC3 >>> matches = sf1.match(sf2)
|
|
283
|
+
RVC3 >>> matches.subset(100).plot("w")
|
|
225
284
|
```
|
|
226
|
-

|
|
227
286
|
|
|
228
287
|
`rvctool` is a wrapper around
|
|
229
288
|
[IPython](https://ipython.readthedocs.io/en/stable) where:
|
|
@@ -231,8 +290,10 @@ matches
|
|
|
231
290
|
package prefixes
|
|
232
291
|
- results are displayed by default like MATLAB does, and like MATLAB you need to
|
|
233
292
|
put a semicolon on the end of the line to prevent this
|
|
234
|
-
- the prompt is
|
|
235
|
-
prompt
|
|
293
|
+
- the prompt is `RVC3 >>> ` by default, distinct from a plain Python or
|
|
294
|
+
IPython prompt so a transcript is recognisable at a glance; override it
|
|
295
|
+
with `--prompt`, or pass `--book` to match the book's printed transcripts
|
|
296
|
+
exactly (plain `>>> `, no `Out[N]:` labels, no ANSI matrix colouring)
|
|
236
297
|
- allows cutting and pasting in lines from the book, and prompt characters are
|
|
237
298
|
ignored
|
|
238
299
|
|
|
@@ -273,14 +334,10 @@ IKSolution(q=array([7.235e-08, -0.8335, 0.09396, 3.142, 0.8312, -3.142]
|
|
|
273
334
|
array([7.235e-08, -0.8335, 0.09396, 3.142, 0.8312, -3.142])
|
|
274
335
|
PyPlot3D backend, t = 0.05, scene:
|
|
275
336
|
robot: Text(0.0, 0.0, 'Puma 560')
|
|
276
|
-
>>>
|
|
337
|
+
RVC3 >>>
|
|
277
338
|
```
|
|
278
339
|
and you are dropped into an IPython session after the script has run.
|
|
279
340
|
|
|
280
|
-
## Issues running on Apple Silicon
|
|
281
|
-
|
|
282
|
-
Check out the [wiki page](https://github.com/petercorke/RVC3-python/wiki/Running-on-Apple-Silicon).
|
|
283
|
-
|
|
284
341
|
## Using Jupyter and Colab
|
|
285
342
|
|
|
286
343
|
Graphics and animations are problematic in these environments, some things work
|
|
@@ -299,54 +356,37 @@ Additional command line tools available (from the Robotics Toolbox) include:
|
|
|
299
356
|
- `twistdemo`, Swift visualization that lets you experiment with 3D twists. The screw axis is the blue rod and you can
|
|
300
357
|
position and orient it using the sliders, and adjust its pitch. Then apply a rotation
|
|
301
358
|
about the screw using the bottom slider.
|
|
302
|
-
|
|
359
|
+
## Block diagram models
|
|
303
360
|
|
|
304
361
|
<a href="https://github.com/petercorke/bdsim"><img
|
|
305
|
-
src="https://github.com/petercorke/bdsim/raw/
|
|
362
|
+
src="https://github.com/petercorke/bdsim/raw/main/docs/figs/bdsim_logo.png"
|
|
306
363
|
alt="bdsim logo" width="300"></a>
|
|
307
364
|
|
|
308
365
|
Block diagram models are key to the pedagogy of the RVC3 book and 25 models are
|
|
309
366
|
included. To simulate these models we use the Python package
|
|
310
367
|
[bdsim](https://github.com/petercorke/bdsim) which can run models:
|
|
311
368
|
|
|
312
|
-
- written in Python using
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
```python
|
|
323
|
-
>>> %run -
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
<img src="https://github.com/petercorke/RVC3-python/raw/main/doc/frontcover.png" alt="Front cover 978-3-031-06468-5_5208" width="100">
|
|
338
|
-
|
|
339
|
-
This GitHub repo provides additional resources for readers including:
|
|
340
|
-
- Jupyter notebooks containing all code lines from each chapter, see
|
|
341
|
-
the [`notebooks`](notebooks) folder
|
|
342
|
-
- The code to produce every Python/Matplotlib (2D) figure in the book, see the [`figures`](figures) folder
|
|
343
|
-
- 3D points clouds from chapter 14, and the code to create them, see
|
|
344
|
-
the [`pointclouds`](../pointclouds) folder.
|
|
345
|
-
- 3D figures from chapters 2-3, 7-9, and the code to create them, see the [`3dfigures`](../3dfigures) folder.
|
|
346
|
-
- All example scripts, see the [`examples`](examples) folder.
|
|
347
|
-
- 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).
|
|
348
|
-
|
|
349
|
-
To get that material you must clone the repo
|
|
350
|
-
```shell
|
|
351
|
-
git clone https://github.com/petercorke/RVC3-python.git
|
|
352
|
-
```
|
|
369
|
+
- written in Python using [bdsim](https://github.com/petercorke/bdsim) blocks
|
|
370
|
+
and wiring.
|
|
371
|
+
- created graphically using `bdedit`, bdsim's graphical editor, and saved as
|
|
372
|
+
a `.bd` (JSON format) file.
|
|
373
|
+
|
|
374
|
+
The models are included in the `RVC3` package when it is installed. There
|
|
375
|
+
are three ways to run one:
|
|
376
|
+
|
|
377
|
+
- From inside `rvctool` (or any Jupyter notebook), `%run -i` shares the
|
|
378
|
+
current namespace, which some models rely on:
|
|
379
|
+
```python
|
|
380
|
+
RVC3 >>> %run -i vloop_test
|
|
381
|
+
```
|
|
382
|
+
- From a bare shell, the `rvc3-model` command runs a model directly —
|
|
383
|
+
no `rvctool`/Jupyter session needed:
|
|
384
|
+
```shell
|
|
385
|
+
$ rvc3-model vloop_test
|
|
386
|
+
```
|
|
387
|
+
Run `rvc3-model` with no arguments to list every model by name.
|
|
388
|
+
- To find where the models are installed on disk (e.g. to open a `.py` or
|
|
389
|
+
`.bd` file directly in an editor), use `bdsim_path`:
|
|
390
|
+
```shell
|
|
391
|
+
$ bdsim_path
|
|
392
|
+
```
|