V+ 12.4 Release Notes

Displays the Table of Contents for the current document
Displays the previous topic in the current document
Displays the next topic in the current document
Displays the Index for the current document

SOLVE.ANGLES o.jts[o.idx], o.flags, error = trans,
i.jts[i.idx],i.flags

 
Function

Compute the robot joint positions (for the current robot) that are equivalent to a specified transformation.

Usage Considerations

Since the computation performed by this instruction is a function of the geometry of the robot (link dimensions, number of axes, tool offsets, base offsets), robots with different geometric parameters will yield different results. In fact, since robots of the same general type may differ slightly in their dimensions, this instruction may return slightly different results when executed on two different robot systems of the same type.

The SOLVE.ANGLES instruction returns information for the robot selected by the task executing the instruction.

If the V+ system is not configured to control a robot, executing this instruction will not generate an error due to the absence of a robot. However, the information returned may not be meaningful.

Parameter s

o.jts Real-valued array in which the computed joint angles are returned. The first specified element of the array will contain the position for joint #1, the second element will contain the value for joint #2, etc. For rotating joints, the joint positions will be in degrees. For translational joints, the joint positions will be in millimeters.

If a computed joint position is outside the working range for the joint, the limit stop closest to the initial joint position (as indicated by i.jts[ ]) will be returned.

o.idx Optional real value, variable, or expression (interpreted as an integer) that identifies the array element to receive the position for joint #1. If no index is specified, array element zero will contain the position for joint #1.

o.flags Real variable that receives a bit-flag value that indicates the configuration of the robot corresponding to the computed joint positions. The bit flags are interpreted as follows:
Bit Flag
Description
Bit 1 (LSB): RIGHTY (mask value = 1)
If this bit is set, the position has the robot in a right-arm configuration. Otherwise, the position has the robot in a left-arm configuration.
Bit 2: BELOW (mask value = 2)
If this bit is set, the position has the robot configured with the elbow below the line from the shoulder to the wrist. Otherwise, the robot elbow is above the shoulder-wrist line. (This bit is always 0 when a SCARA robot is in use.)
Bit 3: FLIP (mask value = 4)
If this bit is set, the position has the robot configured with the pitch axis of the wrist set to a negative angle. Otherwise, the pitch angle of the robot wrist has a positive value. (This bit is always 0 when the robot does not have a three-axis wrist, which is the case for a SCARA robot.)

error Real variable that receives a bit-flag value that indicates if any joint positions were computed to be outside of their working range, or if the XYZ position of the destination was outside the working envelope of the robot. The bit flags are interpreted as follows:

Bit Flag
Description
Bits 1 - 12:
Joint/Motor out of range
If set, the computed value for the joint or motor was found to be outside of its limit stops:
Bit
Joint/Motor #
Mask Value
1
1
^H1
2
2
^H2
3
3
^H4
4
4
^H8
5
5
^H10
6
6
^H20
7
7
^H40
8
8
^H80
9
9
^H100
10
10
^H200
11
11
^H400
12
12
^H800
Bit 13: Collision
(mask value =
^H1000)
When this bit is turned on, a collision has been detected. This is returned in the error variable.
Bit 14: Too close (mask value = ^H2000)
The XYZ position of the destination could not be reached because it was too close to the column of the robot.
Bit 15: Too far (mask value = ^H4000)
The XYZ position of the destination could not be reached because it was too far away from the robot.
Bit 16: Joint vs. motor (mask value = ^H8000)
If set, a motor is limiting. Otherwise, a joint is limiting.

trans Transformation variable, function, or compound transformation that defines the robot location of interest.

i.jts Real array that contains the joint positions representing the starting location for the robot. These values are referenced: (1) for multiple-turn joints to minimize joint rotations, and (2) when a computed joint position is out of range to determine which limit stop to return.

The first specified element of the array must contain the position for joint #1. The second element must contain the value for joint #2, etc. For rotating joints, the joint positions are assumed to be in degrees. For translational joints, the joint positions are assumed to be in millimeters.

i.idx Optional real value, variable, or expression (interpreted as an integer) that identifies the array element that contains the position value for joint #1. If no index is specified, element zero must contain the position for joint #1.

i.flags Real value, variable, or expression whose value is interpreted as bit flags that indicate: (1) the initial configuration of the robot, (2) any changes in configuration that are to be made, and (3) special operating modes. The bit flags are interpreted as follows:
Bit Flag
Description
Bit 1 (LSB): RIGHTY
(mask value = 1)
If this bit is set, the robot is assumed initially to be in a right-arm configuration. Otherwise, the robot is assumed to be in a left-arm configuration.
Bit 2: BELOW
(mask value = ^H2)
If this bit is set, the robot is assumed initially to have its elbow below the line from the shoulder to the wrist. Otherwise, the robot is assumed to have its elbow above that line. (This bit is ignored for robots, like the SCARA configurations, that do not have an elbow that moves in a vertical plane.)
Bit 3: FLIP
(mask value = ^H4)
If this bit is set, the robot is assumed initially to have the pitch axis of the wrist set to a negative value. Otherwise, the pitch angle is assumed to be set to a positive value. This bit is ignored if the robot does not have a three-axis wrist.
Bit 9: Change RIGHTY/LEFTY
(mask value = ^H100)
If this bit is set, the instruction will attempt to compute a set of joint positions corresponding to the RIGHTY/LEFTY configuration specified by bit 10.
Bit 10: Change to RIGHTY (mask value = ^H200)
When bit 9 is set and this bit is set, the instruction will attempt to compute joint positions for a right-arm configuration. If bit 9 is set and this bit is 0, the instruction will attempt to compute a set of joint positions for a left-arm configuration.
Bit 11: Change BELOW/ABOVE
(mask value = ^H400)
If this bit is set, the instruction will attempt to compute a set of joint positions corresponding to the BELOW/ABOVE configuration specified by bit 12. This bit is ignored for robots, like the SCARA configurations, that do not have an elbow that moves in a vertical plane.
Bit 12: Change to BELOW (mask value = ^H800)
When bit 11 is set and this bit is set, the instruction will attempt to compute joint positions for an elbow-down configuration. If bit 11 is set and this bit is 0, the instruction will attempt to compute joint positions for an elbow-up configuration. This bit is ignored for robots, like the SCARA configurations, that do not have an elbow that moves in a vertical plane.
Bit 13: Change FLIP/NOFLIP
(mask value = ^H1000)
If this bit is set, the instruction will attempt to compute a set of joint positions corresponding to the FLIP/NOFLIP configuration specified by bit 14. This bit is ignored if the robot does not have a three-axis wrist.
Bit 14: Change to FLIP (mask value = ^H2000)
When bit 13 is set and this bit is set, the instruction will attempt to compute joint positions for a FLIP wrist configuration. If bit 13 is set and this bit is 0, the instruction will attempt to compute joint positions for a NOFLIP wrist configuration. This bit is ignored if the robot does not have a three-axis wrist.
Bit 21: Avoid degeneracy (mask value = ^H100000)
When this bit is set, if the computed value of joint #2 is within 10 degrees of having the outer link straight out (that is, joint 2 between -10 and +10 degrees in value), an out-of-range error for joint 2 will be signaled.
Bit 22: Single-turn joint 4 (mask value = ^H200000)
When this bit is set, the computed value of joint 4 will be restricted to the range of -180 to +180 degrees.
Bit 23: Straight-line motion (mask value = ^H400000)
When this bit is set, the joint positions returned must correspond to the same configuration as those initially specified. That is, no change in robot configuration is allowed.

Details

This instruction computes the joint positions that are equivalent to a specified transformation value using the geometric data of the robot connected to the system. The specified transformation is interpreted to be the position and location of the end of the robot tool in the World coordinate system, taking into consideration the current TOOL transformation and BASE offsets.

Example

The instructions below do not perform any useful function but are intended to illustrate how the SOLVE.ANGLES instruction operates. After execution of these instructions, both the jts2 and jts arrays will contain approximately the same values. Any differences in the values are due to computational round-off errors:

HERE #cpos
DECOMPOSE jts[] = #cpos
SOLVE.TRANS new.t, error = jts[]
SOLVE.ANGLES jts2[], flags, error = new.t, jts[], SOLVE.FLAGS(jts[]) 

Related Keyword s

DECOMPOSE (program instruction)

SELECT (device_type, mode) (program instruction and real-valued function)

SOLVE.FLAGS (real-valued function)

SOLVE.TRANS (program instruction)

Syntax
STATE-R

Please submit comments to: techpubs@adept.com

Last modified on: 07/08/2004
Copyright © 2004 by Adept Technology, Inc.
All rights reserved.