Models

The Toolbox includes models of many commercial and research robots: classic arms such as the Puma 560, modern ones such as the Panda, UR and Kinova families, and a few mobile manipulators and humanoids. Every model is a robot object, an instance of a subclass of Robot, so the same methods work for all of them, whichever way the model is defined.

The model of a robot can be defined in three ways, and the Toolbox has models of each kind:

Category

Defined by

Class

Good for

DH

the standard or modified Denavit-Hartenberg parameters of each link

DHRobot

serial-link arms: compact, fast, and the notation of many textbooks and papers

ETS

an elementary transform sequence, see Elementary transform sequences

Robot

any structure, including branched robots, from a short expression

URDF

a URDF or xacro file

URDFRobot

the robot as its manufacturer describes it, with meshes for display and collision checking

Some robots are available in more than one category, for example the Panda:

>>> import roboticstoolbox as rtb
>>> for kind in (rtb.models.DH, rtb.models.ETS, rtb.models.URDF):
...     robot = kind.Panda()
...     print(kind.__name__.split(".")[-1], type(robot).__name__, robot.n)
DH Panda 7
ETS Panda 7
URDF Panda 7

The classes and the models of each category are described on the pages below. Models are in a sub-package named for the category, so rtb.models.DH.Puma560() and rtb.models.URDF.Panda() make a Puma 560 and a Panda. The URDF models are also in the rtb.models namespace itself, so rtb.models.Panda is rtb.models.URDF.Panda.

Note

The dynamics methods, such as gravload, inertia and rne, need link masses and inertias. The DH models define them, but the URDF and ETS models do not, and for these the methods raise a ValueError. robot.hasdynamics tells you whether a model has them.

Listing available models

catalog(keywords=None, dof=None, mtype=None, sorton=None, border='thin')[source]

Display all robot models in summary form

Parameters:
  • keywords (Any) – keywords to filter on, defaults to None

  • dof (Any) – number of DoF to filter on, defaults to None

  • mtype (Any) – filter on model type: “DH”, “ETS”, “URDF”, defaults to all types

  • sorton (Any) – column to sort rows on: “name”, “manufacturer” or “dof”, case insensitive, defaults to None (construction order)

Return type:

None

  • catalog() displays a list of all models provided by the Toolbox. It lists the name, manufacturer, model type, number of DoF, and keywords. It also lists models available from robot_descriptions but not otherwise wrapped by the Toolbox: “robot_descriptions name” is the string robot_descriptions itself calls the name (its own python -m robot_descriptions pull NAME CLI) – pass it to URDFRobot to load that model, e.g. URDFRobot("ur5").

  • catalog(mtype=MT) as above, but only displays Toolbox models of type MT where MT is one of “DH”, “ETS” or “URDF”. The robot_descriptions listing (all URDF) is shown for MT="URDF" or unfiltered, and omitted for MT="DH"/MT="ETS".

  • catalog(keywords=KW) as above, but only displays models that have a keyword in the tuple KW.

  • catalog(dof=N) as above, but only display models that have N degrees of freedom.

  • catalog(sorton=S) as above, but rows are sorted by column S. name sorts by the robot’s name, manufacturer sorts by the robot’s manufacturer, and dof sorts by the robot’s number of degrees of freedom. Sorting is case insensitive. Applies to both tables when both are shown. Rows with no DoF value (common in the robot_descriptions table) sort first.

The filters can be combined

  • catalog(keywords=KW, dof=N) are those models that have a keyword in KW and have N degrees of freedom.

list(keywords=None, dof=None, mtype=None, sorton=None, border='thin')[source]

Display all robot models in summary form (deprecated)

Deprecated:

1.4.0 list shadows the builtin and will be removed in a future release. Use catalog() instead.

Return type:

Any