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 |
|---|---|---|---|
|
the standard or modified Denavit-Hartenberg parameters of each link |
serial-link arms: compact, fast, and the notation of many textbooks and papers |
|
|
an elementary transform sequence, see Elementary transform sequences |
any structure, including branched robots, from a short expression |
|
|
a URDF or xacro file |
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 Nonedof (
Any) – number of DoF to filter on, defaults to Nonemtype (
Any) – filter on model type: “DH”, “ETS”, “URDF”, defaults to all typessorton (
Any) – column to sort rows on: “name”, “manufacturer” or “dof”, case insensitive, defaults to None (construction order)
- Return type:
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 stringrobot_descriptionsitself calls the name (its ownpython -m robot_descriptions pull NAMECLI) – pass it toURDFRobotto load that model, e.g.URDFRobot("ur5").catalog(mtype=MT)as above, but only displays Toolbox models of typeMTwhereMTis one of “DH”, “ETS” or “URDF”. The robot_descriptions listing (all URDF) is shown forMT="URDF"or unfiltered, and omitted forMT="DH"/MT="ETS".catalog(keywords=KW)as above, but only displays models that have a keyword in the tupleKW.catalog(dof=N)as above, but only display models that haveNdegrees of freedom.catalog(sorton=S)as above, but rows are sorted by columnS.namesorts by the robot’s name,manufacturersorts by the robot’s manufacturer, anddofsorts by the robot’s number of degrees of freedom. Sorting is case insensitive. Applies to both tables when both are shown. Rows with noDoFvalue (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 inKWand haveNdegrees of freedom.