6.1. Kinematic Transformations
The voraus Robot Control converts poses between joint space and Cartesian space on request, without moving the robot. Two functions of the OPC UA interface are provided for this purpose:
ForwardKinematicconverts a set of joint positions into a Cartesian pose, see Forward Kinematic.InverseKinematicconverts a Cartesian pose into a set of joint positions, see Inverse Kinematic.
Both functions are commonly used to prepare and check a target pose before it is sent as a motion command (see System and Motion Commands), to convert a pose between the available coordinate systems, or to determine the configuration vector that belongs to a known pose (see Configuration Vector).
6.1.1. Common Properties
Both functions are pure calculations on the kinematics model of the currently loaded robot (see
Robot Config File). They do not move the robot and do not require a specific robot state. A transformation
that cannot be calculated is reported through the ErrorMessage output described in
Error Handling.
Coordinate Systems
The coordinate system of the Cartesian pose is selected with the TargetCS and SourceCS parameter
respectively, using the numeric identifiers listed in Table 1. Only Cartesian coordinate
systems that are fixed in space are supported:
Coordinate System |
Supported |
Remark |
|---|---|---|
Robot CS ( |
Yes |
|
User CS 01–16 ( |
Yes |
The user coordinate system must be defined beforehand, see Defining User Coordinate Systems. |
Joint CS ( |
No |
Not a Cartesian coordinate system; it is the result of the transformation, not a reference frame for it. |
Tool CS ( |
No |
Both move with the end effector and are therefore not available as a reference frame. |
A Cartesian pose is always specified as \([x, y, z, A, B, C]\) in \([\mathrm{m}]\) and \([\mathrm{rad}]\), with the
intrinsic X Y' Z'' (Cardan) rotation order, see voraus Conventions and Units Summary.
Joint positions are always specified in \([\mathrm{rad}]\) for rotational axes and in \([\mathrm{m}]\) for prismatic axes.
Tool Transformation
The tool is always passed explicitly to the transformation, with the two parameters ToolTransformation and
ToolTransformationOffset. The tool that is configured in the system (see Tool Transformation) is not
applied automatically, so the same call can be used to evaluate a pose for any tool.
ToolTransformationdescribes the transformation from the Flange CS to the Tool CS.ToolTransformationOffsetdescribes an additional transformation from the previous Tool CS defined withToolTransformation. It is defined in tool coordinates. The total transformation of Tool CS is given by applying firstToolTransformationand thenToolTransformationOffset.
Both parameters must contain six elements. If both are submitted as [0, 0, 0, 0, 0, 0], the Cartesian pose
refers to the Flange CS.
Configuration Vector
Which of the possible joint solutions of a Cartesian pose is used is selected by the configuration vector, see
Configuration Vector. ForwardKinematic returns it and InverseKinematic accepts it as an
input argument, both in the fixed six-element array described in Number of Elements.
6.1.2. Forward Kinematic
The ForwardKinematic function converts joint positions into the corresponding Cartesian pose. The result is
unambiguous: one set of joint positions always leads to exactly one pose. In addition to the pose, the function
returns the configuration vector of the submitted joint positions, which is the recommended way to determine the
flag values of a known arm configuration, see Specifying a Configuration.
Command Name |
NodeId |
ParentId |
|---|---|---|
|
310101 |
310000 |
Name |
Type |
Description |
|---|---|---|
|
Array of double |
Joint positions to be converted, in \([\mathrm{rad}]\) for rotational axes and in \([\mathrm{m}]\) for prismatic axes. The array must contain exactly six elements. |
|
Array of double |
Transformation \([x, y, z, A, B, C]\) from the Flange CS to the tool endpoint, see Common Properties. |
|
Array of double |
Additional transformation \([x, y, z, A, B, C]\) from the tool endpoint to the resulting Tool CS, defined in tool coordinates. |
|
Int32 |
Coordinate system in which the resulting pose is returned, see Table 89. |
Name |
Type |
Description |
|---|---|---|
|
Array of double |
Resulting pose \([x, y, z, A, B, C]\) of the Tool CS in the selected target coordinate system, in \([\mathrm{m}]\) and \([\mathrm{rad}]\). |
|
Array of double |
Orientation of the resulting pose as a unit quaternion with four elements in the order
\([w, x, y, z]\). It describes the same orientation as the angles \(A\), \(B\) and \(C\) of
|
|
Array of int32 |
Configuration vector of the submitted joint positions, always with six elements, see Configuration Vector. |
|
String |
Empty if the result is valid, otherwise the reason why the transformation failed, see Error Handling. |
Note
The function currently supports only six entries in the AxesPose vector, even if the current robot has
fewer than six joints. A submitted AxesPose with a different number of elements is rejected. Unnecessary
entries should be set to 0.0, see Edge Cases and Known Limitations.
Edge Cases and Known Limitations
This section describes specific situations that require special consideration when using the ForwardKinematic
function.
Robots with Fewer Than Six Joints
Currently, the unnecessary entries of the AxesPose vector are not ignored for robots with fewer than six
joints. They are included in the calculation, so values other than 0.0 falsify the result of the transformation. Set
all unnecessary entries to 0.0.
6.1.3. Inverse Kinematic
The InverseKinematic function converts a Cartesian pose into the corresponding joint positions. Because the
inverse kinematics is ambiguous, the requested solution is selected with the ConfigurationVector input
parameter, see Configuration Vector.
Command Name |
NodeId |
ParentId |
|---|---|---|
|
310102 |
310000 |
Name |
Type |
Description |
|---|---|---|
|
Array of double |
Pose \([x, y, z, A, B, C]\) of the Tool CS to be converted, in \([\mathrm{m}]\) and \([\mathrm{rad}]\). The array must contain exactly six elements. |
|
Array of double |
Transformation \([x, y, z, A, B, C]\) from the Flange CS to the tool endpoint, see Common Properties. |
|
Array of double |
Additional transformation \([x, y, z, A, B, C]\) from the tool endpoint to the resulting Tool CS, defined in tool coordinates. |
|
Int32 |
Coordinate system in which the submitted pose is defined, see Table 89. |
|
Array of int32 |
Joint configuration to be calculated. Each element must be either |
Name |
Type |
Description |
|---|---|---|
|
Array of double |
Resulting joint positions, in \([\mathrm{rad}]\) for rotational axes and in \([\mathrm{m}]\) for prismatic axes. |
|
String |
Empty if the result is valid, otherwise the reason why the transformation failed, see Error Handling. |
Note
The transformation only determines whether a mathematical solution exists for the requested configuration. The resulting joint positions are not checked against the axis position limits (see Limitations), the workspace, or the collision model (see Workspace Monitoring). A pose that is converted successfully can therefore still be rejected when it is used as the target of a motion command.
6.1.4. Error Handling
Both functions report a failed transformation through their ErrorMessage output parameter instead of a
failing method call: the OPC UA call itself completes successfully even if the transformation could not be
calculated. The ErrorMessage is empty if and only if the result is valid.
Warning
Always evaluate ErrorMessage before using any other output parameter. If the transformation fails, the
remaining output parameters are empty and must not be interpreted as a pose or as joint positions.
Table 96 lists the causes of a failed transformation.
Cause |
Function |
Remedy |
|---|---|---|
The number of submitted joint positions is not supported. |
|
See Table 91. |
The submitted Cartesian pose does not contain six elements. |
|
See Table 94. |
The submitted tool transformation or tool transformation offset does not contain six elements. |
Both |
Use |
The selected coordinate system is not supported. |
Both |
See Table 89. |
The submitted configuration vector is invalid, i.e., it contains too few elements or an element that is
neither |
|
See Number of Elements, or submit an empty array. |
The transformation itself could not be calculated, for example because the pose cannot be reached in the requested configuration. |
|
Check the pose and the requested configuration. The error message contains the reason reported by the kinematics. |