MATLAB is a proprietary programming language developed by MathWorks. Among other things, MATLAB allows matrix manipulations, plotting of functions and data and implementation of algorithms. RoboDK is an official MathWorks Connections Program Partner.
The RoboDK API for MATLAB is provided as a group of script files (m-files), available here:
●In the installation folder of RoboDK, typically C:/RoboDK/Matlab/.
●On MathWorks MATLAB Central.
●On the RoboDK API GitHub.
The main section of this document explains the advantages of using the RoboDK API with a widely used programming language such as MATLAB for robot programming.
The RoboDK API for MATLAB includes:
●Robolink.m is a class that interfaces with RoboDK. Any object in the RoboDK Station Tree can be retrieved using the Robolink object and it is represented by the RobolinkItem object (same as Python’s Robolink class).
●RobolinkItem.m is a class that represents a RoboDK item in the Station Tree. It is possible to perform different operations on that item (same as Python’s Robolink.Item class).
●transl.m, rotx.m, roty.m and rotz.m are functions that create pose matrices given an XYZ translation vector or rotations along a specific axis.
●Pose_2_XYZRPW.m and XYZRPW_2_Pose.m allow converting poses to XYZ position and RPW Euler angles and vice versa. More information in the Reference Frames section.
The following page presents multiple examples of the RoboDK MATLAB API, such as manipulating items, generating robot programs and controlling the robot:
https://robodk.com/Matlab-API
A Simulink project is available as an example. In the simulation, the robot is moved along a set of XYZ coordinates generated arbitrarily.