Code Generation Support

To generate code from MATLAB® code that contains Robotics System Toolbox™ functions, classes, or System objects, you must have the MATLAB Coder™ software.

The following functions support code generation using MATLAB Coder, but may have some limitations.

An asterisk (*) indicates that the reference page has usage notes and limitations for C/C++ code generation.

ackermannKinematics

Create car-like steering vehicle model

angdiff

Difference between two angles

axang2quat

Convert axis-angle rotation to quaternion

axang2rotm

Convert axis-angle rotation to rotation matrix

axang2tform

Convert axis-angle rotation to homogeneous transformation

bicycleKinematics

Create bicycle vehicle model

binaryOccupancyMap

Create occupancy grid with binary values

bsplinepolytraj

Generate polynomial trajectories using B-splines

cart2hom

Convert Cartesian coordinates to homogeneous coordinates

classUnderlying

Class of parts within quaternion

compact

Convert quaternion array to N-by-4 matrix

conj

Complex conjugate of quaternion

constraintAiming

Create aiming constraint for pointing at a target location

constraintCartesianBounds

Create constraint to keep body origin inside Cartesian bounds

constraintJointBounds

Create constraint on joint positions of robot model

constraintOrientationTarget

Create constraint on relative orientation of body

constraintPoseTarget

Create constraint on relative pose of body

constraintPositionTarget

Create constraint on relative position of body

control

Control commands for UAV

controllerPurePursuit

Create controller to follow set of waypoints

ctranspose, '

Complex conjugate transpose of quaternion array

cubicpolytraj

Generate third-order polynomial trajectories

derivative

Time derivative of UAV states

differentialDriveKinematics

Create differential-drive vehicle model

dist

Angular distance in radians

environment

Environmental inputs for UAV

eul2quat

Convert Euler angles to quaternion

eul2rotm

Convert Euler angles to rotation matrix

eul2tform

Convert Euler angles to homogeneous transformation

euler

Convert quaternion to Euler angles (radians)

eulerd

Convert quaternion to Euler angles (degrees)

exp

Exponential of quaternion array

fixedwing

Guidance model for fixed-wing UAVs

generalizedInverseKinematics*

Create multiconstraint inverse kinematics solver

hom2cart

Convert homogeneous coordinates to Cartesian coordinates

inverseKinematics*

Create inverse kinematic solver

jointSpaceMotionModel

Model rigid body tree motion given joint-space inputs

ldivide, .\

Element-wise quaternion left division

lidarScan

Create object for storing 2-D lidar scan

log

Natural logarithm of quaternion array

meanrot

Quaternion mean rotation

minus, -

Quaternion subtraction

mobileRobotPRM*

Create probabilistic roadmap path planner

mtimes, *

Quaternion multiplication

multirotor

Guidance model for multirotor UAVs

norm

Quaternion norm

normalize

Quaternion normalization

ones

Create quaternion array with real parts set to one and imaginary parts set to zero

parts

Extract quaternion parts

power, .^

Element-wise quaternion power

prod

Product of a quaternion array

quat2axang

Convert quaternion to axis-angle rotation

quat2eul

Convert quaternion to Euler angles

quat2rotm

Convert quaternion to rotation matrix

quat2tform

Convert quaternion to homogeneous transformation

quaternion

Create a quaternion array

quinticpolytraj

Generate fifth-order trajectories

randrot

Uniformly distributed random rotations

rdivide, ./

Element-wise quaternion right division

rigidBody

Create a rigid body

rigidBodyJoint

Create a joint

rigidBodyTree*

Create tree-structured robot

rotateframe

Quaternion frame rotation

rotatepoint

Quaternion point rotation

rotm2axang

Convert rotation matrix to axis-angle rotation

rotm2eul

Convert rotation matrix to Euler angles

rotm2quat

Convert rotation matrix to quaternion

rotm2tform

Convert rotation matrix to homogeneous transformation

rotmat

Convert quaternion to rotation matrix

rottraj

Generate trajectories between orientation rotation matrices

rotvec

Convert quaternion to rotation vector (radians)

rotvecd

Convert quaternion to rotation vector (degrees)

slerp

Spherical linear interpolation

state

UAV state vector

stateEstimatorPF

Create particle filter state estimator

taskSpaceMotionModel

Model rigid body tree motion given task-space reference inputs

tform2axang

Convert homogeneous transformation to axis-angle rotation

tform2eul

Extract Euler angles from homogeneous transformation

tform2quat

Extract quaternion from homogeneous transformation

tform2rotm

Extract rotation matrix from homogeneous transformation

tform2trvec

Extract translation vector from homogeneous transformation

times, .*

Element-wise quaternion multiplication

transformScan

Transform laser scan based on relative pose

transformtraj

Generate trajectories between two transformations

transpose, .'

Transpose a quaternion array

trapveltraj

Generate trajectories with trapezoidal velocity profiles

trvec2tform

Convert translation vector to homogeneous transformation

uavOrbitFollower

Orbit location of interest using a UAV

uavWaypointFollower

Follow waypoints for UAV

uminus, -

Quaternion unary minus

unicycleKinematics

Create unicycle vehicle model

zeros

Create quaternion array with all parts set to zero

Related Topics