rvc3python 0.9.1__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.1/rvc3python.egg-info → rvc3python-1.0.0}/PKG-INFO +130 -89
- {rvc3python-0.9.1 → rvc3python-1.0.0}/README.md +110 -81
- rvc3python-1.0.0/RVC3/bin/_bintools.py +61 -0
- {rvc3python-0.9.1 → 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.1 → rvc3python-1.0.0}/RVC3/examples/imu_data.py +9 -9
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/examples/mosaic.py +8 -13
- rvc3python-1.0.0/RVC3/examples/visodom.py +190 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/IBVS-arm-main.py +2 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/IBVS-holonomic-main.py +1 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/IBVS-holonomic.bd +1 -1
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/IBVS-main.py +2 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/IBVS-nonholonomic-main.py +1 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/IBVS-nonholonomic.bd +8 -8
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/IBVS-partitioned-main.py +2 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/IBVS-quadrotor-main.py +2 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/IBVS-quadrotor.bd +2 -2
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/RRMC.py +2 -2
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/RRMC2.py +2 -2
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/__init__.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/braitenberg.py +1 -1
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/driveconfig.py +1 -1
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/drivepursuit.py +3 -3
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/feedforward-main.py +1 -1
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/jointspace.py +1 -1
- rvc3python-1.0.0/RVC3/tools/pvplus.py +441 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/pyproject.toml +18 -9
- {rvc3python-0.9.1 → rvc3python-1.0.0/rvc3python.egg-info}/PKG-INFO +130 -89
- {rvc3python-0.9.1 → rvc3python-1.0.0}/rvc3python.egg-info/SOURCES.txt +7 -3
- {rvc3python-0.9.1 → 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.1/MANIFEST.in +0 -17
- rvc3python-0.9.1/RVC3/bin/rvctool.py +0 -354
- rvc3python-0.9.1/RVC3/examples/visodom.py +0 -132
- rvc3python-0.9.1/Untitled.ipynb +0 -6
- rvc3python-0.9.1/rvc3python.egg-info/requires.txt +0 -11
- {rvc3python-0.9.1 → rvc3python-1.0.0}/LICENSE +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/__init__.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/bin/__init__.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/examples/__init__.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/examples/hershey/genhershey.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/examples/hershey/hershey.json +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/examples/hershey/hershey.txt +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/examples/hershey/roman-plain.txt +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/examples/hershey/roman-simplex.txt +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/examples/hershey/roman-triplex.txt +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/examples/ransac_line.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/examples/walking.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/examples/writing.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/IBVS-arm.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/IBVS-partitioned.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/IBVS.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/RRMC.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/RRMC2.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/SEA-main.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/SEA.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/SEA.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/braitenberg.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/cartspace.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/computed-torque-main.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/computed-torque.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/driveconfig.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/driveline.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/driveline.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/drivepoint.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/drivepoint.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/drivepursuit.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/feedforward.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/jointspace.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/lanechange.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/lanechange.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/opspace-main.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/opspace.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/opspace.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/ploop.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/ploop.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/ploop_test.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/ploop_test.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/quad_model.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/quadrotor-main.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/quadrotor.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/quadrotor.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/vloop.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/vloop.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/vloop_test.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/vloop_test.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/zerotorque.bd +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/models/zerotorque.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/tools/__init__.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/RVC3/tools/rvcprint.py +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/rvc3python.egg-info/dependency_links.txt +0 -0
- {rvc3python-0.9.1 → rvc3python-1.0.0}/rvc3python.egg-info/top_level.txt +0 -0
- {rvc3python-0.9.1 → 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,36 +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
|
|
23
|
+
Requires-Dist: numpy>1
|
|
24
24
|
Requires-Dist: roboticstoolbox-python>=1
|
|
25
25
|
Requires-Dist: machinevision-toolbox-python
|
|
26
|
-
Requires-Dist: bdsim
|
|
26
|
+
Requires-Dist: bdsim
|
|
27
27
|
Requires-Dist: IPython
|
|
28
|
+
Requires-Dist: ipykernel
|
|
29
|
+
Requires-Dist: ipympl
|
|
28
30
|
Requires-Dist: sympy
|
|
29
|
-
Requires-Dist: pybullet
|
|
30
31
|
Provides-Extra: pytorch
|
|
31
32
|
Requires-Dist: torch; extra == "pytorch"
|
|
32
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
|
|
33
45
|
|
|
34
46
|
# Robotics, Vision & Control: 3rd edition in Python (2023)
|
|
35
|
-
[](https://github.com/petercorke/robotics-toolbox-python)
|
|
36
|
-
[](https://qcr.github.io)
|
|
37
|
-
[](https://opensource.org/licenses/MIT)
|
|
38
47
|
|
|
48
|
+
### Status & Project Health
|
|
39
49
|
[](https://badge.fury.io/py/rvc3python)
|
|
50
|
+
[](https://pepy.tech/projects/rvc3python)
|
|
40
51
|

|
|
41
|
-
[](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.
|
|
42
64
|
|
|
43
65
|
<table style="border:0px">
|
|
44
66
|
<tr style="border:0px">
|
|
@@ -65,9 +87,9 @@ Welcome to the online hub for the book:
|
|
|
65
87
|
This book uses many examples based on the following open-source Python packages
|
|
66
88
|
|
|
67
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>
|
|
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/
|
|
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>
|
|
69
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>
|
|
70
|
-
<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>
|
|
71
93
|
|
|
72
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
|
|
73
95
|
third parties.
|
|
@@ -86,14 +108,35 @@ conda install rvc3python
|
|
|
86
108
|
There are a lot of dependencies and this might take a minute or so. You now have a very
|
|
87
109
|
powerful computing environment for robotics and computer vision.
|
|
88
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
|
+
|
|
89
125
|
### Python version
|
|
90
126
|
|
|
91
|
-
|
|
92
|
-
least Python 3.8. Python 3.7 goes end of life in June 2023.
|
|
127
|
+
`rvc3python` requires **Python 3.10 or later**.
|
|
93
128
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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.
|
|
97
140
|
|
|
98
141
|
### Installing into a Conda environment
|
|
99
142
|
|
|
@@ -102,14 +145,14 @@ and its dependencies separated from your other Python code and projects. If you
|
|
|
102
145
|
never used virtual environments before this might be a good time to start, and it
|
|
103
146
|
is really easy [using Conda](https://conda.io/projects/conda/en/latest/user-guide/install/index.html):
|
|
104
147
|
```shell
|
|
105
|
-
conda create -n RVC3 python=3.
|
|
148
|
+
conda create -n RVC3 python=3.12
|
|
106
149
|
conda activate RVC3
|
|
107
150
|
pip install rvc3python
|
|
108
151
|
```
|
|
109
152
|
|
|
110
153
|
### Installing deep learning tools
|
|
111
154
|
|
|
112
|
-
Chapter
|
|
155
|
+
Chapter 12 has some deep learning examples based on PyTorch. If you don't have
|
|
113
156
|
PyTorch installed you can use the `pytorch` install option
|
|
114
157
|
```shell
|
|
115
158
|
pip install rvc3python[pytorch]
|
|
@@ -118,6 +161,26 @@ or
|
|
|
118
161
|
```shell
|
|
119
162
|
conda install rvc3python
|
|
120
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
|
+
|
|
121
184
|
## Using the Toolboxes
|
|
122
185
|
|
|
123
186
|
The simplest way to get going is to use the command line tool
|
|
@@ -131,7 +194,7 @@ $ rvctool
|
|
|
131
194
|
|_| \_\___/|_.__/ \___/ \__|_|\___|___( ) \_/ |_|___/_|\___/|_| |_| \___/\/ \____\___/|_| |_|\__|_| \___/|_| |____/
|
|
132
195
|
|/
|
|
133
196
|
|
|
134
|
-
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)
|
|
135
198
|
|
|
136
199
|
import math
|
|
137
200
|
import numpy as np
|
|
@@ -155,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
|
|
|
155
218
|
func/object?? - show source code
|
|
156
219
|
|
|
157
220
|
Results of assignments will be displayed, use trailing ; to suppress
|
|
158
|
-
|
|
159
|
-
Python 3.10.9 | packaged by conda-forge | (main, Feb 2 2023, 20:24:27) [Clang 14.0.6 ]
|
|
160
|
-
Type 'copyright', 'credits' or 'license' for more information
|
|
161
|
-
IPython 8.11.0 -- An enhanced Interactive Python. Type '?' for help.
|
|
162
221
|
|
|
222
|
+
Default numeric formatting: %.3g
|
|
163
223
|
|
|
164
|
-
>>>
|
|
224
|
+
RVC3 >>>
|
|
165
225
|
```
|
|
166
226
|
|
|
167
227
|
This provides an interactive Python
|
|
@@ -173,7 +233,7 @@ For example to load an ETS model of a Panda robot, solve a forward kinematics
|
|
|
173
233
|
and inverse kinematics problem, and an interactive graphical display is simply:
|
|
174
234
|
|
|
175
235
|
```python
|
|
176
|
-
>>> panda = models.ETS.Panda()
|
|
236
|
+
RVC3 >>> panda = models.ETS.Panda()
|
|
177
237
|
ERobot: Panda (by Franka Emika), 7 joints (RRRRRRR)
|
|
178
238
|
┌─────┬───────┬───────┬────────┬─────────────────────────────────────────────┐
|
|
179
239
|
│link │ link │ joint │ parent │ ETS: parent to link │
|
|
@@ -195,34 +255,34 @@ ERobot: Panda (by Franka Emika), 7 joints (RRRRRRR)
|
|
|
195
255
|
│ qz │ 0° │ 0° │ 0° │ 0° │ 0° │ 0° │ 0° │
|
|
196
256
|
└─────┴─────┴────────┴─────┴───────┴─────┴───────┴──────┘
|
|
197
257
|
|
|
198
|
-
>>> panda.fkine(panda.qz)
|
|
258
|
+
RVC3 >>> panda.fkine(panda.qz)
|
|
199
259
|
0.7071 0.7071 0 0.088
|
|
200
260
|
0.7071 -0.7071 0 0
|
|
201
261
|
0 0 -1 0.823
|
|
202
262
|
0 0 0 1
|
|
203
|
-
>>> 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))
|
|
204
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')
|
|
205
|
-
>>> panda.teach(panda.qz)
|
|
265
|
+
RVC3 >>> panda.teach(panda.qz)
|
|
206
266
|
```
|
|
207
267
|

|
|
208
268
|
|
|
209
269
|
Computer vision is just as easy. For example, we can import an image, blur it
|
|
210
270
|
and display it alongside the original
|
|
211
271
|
```python
|
|
212
|
-
>>> mona = Image.Read("monalisa.png")
|
|
213
|
-
>>> 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()
|
|
214
274
|
```
|
|
215
|
-

|
|
216
276
|
|
|
217
277
|
or load two images of the same scene, compute SIFT features and display putative
|
|
218
278
|
matches
|
|
219
279
|
```python
|
|
220
|
-
>>> sf1 = Image.Read("eiffel-1.png", mono=True).SIFT()
|
|
221
|
-
>>> sf2 = Image.Read("eiffel-2.png", mono=True).SIFT()
|
|
222
|
-
>>> matches = sf1.match(sf2)
|
|
223
|
-
>>> 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")
|
|
224
284
|
```
|
|
225
|
-

|
|
226
286
|
|
|
227
287
|
`rvctool` is a wrapper around
|
|
228
288
|
[IPython](https://ipython.readthedocs.io/en/stable) where:
|
|
@@ -230,8 +290,10 @@ matches
|
|
|
230
290
|
package prefixes
|
|
231
291
|
- results are displayed by default like MATLAB does, and like MATLAB you need to
|
|
232
292
|
put a semicolon on the end of the line to prevent this
|
|
233
|
-
- the prompt is
|
|
234
|
-
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)
|
|
235
297
|
- allows cutting and pasting in lines from the book, and prompt characters are
|
|
236
298
|
ignored
|
|
237
299
|
|
|
@@ -272,14 +334,10 @@ IKSolution(q=array([7.235e-08, -0.8335, 0.09396, 3.142, 0.8312, -3.142]
|
|
|
272
334
|
array([7.235e-08, -0.8335, 0.09396, 3.142, 0.8312, -3.142])
|
|
273
335
|
PyPlot3D backend, t = 0.05, scene:
|
|
274
336
|
robot: Text(0.0, 0.0, 'Puma 560')
|
|
275
|
-
>>>
|
|
337
|
+
RVC3 >>>
|
|
276
338
|
```
|
|
277
339
|
and you are dropped into an IPython session after the script has run.
|
|
278
340
|
|
|
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
341
|
## Using Jupyter and Colab
|
|
284
342
|
|
|
285
343
|
Graphics and animations are problematic in these environments, some things work
|
|
@@ -298,54 +356,37 @@ Additional command line tools available (from the Robotics Toolbox) include:
|
|
|
298
356
|
- `twistdemo`, Swift visualization that lets you experiment with 3D twists. The screw axis is the blue rod and you can
|
|
299
357
|
position and orient it using the sliders, and adjust its pitch. Then apply a rotation
|
|
300
358
|
about the screw using the bottom slider.
|
|
301
|
-
|
|
359
|
+
## Block diagram models
|
|
302
360
|
|
|
303
361
|
<a href="https://github.com/petercorke/bdsim"><img
|
|
304
|
-
src="https://github.com/petercorke/bdsim/raw/
|
|
362
|
+
src="https://github.com/petercorke/bdsim/raw/main/docs/figs/bdsim_logo.png"
|
|
305
363
|
alt="bdsim logo" width="300"></a>
|
|
306
364
|
|
|
307
365
|
Block diagram models are key to the pedagogy of the RVC3 book and 25 models are
|
|
308
366
|
included. To simulate these models we use the Python package
|
|
309
367
|
[bdsim](https://github.com/petercorke/bdsim) which can run models:
|
|
310
368
|
|
|
311
|
-
- written in Python using
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
```python
|
|
322
|
-
>>> %run -
|
|
323
|
-
```
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
<img src="https://github.com/petercorke/RVC3-python/raw/main/doc/frontcover.png" alt="Front cover 978-3-031-06468-5_5208" width="100">
|
|
337
|
-
|
|
338
|
-
This GitHub repo provides additional resources for readers including:
|
|
339
|
-
- Jupyter notebooks containing all code lines from each chapter, see
|
|
340
|
-
the [`notebooks`](notebooks) folder
|
|
341
|
-
- The code to produce every Python/Matplotlib (2D) figure in the book, see the [`figures`](figures) folder
|
|
342
|
-
- 3D points clouds from chapter 14, and the code to create them, see
|
|
343
|
-
the [`pointclouds`](../pointclouds) folder.
|
|
344
|
-
- 3D figures from chapters 2-3, 7-9, and the code to create them, see the [`3dfigures`](../3dfigures) folder.
|
|
345
|
-
- All example scripts, see the [`examples`](examples) folder.
|
|
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).
|
|
347
|
-
|
|
348
|
-
To get that material you must clone the repo
|
|
349
|
-
```shell
|
|
350
|
-
git clone https://github.com/petercorke/RVC3-python.git
|
|
351
|
-
```
|
|
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
|
+
```
|