This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Get Transformations for Manipulator Bodies in Simulink

This example shows how to get the transformation between bodies in a robotics.RigidBodyTree robot model. In this example, you define a robot model and robot configuration in MATLAB® and pass them to Simulink® to be used with the manipulator algorithm block.

Load the robot model of the KUKA LBR robot as a RigidBodyTree object. Use the homeConfiguration function to get the home configuration as joint positions of the robot.

lbr.DataFormat = 'column';

homeConfig = homeConfiguration(lbr);
randomConfig = randomConfiguration(lbr);

Open the model. If necessary, use the Load Robot Model callback button to reload the robot model and configuration vectors.

The Get Transform block calculates the transformation from the source body to the target body. This transformation converts coordinates from the source body frame to the given target body frame. This example gives you transformations to convert coordinates from the 'iiwa_link_ee' end effector into the 'world' base coordinates.


Run the model to get the transformations.

See Also




Related Topics