-
Notifications
You must be signed in to change notification settings - Fork 473
Introduction to robot and link classes
These notes will eventually migrate to the Sphinx documentation for each class, but here they are easier to work on.
WORK IN PROGRESS
A Robot
instance is essentially a container of links with metadata and
some methods that apply (almost) all subclasses.
The Robot
class is abstract. The current subclasses are
-
ERobot
the most general robot that can be branched -
DHRobot
classical Denavit-Hartenberg model
The abstract methods are:
Method | Purpose |
---|---|
fkine |
forward kinematics |
jacob0 |
Jacobian in world frame |
jacobe |
Jacobian in end-effector frame |
hessian0 |
Hessian in world frame |
rne |
inverse dynamics: recursive Newton Euler |
isspherical |
robot has spherical wrist |
ets |
ETS representation |
A Robot
class acts like an iterator over the list of links comprising
the robot.
It can also be used to slice the robot, eg. robot[1]
is link 1 and
robot[:3]
is the first three links.
Links can also be found by name, eg. robot['link1']
.
The forward kinematics is computed with respect to the base. By default
this is the world frame (identity SE(3)), but can be set to an arbitrary
value, eg. robot.base = X
.
The .base
property always returns an SE3
instance, but if the
attribute ._base
is None this means there is no base set, and .base
will return SE3()
.
NOTE: For symbolic operations this is useful, since premultiplying the
link transforms by an identity matrix will lead to unncessary 1.0 *
is
symbolic expressions.
Property | Purpose |
---|---|
n |
number of joints |
nlinks |
number of links |
nbranches |
number of branches |
hasdynamics |
has dynamic parameters |
hasgeometry |
has geometry model |
hascollision |
has collision model |
structure |
robot structure as string |
revolutes |
joints which are revolute (bool array) |
prismatics |
joints which are prismatic (bool array) |
Kinematics
Method | Purpose |
---|---|
IK_xx |
inverse kinematics |
NOTE: inverse kinematics uses the fkine
and jacob0
methods
of the subclass
Dynamics
Method | Purpose |
---|---|
inertia |
rigid-body mass tensor |
coriolis |
rigid-body Coriolis and centripetal term |
gravload |
rigid-body gravity load |
accel |
rigid-body forward dynamics |
inertia_x |
operational-space mass tensor |
coriolis_x |
operational-space Coriolis and centripetal term |
gravload_x |
operational-space gravity load |
accel_x |
operational-space forward dynamics |
dynamics |
dynamic parameters as a table |
dynamics_list |
dynamic parameters as a list |
NOTE: many of these methods require
Graphics
Method | Purpose |
---|---|
plot |
plot/animate the robot |
teach |
interactively "teach" the robot |
NOTE: plot
and teach
invoke the backend which calls back to
robot methods
Backend support:
This is an abstract base class for all links. It contains metadata about the link and a number of methods.
Property | Purpose |
---|---|
name |
number of joints |
isrevolute |
true if link's parent is via a revolute joint |
isprismatic |
true if link's parent is via a prismatic joint |
hasdynamics |
has dynamic parameters |
hasgeometry |
has geometry model |
hascollision |
has collision model |
m |
link mass (float) |
r |
link CoM relative to link frame ndarray(3) |
I |
link inertia tensor about CoM ndarray(3,3) |
Abstract method A
Is based on concrete subclasses
Property | Purpose |
---|---|
theta |
DH rotation about z-axis (float) |
d |
DH translation along z-axis (float) |
a |
DH translation along x-axis (float) |
alpha |
DH rotation about x-axis (float) |
mdh |
uses modified DH convention (bool) |
A number of subclasses are useful in the creation of robot models using DH conventions
Method | Purpose |
---|---|
RevoluteDH |
revolute joint using standard DH convention |
PrismaticDH |
prismatic joint using standard DH convention |
RevoluteMDH |
revolute joint using modified DH convention |
PrismaticMDH |
prismatic joint using modified DH convention |
- Frequently asked questions (FAQ)
- Documentation Style Guide
- Typing Style Guide
- Background
- Key concepts
- Introduction to robot and link classes
- Working with Jupyter
- Working from the command line
- What about Simulink?
- How to contribute
- Common Issues
- Contributors