- Notifications
You must be signed in to change notification settings - Fork547
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
ARobot instance is essentially a container of links with metadata andsome methods that apply (almost) all subclasses.
TheRobot class is abstract. The current subclasses are
ERobotthe most general robot that can be branchedDHRobotclassical 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 |
ARobot class acts like an iterator over the list of links comprisingthe robot.
It can also be used to slice the robot, eg.robot[1] is link 1 androbot[: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 defaultthis is the world frame (identity SE(3)), but can be set to an arbitraryvalue, eg.robot.base = X.
The.base property always returns anSE3 instance, but if theattribute._base is None this means there is no base set, and.basewill returnSE3().
NOTE: For symbolic operations this is useful, since premultiplying thelink transforms by an identity matrix will lead to unncessary1.0 * issymbolic 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 thefkine andjacob0 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 andteach 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 methodA
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 |