Skip to content

Commit c0d7f4d

Browse files
committed
Merge branch 'future' of github.com:petercorke/robotics-toolbox-python into future
2 parents 45ab8a9 + 346ebcc commit c0d7f4d

File tree

10 files changed

+222
-128
lines changed

10 files changed

+222
-128
lines changed

docs/source/blocks-arm.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Robot manipulator blocks
2+
========================
3+
4+
.. image:: https://raw.githubusercontent.com/petercorke/bdsim/master/figs/BDSimLogo_NoBackgnd@2x.png
5+
:width: 300
6+
7+
.. automodule:: roboticstoolbox.blocks.arm
8+
:members:
9+
:undoc-members:
10+
:show-inheritance:
11+
:special-members: __init__
12+
:exclude-members: output, reset, step, start, done, deriv
13+

docs/source/blocks-mobile.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Mobile robot blocks
2+
===================
3+
4+
.. image:: https://raw.githubusercontent.com/petercorke/bdsim/master/figs/BDSimLogo_NoBackgnd@2x.png
5+
:width: 300
6+
7+
.. automodule:: roboticstoolbox.blocks.mobile
8+
:members:
9+
:undoc-members:
10+
:show-inheritance:
11+
:special-members: __init__
12+
:exclude-members: output, reset, step, start, done, deriv
13+
14+

docs/source/blocks-uav.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
UAV blocks
2+
==========
3+
4+
.. image:: https://raw.githubusercontent.com/petercorke/bdsim/master/figs/BDSimLogo_NoBackgnd@2x.png
5+
:width: 300
6+
7+
.. automodule:: roboticstoolbox.blocks.uav
8+
:members:
9+
:undoc-members:
10+
:show-inheritance:
11+
:special-members: __init__
12+
:exclude-members: output, reset, step, start, done, deriv
13+

docs/source/blocks.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
bdsim blocks
2+
============
3+
4+
.. image:: https://raw.githubusercontent.com/petercorke/bdsim/master/figs/BDSimLogo_NoBackgnd@2x.png
5+
:width: 400
6+
7+
A set of block definitions that provide robotic capability to `bdsim <https://github.com/petercorke/bdsim>`_.
8+
9+
.. toctree::
10+
:maxdepth: 2
11+
12+
blocks-arm
13+
blocks-mobile
14+
blocks-uav
15+

docs/source/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
import sphinx_rtd_theme
1717
import re
1818

19+
# defined relative to configuration directory which is where this file conf.py lives
20+
sys.path.append(os.path.abspath('exts'))
1921

2022
# -- Project information -----------------------------------------------------
2123

@@ -44,6 +46,7 @@
4446
'sphinx.ext.doctest',
4547
'sphinx.ext.inheritance_diagram',
4648
'sphinx_autorun',
49+
'blockname',
4750
]
4851

4952
autosummary_generate = True

docs/source/exts/blockname.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from docutils import nodes
2+
#from docutils.parsers.rst import Directive
3+
4+
5+
def block_name(name, rawtext, text, lineno, inliner, options={}, content=[]):
6+
7+
# name: The local name of the interpreted role, the role name actually used in the document.
8+
# rawtext: A string containing the enitre interpreted text input, including the role and markup. Return it as a problematic node linked to a system message if a problem is encountered.
9+
# text: The interpreted text content.
10+
# lineno: The line number where the interpreted text begins.
11+
# inliner: The docutils.parsers.rst.states.Inliner object that called role_fn. It contains the several attributes useful for error reporting and document tree access.
12+
# options: A dictionary of directive options for customization (from the "role" directive), to be interpreted by the role function. Used for additional attributes for the generated elements and other functionality.
13+
# content: A list of strings, the directive content for customization (from the "role" directive). To be interpreted by the role function.
14+
html_node = nodes.raw(text='<p style="border:10px; background-color:#000000; padding: 1em; color: white; font-size: 30px; font-weight: bold;">' + text + '</p>', format='html')
15+
return [html_node], []
16+
17+
18+
def setup(app):
19+
app.add_role("blockname", block_name)
20+
return {
21+
'version': '0.1',
22+
'parallel_read_safe': True,
23+
'parallel_write_safe': True,
24+
}

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ Robotics Toolbox for Python
1313
intro
1414
arm
1515
mobile
16-
16+
blocks

roboticstoolbox/blocks/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
from roboticstoolbox.blocks.arm import *
2-
from roboticstoolbox.blocks.mobile import *
3-
from roboticstoolbox.blocks.uav import *
1+
from .arm import *
2+
from .mobile import *
3+
from .uav import *

roboticstoolbox/blocks/arm.py

Lines changed: 95 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ class FKine(FunctionBlock):
2828
.. table::
2929
:align: left
3030
31-
+------------+---------+---------+
32-
| inputs | outputs | states |
33-
+------------+---------+---------+
34-
| 1 | 1 | 0 |
35-
+------------+---------+---------+
36-
| ndarray | SE3 | |
37-
+------------+---------+---------+
31+
+------------+---------+---------+
32+
| inputs | outputs | states |
33+
+------------+---------+---------+
34+
| 1 | 1 | 0 |
35+
+------------+---------+---------+
36+
| ndarray | SE3 | |
37+
+------------+---------+---------+
3838
"""
3939

4040
def __init__(self, robot=None, args={}, *inputs, **kwargs):
@@ -82,13 +82,13 @@ class IKine(FunctionBlock):
8282
.. table::
8383
:align: left
8484
85-
+------------+---------+---------+
86-
| inputs | outputs | states |
87-
+------------+---------+---------+
88-
| 1 | 1 | 0 |
89-
+------------+---------+---------+
90-
| SE3 | ndarray | |
91-
+------------+---------+---------+
85+
+------------+---------+---------+
86+
| inputs | outputs | states |
87+
+------------+---------+---------+
88+
| 1 | 1 | 0 |
89+
+------------+---------+---------+
90+
| SE3 | ndarray | |
91+
+------------+---------+---------+
9292
"""
9393

9494
def __init__(
@@ -167,13 +167,13 @@ class Jacobian(FunctionBlock):
167167
.. table::
168168
:align: left
169169
170-
+------------+---------+---------+
171-
| inputs | outputs | states |
172-
+------------+---------+---------+
173-
| 1 | 1 | 0 |
174-
+------------+---------+---------+
175-
| ndarray | ndarray | |
176-
+------------+---------+---------+
170+
+------------+---------+---------+
171+
| inputs | outputs | states |
172+
+------------+---------+---------+
173+
| 1 | 1 | 0 |
174+
+------------+---------+---------+
175+
| ndarray | ndarray | |
176+
+------------+---------+---------+
177177
"""
178178

179179
def __init__(
@@ -262,13 +262,13 @@ class Tr2Delta(FunctionBlock):
262262
.. table::
263263
:align: left
264264
265-
+------------+------------+---------+
266-
| inputs | outputs | states |
267-
+------------+------------+---------+
268-
| 2 | 1 | 0 |
269-
+------------+------------+---------+
270-
| SE3, SE3 | ndarray(6) | |
271-
+------------+------------+---------+
265+
+------------+------------+---------+
266+
| inputs | outputs | states |
267+
+------------+------------+---------+
268+
| 2 | 1 | 0 |
269+
+------------+------------+---------+
270+
| SE3, SE3 | ndarray(6) | |
271+
+------------+------------+---------+
272272
"""
273273

274274
def __init__(self, *inputs, **kwargs):
@@ -313,13 +313,13 @@ class Delta2Tr(FunctionBlock):
313313
.. table::
314314
:align: left
315315
316-
+------------+----------+---------+
317-
| inputs | outputs | states |
318-
+------------+----------+---------+
319-
| 1 | 1 | 0 |
320-
+------------+----------+---------+
321-
| ndarray(6) | SE3 | |
322-
+------------+----------+---------+
316+
+------------+----------+---------+
317+
| inputs | outputs | states |
318+
+------------+----------+---------+
319+
| 1 | 1 | 0 |
320+
+------------+----------+---------+
321+
| ndarray(6) | SE3 | |
322+
+------------+----------+---------+
323323
"""
324324

325325
def __init__(self, *inputs, **kwargs):
@@ -363,13 +363,13 @@ class Point2Tr(FunctionBlock):
363363
.. table::
364364
:align: left
365365
366-
+------------+----------+---------+
367-
| inputs | outputs | states |
368-
+------------+----------+---------+
369-
| 1 | 1 | 0 |
370-
+------------+----------+---------+
371-
| ndarray(3) | SE3 | |
372-
+------------+----------+---------+
366+
+------------+----------+---------+
367+
| inputs | outputs | states |
368+
+------------+----------+---------+
369+
| 1 | 1 | 0 |
370+
+------------+----------+---------+
371+
| ndarray(3) | SE3 | |
372+
+------------+----------+---------+
373373
"""
374374

375375
def __init__(self, T, *inputs, **kwargs):
@@ -415,13 +415,13 @@ class TR2T(FunctionBlock):
415415
.. table::
416416
:align: left
417417
418-
+------------+----------+---------+
419-
| inputs | outputs | states |
420-
+------------+----------+---------+
421-
| 1 | 3 | 0 |
422-
+------------+----------+---------+
423-
| SE3 | float | |
424-
+------------+----------+---------+
418+
+------------+----------+---------+
419+
| inputs | outputs | states |
420+
+------------+----------+---------+
421+
| 1 | 3 | 0 |
422+
+------------+----------+---------+
423+
| SE3 | float | |
424+
+------------+----------+---------+
425425
"""
426426

427427
def __init__(self, *inputs, **kwargs):
@@ -464,15 +464,15 @@ class FDyn(TransferBlock):
464464
.. table::
465465
:align: left
466466
467-
+------------+---------+---------+
468-
| inputs | outputs | states |
469-
+------------+---------+---------+
470-
| 1 | 3 | 0 |
471-
+------------+---------+---------+
472-
| ndarray | ndarray,| |
473-
| | ndarray,| |
474-
| | ndarray | |
475-
+------------+---------+---------+
467+
+------------+---------+---------+
468+
| inputs | outputs | states |
469+
+------------+---------+---------+
470+
| 1 | 3 | 0 |
471+
+------------+---------+---------+
472+
| ndarray | ndarray,| |
473+
| | ndarray,| |
474+
| | ndarray | |
475+
+------------+---------+---------+
476476
"""
477477

478478
def __init__(self, robot, *inputs, q0=None, **kwargs):
@@ -547,15 +547,15 @@ class IDyncs(FunctionBlock):
547547
.. table::
548548
:align: left
549549
550-
+------------+---------+---------+
551-
| inputs | outputs | states |
552-
+------------+---------+---------+
553-
| 3 | 1 | 0 |
554-
+------------+---------+---------+
555-
| ndarray, | ndarray | |
556-
| ndarray, | | |
557-
| ndarray | | |
558-
+------------+---------+---------+
550+
+------------+---------+---------+
551+
| inputs | outputs | states |
552+
+------------+---------+---------+
553+
| 3 | 1 | 0 |
554+
+------------+---------+---------+
555+
| ndarray, | ndarray | |
556+
| ndarray, | | |
557+
| ndarray | | |
558+
+------------+---------+---------+
559559
"""
560560

561561
def __init__(self, robot, *inputs, gravity=None, **kwargs):
@@ -611,13 +611,13 @@ class ArmPlot(GraphicsBlock):
611611
.. table::
612612
:align: left
613613
614-
+--------+---------+---------+
615-
| inputs | outputs | states |
616-
+--------+---------+---------+
617-
| 1 | 0 | 0 |
618-
+--------+---------+---------+
619-
| ndarray| | |
620-
+--------+---------+---------+
614+
+--------+---------+---------+
615+
| inputs | outputs | states |
616+
+--------+---------+---------+
617+
| 1 | 0 | 0 |
618+
+--------+---------+---------+
619+
| ndarray| | |
620+
+--------+---------+---------+
621621
"""
622622

623623
def __init__(self, robot=None, *inputs, q0=None, backend=None, **kwargs):
@@ -689,13 +689,13 @@ class Traj(FunctionBlock):
689689
.. table::
690690
:align: left
691691
692-
+------------+---------+---------+
693-
| inputs | outputs | states |
694-
+------------+---------+---------+
695-
| 0 or 1 | 1 | 0 |
696-
+------------+---------+---------+
697-
| float | float | |
698-
+------------+---------+---------+
692+
+------------+---------+---------+
693+
| inputs | outputs | states |
694+
+------------+---------+---------+
695+
| 0 or 1 | 1 | 0 |
696+
+------------+---------+---------+
697+
| float | float | |
698+
+------------+---------+---------+
699699
"""
700700

701701
def __init__(self, y0=0, yf=1, T=None, time=False, traj="lspb", *inputs, **kwargs):
@@ -795,13 +795,13 @@ class JTraj(SourceBlock):
795795
.. table::
796796
:align: left
797797
798-
+------------+------------+---------+
799-
| inputs | outputs | states |
800-
+------------+------------+---------+
801-
| 0 | 3 | 0 |
802-
+------------+------------+---------+
803-
| | ndarray(n) | |
804-
+------------+------------+---------+
798+
+------------+------------+---------+
799+
| inputs | outputs | states |
800+
+------------+------------+---------+
801+
| 0 | 3 | 0 |
802+
+------------+------------+---------+
803+
| | ndarray(n) | |
804+
+------------+------------+---------+
805805
"""
806806

807807
def __init__(self, q0, qf, qd0=None, qdf=None, T=None, *inputs, **kwargs):
@@ -936,13 +936,13 @@ class CirclePath(SourceBlock):
936936
.. table::
937937
:align: left
938938
939-
+------------+---------+---------+
940-
| inputs | outputs | states |
941-
+------------+---------+---------+
942-
| 0 or 1 | 1 | 0 |
943-
+------------+---------+---------+
944-
| float | float | |
945-
+------------+---------+---------+
939+
+------------+---------+---------+
940+
| inputs | outputs | states |
941+
+------------+---------+---------+
942+
| 0 or 1 | 1 | 0 |
943+
+------------+---------+---------+
944+
| float | float | |
945+
+------------+---------+---------+
946946
"""
947947

948948
def __init__(

0 commit comments

Comments
 (0)