Function Reference


    3D transforms Manipulate homogeneous transformations and orthonormal rotation matrices
    2D transforms Manipulate homogeneous transformations and orthonormal rotation matrices
    Homogeneous points and lines Manipulate homogeneous points and lines
    Differential motion Convert differential motion between coordinate frames
    Trajectory generation Create motion trajectory and interpolate poses
    Quaternion Manipulate unit quaternions
    Serial-link manipulator Class representing the kinematics and dynamics of a serial-link manipulator
        Models Models of serial-link manipulators
        Kinematic Serial-link manipulator kinematic functions
        Dynamics Serial-link manipulator dynamic functions
    Mobile robot Classes for mobile robotics problems
        Localization Mobile robot localization algorithms
        Path planning Mobile robot path planning algorithms
    Graphics Useful graphic primitives
    Utility Miscellaneous functions
    Demonstrations
    Interfacing
    Code generation
    Examples

3D transforms

angvec2rangle/vector to SO3
angvec2trangle/vector to SE3
eul2rEuler angles to SO3
eul2trEuler angles to SE3
ishomogtrue if argument is SE3
isrottrue if argument is a SO3 matrix
oa2rorientation and approach vector to SO3
oa2trorientation and approach vector to SE3
r2tSO3 to SE3
rt2tr(R,t) to SE3
rotxSO3 for rotation about X-axis
rotySO3 for rotation about Y-axis
rotzSO3 for rotation about Z-axis
rpy2rroll/pitch/yaw angles to SO3
rpy2trroll/pitch/yaw angles to SE3
t2rSE3 to SO3
tr2angvecSE3/SO3 to angle/vector form
tr2eulSE3/SO3 to Euler angles
tr2rpySE3/SO3 to roll/pitch/yaw angles
tr2rtSE3 to (R,t)
tranimateanimate a coordinate frame
trchainevaluate a series of transforms
tripleanglegraphical interactive three angle rotation
translset or extract the translational component of SE3
trnormnormalize SE3
trchainchain of SE(3) transforms
trplotplot SE3 as a coordinate frame
trprintprint an SE3
trotxSE3 for rotation about X-axis
trotySE3 for rotation about Y-axis
trotzSE3 for rotation about Z-axis
trscaleSE3 for scale change

2D transforms

ishomog2true if argument is a 3x3 matrix
isrot2true if argument is a 2x2 matrix
rot2SO2 rotation
se2create SE2
se3lift SE2 to SE3
transl2set or extract the translational component of SE2
trchain2chain of SE2 transforms
trot2SO2 rotation
trplot2plot SE2 as a coordinate frame

Homogeneous points and lines

e2hEuclidean coordinates to homogeneous
h2ehomogeneous coordinates to Euclidean
homlinecreate line from 2 points
homtranstransform points

Differential motion

delta2trdifferential motion vector to SE3
eul2jacEuler angles to Jacobian
rpy2jacRPY angles to Jacobian
skewvector to skew symmetric matrix
tr2deltaSE3 to differential motion vector
tr2jacSE3 to Jacobian
vexskew symmetric matrix to vector
wtranstransform wrench between frames

Trajectory generation

ctrajCartesian trajectory
jtrajjoint space trajectory
lspb1D trapezoidal trajectory
mtrajmulti-axis trajectory for arbitrary function
mstrajmulti-axis multi-segment trajectory
tpoly1D polynomial trajectory
trinterpinterpolate SE3 s

Quaternion

Quaternionconstructor
/divide quaternion by quaternion or scalar
*multiply quaternion by a quaternion or vector
Quaternion.invinvert a quaternion
Quaternion.normnorm of a quaternion
Quaternion.plotdisplay a quaternion as a 3D rotation
Quaternion.unitunitize a quaternion
Quaternion.interpinterpolate a quaternion

Serial-link manipulator

CodeGeneratorconstruct a robot specific code generator object
SerialLinkconstruct a serial-link robot object
Linkconstruct a general robot link object
Prismaticconstruct a prismatic robot link object
Revoluteconstruct a revolute robot link object
PrismaticMDHconstruct a prismatic robot link object
RevoluteMDHconstruct a revolute robot link object
*compound two robots
SerialLink.editinteractively edit a robot object
SerialLink.frictionreturn joint friction torques
SerialLink.nofrictionreturn a robot object with no friction
SerialLink.perturbreturn a robot object with perturbed parameters
SerialLink.plotplot/animate robot
SerialLink.plot3dplot/animate robot as solid model
SerialLink.teachdrive a graphical robot

Models

mdl_baxterBaxter 2-arm robot (DH, kine)
mdl_Fanuc10LFanuc 10L (DH, kine)
mdl_irb140ABB IRB140 (DH, kine)
mdl_irb140_mdhABB IRB140 (MDH, kine)
mdl_jacoKinova Jaco arm (DH, kine)
mdl_KR5Kuka KR5 (DH, kine)
mdl_m16Fanuc M16 (DH, kine)
mdl_micoKinova Mico arm (DH, kine)
mdl_MotomanHP6Motoman HP6 (DH, kine)
mdl_naoAlderabaran NAO arms and legs (DH, kine)
mdl_phantomxPhantomX pincher 4DOF hobby arm (DH, kine)
mdl_puma560Puma 560 data (DH, kine, dyn)
mdl_puma560akbPuma 560 data (MDH, kine, dyn)
mdl_p8Puma 560 on an XY base (DH, kine)
mdl_S4ABB2p8ABB S4 2.8 (DH, kine)
mdl_stanfordStanford arm data (DH, kine, dyn)
mdl_stanford_mdhStanford arm data (MDH, kine, dyn)
mdl_onelinksimple 1-link example (DH, kine)
mdl_planar1simple 1 link planar model (DH, kine)
mdl_planar2simple 2 link planar model (DH, kine)
mdl_planar3simple 3 link planar model (DH, kine)
mdl_3link3dSimple 3DOF arm, no shoulder offset (DH, kine)
mdl_twolinksimple 2-link example (DH, kine, dyn)
mdl_twolink_mdhsimple 2-link example (MDH, kine)
mdl_simple6simple 6 link model (DH, kine)
mdl_offset6simple 6 link model (DH, kine)
mdl_offset3simple 3 link model (DH, kine)
mdl_ballhigh DOF chain that forms a ball
mdl_coilhigh DOF chain that forms a coil
mdl_hyper2d2D high DOF chain
mdl_hyper3d3D high DOF chain
mdl_quadrotorsimple quadrotor model

Kinematic

DHFactortransform sequence to DH description
jsingufind dependent joints
SerialLink.fellipseplot force ellipsoid
SerialLink.fkineforward kinematics
SerialLink.ikineinverse kinematics (numeric)
SerialLink.ikine_syminverse kinematics (symbolic)
SerialLink.ikine6sinverse kinematics for 6-axis arm with sph.wrist
SerialLink.jacob0Jacobian in base coordinate frame
SerialLink.jacobnJacobian in end-effector coordinate frame
SerialLink.manipltycompute manipulability
SerialLink.trchainexpress as chain of SE(3) transforms
SerialLink.vellipseplot velocity ellipsoid

Dynamics

SerialLink.accelforward dynamics
SerialLink.cinertiaCartesian manipulator inertia matrix
SerialLink.corioliscentripetal/coriolis torque
SerialLink.fdynforward dynamics
wtranstransform a force/moment
SerialLink.gravloadgravity loading
SerialLink.inertiamanipulator inertia matrix
SerialLink.itorqueinertia torque
SerialLink.rneinverse dynamics

Mobile robot

Mappoint feature map object
RandomPathdriver for Vehicle object
RangeBearingSensor"laser scanner" object
Vehicleconstruct a mobile robot object
sl_bicycleSimulink "bicycle model" of non-holonomic wheeled vehicle
NavigationNavigation superclass
Sensorrobot sensor superclass
makemapbuild an occupancy grid
plot_vehicleplot vehicle

Localization

EKFextended Kalman filter object
ParticleFilterMonte Carlo estimator

Path planning

Bug2bug navigation
DXformdistance transform from map
DstarD* planner
PRMprobabilistic roadmap planner
RRTrapidly exploring random tree

Graphics

Animaterecord a graphical animation sequence
plot2plot trajectory
plotpplot points
plot_arrowdraw an arrow
plot_boxdraw a box
plot_circledraw a circle
plot_ellipsedraw an ellipse
plot_ellipse_invdraw an ellipse
plot_homlineplot homogeneous line
plot_pointplot points
plot_polyplot polygon
plot_spheredraw a sphere
qplotplot joint angle trajectories
plot2Plot trajectories
plotpPlot trajectories
xaxisset x-axis scaling
yaxisset y-axis scaling
xyzlabellabel axes x, y and z

Utility

aboutsummary of object size and type
angdiffsubtract 2 angles modulo 2pi
arrow3draw a 3D arrow (third party code)
bresenhamBresenhan line drawing
circlecompute/draw points on a circle
colnormcolumnwise norm of matrix
colornamemap color name to RGB
diff2elementwise diff
dockfigscontrol figure docking with GUI
edgelisttrace edge of a shape
gauss2dGaussian distribution in 2D
ismatrixtrue if non scalar
isvectrue if argument is a 3-vector
numcolsnumber of columns in matrix
numrowsnumber of rows in matrix
peakfind peak in 1D signal
peak2find peak in 2D signal
PGraphgeneral purpose graph class
polydiffderivative of polynomial
Polygongeneral purpose polygon class
randinitinitialize random number generator
rampcreate linear ramp
rvcpathpath to RVC install
unitunitize a vector
tb_optparsetoolbox argument parser
distancexformcompute distance transform
runscriptinteractively step through a script
multidfprintfprintf extension

Demonstrations

rtbdemoSerial-link manipulator demonstration
tripleangledemonstrate angle sequences

Interfacing

ArbotixInterface to Arbotix robot controller
MachineAbstract robot interface class
RobotArmConnect SerialLink object to real robot
joystickHelp for joystick interface mex file
joy2trUpdate SE3 based on joystick input
VREPVREP interface class
VREP_mirrorMATLAB mirror for VREP object
VREP_armMATLAB mirror for VREP robot arm
VREP_objMATLAB mirror for VREP object
VREP_cameraMATLAB mirror for VREP camera object

Code generation

ccodefunctionstringConverts a symbolic expression into a C-code function
distributeblocksDistribute blocks in Simulink block library
doesblockexistCheck existence of block in Simulink model
getprofilefunctionstats[ funstats] = getprofilefunctionstats( pstats , desfun, varargin)
simulinkextReturn file extension of Simulink block diagrams.
symexpr2slblockCreate symbolic embedded MATLAB Function block

Examples

sl_quadcopterSimulink model of a flying quadcopter
sl_braitenbergSimulink model a Braitenberg vehicle
movepointnon-holonomic vehicle moving to a point
movelinenon-holonomic vehicle moving to a line
moveposenon-holonomic vehicle moving to a pose
joytestdemo of gaming joystick input
walkingexample of 4-legged walking robot
eg_inertiajoint 1 inertia I(q1,q2)
eg_inertia22joint 2 inertia I(q3)
eg_gravjoint 2 gravity load g(q2,q3)