Inverse Kinematics Designer
Design inverse kinematics solvers, configurations, and waypoints
Description
The Inverse Kinematics Designer enables you to design an inverse kinematics solver for a URDF robot model. You can adjust the inverse kinematics solver and add constraints to achieve the desired behavior. Using this app you can:
Import URDF robot models from URDF files or the MATLAB Workspace.
Adjust inverse kinematics solvers and constraints.
Create joint configurations and export waypoints.
Export solver settings, constraints, and joint configurations to the MATLAB^{®} workspace.
Open the Inverse Kinematics Designer App
MATLAB Toolstrip: On the Apps tab, under Robotics And Autonomous Systems, click Inverse Kinematics Designer .
MATLAB command prompt: Enter
inverseKinematicsDesigner
.
Examples
Related Examples
Parameters
Inverse Kinematics
— Manage session, check collisions, import and export
solver/constraints/configurations
tab
Use the Inverse Kinematics tab to manage session, add and edit constraints, check collisions for configurations, and import and export solvers, constraints, and configurations. The parameters and buttons in this tab are usable only after a session has been created or loaded.
Parameters/Buttons  Description 

New Session  Click New Session to load a specified robot from the workspace or from the lists of robots in the robot library using the New Session dialog box. 
Open Session  Click Open Session to load a saved session MATfile. 
Save Session  Click Save Session to save the current session as a MATfile. 
Import 

Add Collision Object  Click Add Collision Object to add collision objects to the scene from the workspace using the Add Collision Object dialog box. 
Add Constraint  Click Add Constraint to add a constraint to the inverse kinematics solver using the Constraint tab. 
Edit Constraint  Click Edit Constraint to edit the selected solver constraint using the Constraint tab. 
Refresh Solver  Click Refresh Solver to run the inverse kinematics solver using the current configuration as the initial guess. 
Solver Settings  Click Solver Settings to edit the inverse kinematics solver settings using the Solver tab. 
Report Status  Click Report Status to view the status of the most recent inverse kinematics solver solution using the Solution Report dialog box. 
Marker Pose Constraint  Click Marker Pose Constraint to edit the Marker Pose Target from the Constraint tab. 
Marker Body  Select a body from the list of bodies in the loaded robot model to be constrained by the marker pose target constraint. By default, Marker Body is set to the last body in the robot model. 
Check Collisions 

Export 

Solver
— Solver settings
tab
These parameters specify settings for the inverse kinematics solver. To access these parameters, open the Solver tab. To open the Solver tab, on the Inverse Kinematics tab, select Solver Settings.
Parameters  Description 

Solver Algorithm  Inverse kinematics solver algorithm, specified as one of these options:
For more information on how to select a solver, see Choose an Algorithm. 
Max Iterations  Maximum number of iterations for the inverse kinematics solver to run,
specified as a positive integer. Default is 50 . 
Max Time  Maximum time that the inverse kinematics solver can search for a
solution, specified as a positive scalar in seconds. Default is

Enforce Joint Limits  Select to set the inverse kinematics solver to enforce joint limits
from the robot model. Default is For more details about enforcing joint limits, see Solver Parameters. 
Allow Random Restart  Select to allow the inverse kinematics solver to restart with a
different randomly generated initial guess if the algorithm approaches a
solution that does not satisfy the constraints. Default is
For more details about enforcing joint limits, see Solver Parameters. 
Click Reset Settings > Reset Settings and Reset Settings > Reset To Default Settings to reset the inverse kinematics solver settings to the last stored value and default settings respectively.
After editing the solver settings, click Apply to Solver to apply changes to the current inverse kinematics solver.
Constraint
— Add or edit constraint
tab
Click Add Constraint in the Inverse Kinematics tab to open the Constraint tab to create a constraint. Set the name of the constraint and select the desired constraint. The Constraint tab also contains an additional section containing parameters for the corresponding selected constraints:
Pose Constraint — Constraint that assigns a target pose to a body. See the corresponding tab section, Pose Constraint, and MATLAB object,
constraintPoseTarget
, for more information.Cartesian Bounds Constraint — Constraint that defines a bounded target region for an end effector pose. See the corresponding tab section, Cartesian Bounds Constraint, and MATLAB object,
constraintCartesianBounds
, for more information.Aiming Constraint — Constraint that assigns custom joint limits. See the corresponding tab section, Aiming Constraint, and MATLAB object,
constraintAiming
, for more information.Joint Bounds Constraint — Constraint that assigns custom joint limits. See the corresponding tab section, Joint Bounds Constraint, and MATLAB object,
constraintJointBounds
, for more information.
After setting the constraint parameters, click Apply to save your changes and Close Constraint. All unsaved changes will be lost.
Pose Constraint
— Pose constraint settings
tab section
Click Pose Constraint in the Constraint tab to open the Pose Constraint tab section to create a constraint.
Parameter  Description 

End Effector Body  End effector body, specified as a selection from a list of bodies in the loaded robot model. Default is set to the last body in the loaded robot model. 
Reference Body  Reference body, specified as a selection from a list of bodies in the loaded robot model. Default is set to the first body in the loaded robot model. 
X  Target x position of the end effector in the reference
frame of the Reference Body, specified as a scalar in
meters. Default is 0 . 
Y  Target y position of the end effector in the reference
frame of the Reference Body, specified as a scalar in
meters. Default is 0 . 
Z  Target z position of the end effector in the reference
frame of the Reference Body, specified as a scalar in
meters. Default is 0 . 
Euler X  Target Euler x rotation of the end effector body in the
reference frame of the Reference Body, specified as a
scalar in degrees. Default is 0 . 
Euler Y  Target Euler y rotation of the end effector body in the
reference frame of the Reference Body, specified as a
scalar in degrees. Default is 0 . 
Euler Z  Target Euler z rotation of the end effector body in the
reference frame of the Reference Body, specified as a
scalar in degrees. Default is 0 . 
Position Tolerance  Tolerance for the end effector position, specified as a nonnegative scalar
in meters. Default is 0.01 . 
Position Weight  Weight for the end effector position, specified as a nonnegative scalar.
Default is 1 . 
Orientation Tolerance  Tolerance for the end effector orientation, specified as a nonnegative
scalar in degrees. Default is 1 . 
Orientation Weight  Weight for the end effector orientation, specified as a nonnegative scalar.
Default is 1 . 
Cartesian Bounds Constraint
— Cartesian bounds constraint settings
tab section
Click Cartesian Bounds Constraint in the Constraint tab to open the Cartesian Bounds Constraint tab section to create a constraint.
Parameter  Description 

End Effector Body  End effector body, specified as a selection from a list of bodies in the loaded robot model. Default is set to the last body in the loaded robot model. 
Reference Body  Reference body, specified as a selection from a list of bodies in the loaded robot model. Default is set to the first body in the loaded robot model. 
X  Target x position of the end effector in the reference
frame of the Reference Body, specified as a scalar in
meters. Default is 0 . 
Y  Target y position of the end effector in the reference
frame of the Reference Body, specified as a scalar in
meters. Default is 0 . 
Z  Target z position of the end effector in the reference
frame of the Reference Body, specified as a scalar in
meters. Default is 0 . 
Euler X  Target Euler x rotation of the end effector body in the
reference frame of the Reference Body, specified as a
scalar in degrees. Default is 0 . 
Euler Y  Target Euler y rotation of the end effector body in the
reference frame of the Reference Body, specified as a
scalar in degrees. Default is 0 . 
Euler Z  Target Euler z rotation of the end effector body in the
reference frame of the Reference Body, specified as a
scalar in degrees. Default is 0 . 
X Min  Minimum x bound on end effector position relative to the
reference frame of the Reference Body, specified as a
scalar in meters. Default is 0.5 . 
Y Min  Minimum y bound on end effector position relative to the
reference frame of the Reference Body, specified as a
scalar in meters. Default is 0.5 
Z Min  Minimum z bound on end effector position relative to the
reference frame of the Reference Body, specified as a
scalar in meters. Default is 0.5 
X Max  Maximum x bound on end effector position relative to the
reference frame of the Reference Body, specified as a
scalar in meters. Default is 0.5 
Y Max  Maximum y bound on end effector position relative to the
reference frame of the Reference Body, specified as a
scalar in meters. Default is 0.5 
Z Max  Maximum z bound on end effector position relative to the
reference frame of the Reference Body, specified as a
scalar in meters. Default is 0.5 
X Weight  Weight of the constraint on x bound, specified as a
scalar. Default is 1 . 
Y Weight  Weight of the constraint on y bound, specified as a
scalar. Default is 1 . 
Z Weight  Weight of the constraint on z bound, specified as a
scalar. Default is 1 . 
Aiming Constraint
— Aiming constraint settings
tab section
Click Aiming Constraint in the Constraint tab to open the Aiming Constraint tab section to create a constraint.
Parameter  Description 

End Effector Body  End effector body, specified as a selection from a list of bodies in the loaded robot model. Default is set to the last body in the loaded robot model. 
Reference Body  Reference body, specified as a selection from a list of bodies in the loaded robot model. Default is set to the first body in the loaded robot model. 
X Target  Target x position relative to Reference
Body, specified as a scalar in meters. Default is
0 . 
Y Target  Target y position relative to Reference
Body, specified as a scalar in meters. Default is
0 . 
Z Target  Target z position relative to Reference
Body, specified as a scalar in meters. Default is
0 . 
Angular Tolerance  Maximum allowed angular tolerance, specified as a nonnegative scalar in
degrees. Default is 1 . 
Constraint Weight  Weight of constraint, specified as a scalar. Default is
1 . 
Joint Bounds Constraint
— Joint bounds constraint settings
tab section
Click Joint Bounds Constraint in the Constraint tab to open the Joint Bounds Constraint tab section to create a constraint.
Parameter  Description 

Upper Joint Limits  Upper joint limit angles, specified as a Nelement row
vector of angles in degrees, where N is the number of moving
joints in the robot model. Default is 180*ones(1,N) . 
Lower Joint Limits  Lower joint limit angles, specified as a Nelement row
vector of angles in degrees, where N is the number of moving
joints in the robot model. Default is 180*ones(1,N) . 
Joint Limit Weights  Joint limit weights, specified as a Nelement row vector
where N is the number of moving joints in the robot model.
Default is ones(1,N) . 
New Session
— Start new session and select robot model
dialog box
Start new session and select robot model as a rigidBodyTree
either from the Rigid body tree list or
the MATLAB workspace. To import a robot into the workspace, use either the loadrobot
function or importrobot
function.
For more information about how to create a rigid body tree, see Build Basic Rigid Body Tree Models.
For a full list of all the rigid body trees included with the Robotics System Toolbox™, see the robotname
input of loadrobot
.
Add Collision Object
— Add collision meshes from workspace
dialog box
Add collision meshes from the MATLAB workspace, specified as collisionBox
, collisionCylinder
, collisionSphere
, or collisionMesh
objects. The Add Collision Object dialog
box is accessible by clicking Add Collision Object in the
Inverse Kinematics tab.
Import Inverse Kinematics Solver
— Import inverse kinematics solver
dialog box
Import an inverse kinematics solver from the MATLAB workspace, specified as either a generalizedInverseKinematics
, or inverseKinematics
object. Solvers in the Workspace appear in the
Available solvers table. Select a solver and click
Import to import the solver into the Inverse Kinematics
Designer app. If a solver from the Workspace does not appear in the
Available solvers table, click
Refresh.
Import Joint Configurations
— Import joint configurations
dialog box
Import joint configurations from the MATLAB workspace, specified as an MbyN matrix of doubles where M is the number of configurations, and N is the number of moveable joints in the robot. Configuration data in the Workspace appear in the Configurations in the workspace table. Select configuration data and click Import to import the configuration data into the Inverse Kinematics Designer app.
If a configuration in the Workspace does not appear in the Configurations in the workspace table, click Refresh.
Import Inverse Kinematics Constraints
— Import inverse kinematics constraints
dialog box
Import inverse kinematics constraints from the Workspace, specified as a constraintAiming
, constraintPoseTarget
, constraintCartesianBounds
, or constraintJointBounds
object. Constraint objects in the Workspace appear in
the Configurations in the workspace table. Select the desired
constraint objects and click Import to import the constraints
into the Inverse Kinematics Designer app.
If a configuration in the Workspace does not appear in the Constraint objects in the workspace table, click Refresh.
Export Solver and Constraints
— Solver and constraint export settings
dialog box
Change solver and constraint export settings, and export the solver and constraints to the MATLAB. To access these parameters, on the Inverse Kinematics tab, select Export > Solver and Constraints. When all settings and selections are complete, click Export to export the solver and constraints to the workspace.
Parameter  Description 

Export solver  Select to include the inverse kinematics solver when exporting. Default is
on . 
Solver name  Name of the inverse kinematics solver. Default is
ikSolver . 
Export constraints  Select to include the solver constraints when exporting. Default is
on . 
Constraints cell array name  Name of the solver constraints cell array, specified as a string.
Default is To enable this parameter, select the Export constraints parameter. 
Available constraints  Table containing solver constraints, listing the name, size, and class of each constraint. Select constraints from this table and click Export to export the constraints to the workspace. To enable this parameter, select the Export constraints parameter. 
Export Waypoints
— Export configurations as waypoints
dialog box
Export configurations as waypoints using the Export Waypoints dialog box. To access
these parameters, on the Inverse Kinematics tab, select Export >
Configurations. When selections are complete, click
Export to export the waypoints as an
MbyN matrix of data type
double
to the MATLAB workspace, where M is the number of waypoints, and
N is the number of movable joints in the robot.
Parameter  Description 

Waypoint matrix name  Name of waypoint matrix. Default is
waypointData . 
Available configurations  Table containing available configurations, listing the name, size, and class of each constraint. Select configurations from this table and click Export to export the configurations to the workspace as waypoints. 
Solution Report
— Details of most recent inverse kinematics solution
dialog box
View the details of the most recent inverse kinematics solution in the Solution Report dialog box. To access these parameters, on the Inverse Kinematics tab, select Report Status.
These parameters are readonly.
Parameter  Description 

Iterations  Number of iterations needed to achieve the solution result. 
Number of Random Restarts  Number of times that the solution randomly restarted. Random restarts are triggered when the algorithm approaches a solution that does not satisfy the constraints. The solver restarts with a randomly generated initial guess. 
Constraint Violations  Constraint violations, indicated as a 1byN
structure array, where N is the number of enabled
constraints in the session. Select 
Status  Status of the solution, indicated as either

Exit Flag  Exit flag of the solver. See Exit Flags for more information. 