Skip to content

Commit bcd2b04

Browse files
committed
Merge branch 'master' of github.com:petercorke/robotics-toolbox-python
2 parents 3d71e52 + 544f1c8 commit bcd2b04

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+10207
-2380
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
1515
matrix:
16-
os: [windows-latest, ubuntu-latest, macos-latest]
17-
python-version: [3.6, 3.7, 3.8]
16+
#os: [windows-latest, ubuntu-latest, macos-latest]
17+
#python-version: [3.6, 3.7, 3.8]
18+
os: [ubuntu-latest]
19+
python-version: [3.8]
1820

1921
steps:
2022
- uses: actions/checkout@v2
@@ -29,7 +31,15 @@ jobs:
2931
run: |
3032
pip install .[dev,collision,vpython]
3133
pip install pytest-timeout
32-
pytest --timeout=30 --timeout_method thread
34+
echo "========================"
35+
pwd -L
36+
pwd -P
37+
printenv
38+
echo "============ ls -R /opt ============"
39+
ls -R /opt/hostedtoolcache/Python/3.8.6/x64/lib/python3.8/site-packages/roboticstoolbox
40+
echo "============ ls -R . ============"
41+
ls -R .
42+
pytest --timeout=30 --timeout_method thread -s
3343
codecov:
3444
# If all tests pass:
3545
# Run coverage and upload to codecov

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
[![Build Status](https://github.com/petercorke/robotics-toolbox-python/workflows/build/badge.svg?branch=master)](https://github.com/petercorke/robotics-toolbox-python/actions?query=workflow%3Abuild)
1010
[![Coverage](https://codecov.io/gh/petercorke/robotics-toolbox-python/branch/master/graph/badge.svg)](https://codecov.io/gh/petercorke/robotics-toolbox-python)
1111
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/petercorke/robotics-toolbox-python.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/petercorke/robotics-toolbox-python/context:python)
12-
![pypi downloads](https://img.shields.io/pypi/dw/roboticstoolbox-python)
13-
12+
[![PyPI - Downloads](https://img.shields.io/pypi/dw/roboticstoolbox-python)](https://pypistats.org/packages/roboticstoolbox-python)
1413

1514
<table style="border:0px">
1615
<tr style="border:0px">
@@ -230,6 +229,16 @@ The toolbox is incredibly useful for developing and prototyping algorithms for r
230229

231230
### Publication List
232231

232+
**NEO: A Novel Expeditious Optimisation Algorithm for Reactive Motion Control of Manipulators**, J. Haviland and P. Corke. In the video, the robot is controlled using the Robotics toolbox for Python and features a recording from the [Swift](https://github.com/jhavl/swift) Simulator.
233+
234+
[[Paper](https://arxiv.org/abs/2010.08686)] [[Project Website](https://jhavl.github.io/neo/)] [[Video](https://youtu.be/jSLPJBr8QTY)] [[Code Example](https://github.com/petercorke/robotics-toolbox-python/blob/master/examples/neo.py)]
235+
236+
<p>
237+
<a href="https://youtu.be/jSLPJBr8QTY">
238+
<img src="https://github.com/petercorke/robotics-toolbox-python/blob/master/docs/figs/neo_youtube.png" width="560">
239+
</a>
240+
</p>
241+
233242
**A Purely-Reactive Manipulability-Maximising Motion Controller**, J. Haviland and P. Corke. In the video, the robot is controlled using the Robotics toolbox for Python.
234243

235244
[[Paper](https://arxiv.org/abs/2002.11901)] [[Project Website](https://jhavl.github.io/mmc/)] [[Video](https://youtu.be/Vu_rcPlaADI)] [[Code Example](https://github.com/petercorke/robotics-toolbox-python/blob/master/examples/mmc.py)]
@@ -242,12 +251,4 @@ The toolbox is incredibly useful for developing and prototyping algorithms for r
242251

243252
<br>
244253

245-
**NEO: A Novel Expeditious Optimisation Algorithm for Reactive Motion Control of Manipulators**, J. Haviland and P. Corke. In the video, the robot is controlled using the Robotics toolbox for Python and features a recording from the [Swift](https://github.com/jhavl/swift) Simulator.
246254

247-
[[Paper](https://arxiv.org/abs/2010.08686)] [[Project Website](https://jhavl.github.io/neo/)] [[Video](https://youtu.be/jSLPJBr8QTY)] [[Code Example](https://github.com/petercorke/robotics-toolbox-python/blob/master/examples/neo.py)]
248-
249-
<p>
250-
<a href="https://youtu.be/jSLPJBr8QTY">
251-
<img src="https://github.com/petercorke/robotics-toolbox-python/blob/master/docs/figs/neo_youtube.png" width="560">
252-
</a>
253-
</p>

docs/source/_static/css/custom.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
.viewcode-block {background-color: yellow;}
2+
3+
/* override table width restrictions */
4+
@media screen and (min-width: 767px) {
5+
6+
.wy-table-responsive table td {
7+
/* !important prevents the common CSS stylesheets from overriding
8+
this as on RTD they are loaded after this stylesheet */
9+
white-space: normal !important;
10+
}
11+
12+
.wy-table-responsive {
13+
overflow: visible !important;
14+
}
15+
}

docs/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@
9696
# relative to this directory. They are copied after the builtin static files,
9797
# so a file named "default.css" will overwrite the builtin "default.css".
9898
html_static_path = ['_static']
99-
# html_css_files = [
100-
# 'css/custom.css',
101-
# ]
99+
html_css_files = [
100+
'css/custom.css',
101+
]
102102
# autodoc_mock_imports = ["numpy", "scipy"]
103103

104104

docs/source/intro.rst

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ Introduction
66
Introduction
77
============
88

9-
The Robotics Toolbox for MATLAB® (RTB-M) was created around 1991 to support the
10-
first author’s PhD research and was first published in 1995-6 [Corke95]_
9+
*This is a modified version of a paper submitted to ICRA2020*
10+
11+
The Robotics Toolbox for MATLAB® (RTB-M) was created around 1991 to support
12+
Peter Corke’s PhD research and was first published in 1995-6 [Corke95]_
1113
[Corke96]_. It has evolved over 25 years to track changes and improvements to
1214
the MATLAB language and ecosystem, such as the addition of structures, objects,
1315
lists (cell arrays) and strings, myriad of other improvements to the language,
@@ -297,13 +299,16 @@ We can now easily perform standard kinematic operations
297299
>>> print(puma.qr)
298300
>>> T = puma.fkine([0.1, 0.2, 0.3, 0.4, 0.5, 0.6]) # forward kinematics
299301
>>> print(T)
300-
>>> q, *_ = puma.ikine(T) # inverse kinematics
301-
>>> print(q)
302+
>>> sol = puma.ikine_LM(T) # inverse kinematics
303+
>>> print(sol)
302304

303305
The Toolbox supports named joint configurations and these are shown in the table
304-
at lines ??.
306+
at lines 16-22.
307+
308+
``ikine_LM`` is a generalised iterative numerical solution based on
309+
Levenberg-Marquadt minimization, and additional status results are also
310+
returned as part of a named tuple.
305311

306-
``ikine`` is a generalised iterative numerical solution based on Levenberg-Marquadt minimization, and additional status results are also returned.
307312
The default plot method::
308313

309314
>>> puma.plot(q)
@@ -362,7 +367,7 @@ or pure rotation -- each with either a constant parameter or a free parameter wh
362367
>>> robot = rtb.ERobot(e)
363368
>>> print(robot)
364369

365-
Line 3 defines the unique lengths of the Puma robot, and line ?? defines the kinematic chain in
370+
Line 3 defines the unique lengths of the Puma robot, and line 4 defines the kinematic chain in
366371
terms of elementary transforms.
367372
In line 7 we pass this to the constructor for an ``ERobot`` which partitions the
368373
elementary transform sequence into a series of links and joints -- link frames are declared
@@ -382,7 +387,7 @@ Provided models, such as for Panda or Puma, are again encapsulated as classes:
382387
.. runblock:: pycon
383388

384389
>>> import roboticstoolbox as rtb
385-
>>> panda = rtb.models.URDF.Panda()
390+
>>> panda = rtb.models.DH.Panda()
386391
>>> print(panda)
387392
>>> T = panda.fkine(panda.qz)
388393
>>> print(T)
@@ -391,6 +396,21 @@ and kinematic operations are performed using methods with the same name
391396
as discussed above.
392397
For branched robots, with multiple end-effectors, the name of the frame of interest must be provided.
393398

399+
Some URDF models have multiple end-effectors, in which case the particular
400+
end-effector must be specified.
401+
402+
.. runblock:: pycon
403+
404+
>>> import roboticstoolbox as rtb
405+
>>> panda = rtb.models.URDF.Panda()
406+
>>> print(panda)
407+
>>> T = panda.fkine(panda.qz, endlink='panda_hand')
408+
>>> print(T)
409+
410+
In the table above we see the end-effectors indicated by @ (determined automatically
411+
from the URDF file), so we specify one of these. We can also specify any
412+
other link in order to determine the pose of that link's coordinate frame.
413+
394414
This URDF model comes with meshes provided as Collada file which provide
395415
detailed geometry and color. This can be visualized using the Swift simulator:
396416

@@ -411,7 +431,7 @@ Animations can be recorded as MP4 files or animated GIF files which are useful f
411431
Trajectories
412432
============
413433

414-
A joint-spae trajectory for the Puma robot from its zero angle
434+
A joint-space trajectory for the Puma robot from its zero angle
415435
pose to the upright (or READY) pose in 100 steps is
416436

417437
.. runblock:: pycon
@@ -449,17 +469,21 @@ two points specified by a pair of poses in :math:`\SE{3}`
449469
>>> T1 = SE3(0.4, 0.5, 0.2)
450470
>>> Ts = rtb.tools.trajectory.ctraj(T0, T1, len(t))
451471
>>> len(Ts)
452-
>>> qs, *_ = puma.ikine(Ts)
453-
>>> qs.shape
472+
>>> sol = puma.ikine_LM(Ts) # array of named tuples
473+
>>> qt = np.array([x.q for x in sol]) # convert to 2d matrix
474+
>>> qt.shape
454475

455476
At line 9 we see that the resulting trajectory, ``Ts``, is an ``SE3`` instance with 200 values.
456477

457478
At line 11 we compute the inverse kinematics of each pose in the trajectory
458-
using a single call to the ``ikine`` method.
459-
At line 13 we see that the result ``qs`` is is an array of joint coordinates, one row per timestep.
460-
In this case the starting
479+
using a single call to the ``ikine_LM`` method.
480+
The result is a list of named tuples, which gives the IK success status for
481+
each time step.
482+
At line 12 we convert this into an array, with one row per time step, and each
483+
row is a joint coordinate.
484+
The starting
461485
joint coordinates for each inverse kinematic solution
462-
is taken as the result of the previous solution.
486+
is taken as the result of the solution at the previous time step.
463487

464488

465489
Symbolic manipulation
@@ -472,7 +496,7 @@ As mentioned earlier, the Toolbox supports symbolic manipulation using SymPy. Fo
472496
>>> import roboticstoolbox as rtb
473497
>>> import spatialmath.base as base
474498
>>> phi, theta, psi = base.sym.symbol('phi, theta, psi')
475-
>>> rtb.rpy2r(phi, theta, psi)
499+
>>> base.rpy2r(phi, theta, psi)
476500

477501
The capability extends to forward kinematics
478502

@@ -529,7 +553,7 @@ For all robot classes we can compute manipulability
529553
>>> puma = rtb.models.DH.Puma560()
530554
>>> m = puma.manipulability(puma.qn)
531555
>>> print("Yoshikawa manipulability is", m)
532-
>>> m = puma.manipulability(puma.qn, "asada")
556+
>>> m = puma.manipulability(puma.qn, method="asada")
533557
>>> print("Asada manipulability is", m)
534558

535559
for the Yoshikawa and Asada measures respectively, and

docs/source/mobile.rst

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,13 @@ Mobile robots
33
*************
44

55

6-
Vehicle models
7-
--------------
6+
The Robotics Toolbox supports kino-dynamic vehicle models, animation, planning
7+
and state estimation.
88

9-
.. automodule:: roboticstoolbox.robot.ETS
10-
:members:
11-
:undoc-members:
12-
:show-inheritance:
13-
:inherited-members:
14-
:special-members:
15-
:exclude-members: count, index, sort, remove, __dict__, __weakref__, __add__, __init__, __repr__, __str__, __module__
9+
.. toctree::
10+
:maxdepth: 2
1611

17-
Path planning
18-
-------------
19-
20-
21-
EKF
22-
---
12+
mobile_vehicle
13+
mobile_vehicle_animation
14+
mobile_planner
15+
mobile_EKF

docs/source/mobile_planner.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Mobile robot planner
2+
--------------------
3+
4+
.. autoclass:: roboticstoolbox.mobile.Bug2
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:
8+
:inherited-members:
9+
10+
.. autoclass:: roboticstoolbox.mobile.DXform
11+
:members:
12+
:undoc-members:
13+
:show-inheritance:
14+
:inherited-members:
15+
16+
.. autoclass:: roboticstoolbox.mobile.Dstar
17+
:members:
18+
:undoc-members:
19+
:show-inheritance:
20+
:inherited-members:

docs/source/mobile_vehicle.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Mobile robot kinematic models
2+
=============================
3+
4+
Bicycle model
5+
^^^^^^^^^^^^^
6+
7+
.. autoclass:: roboticstoolbox.mobile.Bicycle
8+
:members:
9+
:undoc-members:
10+
:inherited-members:
11+
:special-members: __init__
12+
13+
Unicycle model
14+
^^^^^^^^^^^^^^
15+
16+
.. autoclass:: roboticstoolbox.mobile.Unicycle
17+
:members:
18+
:undoc-members:
19+
:show-inheritance:
20+
:inherited-members:
21+
:special-members: __init__
22+
23+
24+
Superclass
25+
^^^^^^^^^^
26+
27+
.. autoclass:: roboticstoolbox.mobile.Vehicle
28+
:members:
29+
:undoc-members:
30+
:show-inheritance:
31+
:inherited-members:
32+
:special-members: __init__
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Mobile robot animations
2+
-----------------------
3+
4+
These classes create a graphical object that can be animated to show vehicle
5+
position or pose. They are all subclasses of ``VehicleAnimation``.
6+
7+
8+
Simple marker
9+
^^^^^^^^^^^^^
10+
11+
.. autoclass:: roboticstoolbox.mobile.VehicleMarker
12+
:members:
13+
:undoc-members:
14+
:show-inheritance:
15+
:inherited-members:
16+
:special-members: __init__
17+
18+
Polygon shape
19+
^^^^^^^^^^^^^
20+
21+
.. autoclass:: roboticstoolbox.mobile.VehiclePolygon
22+
:members:
23+
:undoc-members:
24+
:show-inheritance:
25+
:inherited-members:
26+
:special-members: __init__
27+
28+
Image icon
29+
^^^^^^^^^^
30+
31+
.. autoclass:: roboticstoolbox.mobile.VehicleIcon
32+
:members:
33+
:undoc-members:
34+
:show-inheritance:
35+
:inherited-members:
36+
:special-members: __init__
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Bicycle model
2+
-------------
3+
4+
.. autoclass:: roboticstoolbox.mobile.Bicycle
5+
:members:
6+
:undoc-members:
7+
:inherited-members:
8+
:special-members: __init__

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy