The Location Class and its instances (Location Objects or just Locations) are the fundamental means for specifying robot and part positions and orientations in GPL. Each Location Object contains data that defines: a position and orientation; special robot configuration information specific to the geometry of the robot to be used; and clearance data that define a safe position by which the Location can be approached.
There are two basic types of Location Objects: Cartesian Locations and Angles Locations.
A Cartesian Location stores a robot or part position and orientation in Cartesian coordinates. That is, positions and orientations are represented as X, Y, and Z displacements and rotations in a Cartesian coordinate system.
This is a very intuitive representation and has the advantage of representing positions and orientations in a manner that is independent of a robot’s geometry. When a Cartesian Location is specified as a destination for a robot motion, the system automatically utilizes its built-in knowledge of the robot’s geometry (i.e. its kinematics) to convert this Cartesian position into an equivalent set of robot axes positions. Furthermore, if the kinematic model of the robot includes corrections for manufacturing tolerances (e.g. non-perpendicularity of axes, deviations in link lengths), the Cartesian Locations will be automatically corrected for these variances.
In addition to containing a position and orientation, a Cartesian Location also has an optional pointer to a reference frame object (RefFrame). If RefFrame is specified, the Cartesian position and orientation is understood to be relative to the reference frame. When such a Location is specified as a destination for a robot motion, GPL automatically combines the Cartesian Location’s position and orientation with the reference frame to compute the absolute coordinates for the robot’s destination.
The use of relative coordinates and reference frames is a very powerful technique since it allows related positions and orientations to be moved as a group. For example, all of the IC chips on a PC board or all of the sample tubes in a tray can be defined relative to a reference frame. If the PC board or the tray is misaligned, the position and orientation of the reference frame can be updated and the absolute values of all of the associated Locations will automatically be corrected as well.
For even greater flexibility, a reference frame can itself be defined relative to another reference frame.
An Angles Location stores a robot position as a set of axes position values. This is the traditional method of representing robot locations and was utilized extensively prior to the introduction of kinematic models. It consists of one axis position value for each degree-of-freedom of the robot.
This method has the benefit of fully and uniquely defining a position of a robot. However, there are several disadvantages of this method relative to the Cartesian representation. For one, if the robot has serial linkages or rotary axes for determining the position of the tool, it is often difficult to intuitively determine how to change the axes positions to effect a desired change in the position or orientation of the robot’s tool. Secondly, the use of axes positions makes application programs non-portable between robots with different geometries or even the same geometry but different sizes. Finally, while this representation is sufficient for describing the position and orientation or a robot, it cannot be easily used to define arbitrary positions and orientations of parts and part relationships within the workspace.
The storage of axes positions has been included for completeness and does have its uses. However, it is recommended that Cartesian Locations be applied whenever possible.
In order to distinguish the type of data stored in a Location, a “Type” property is provided. This indicates if the object is an Angles Location or a Cartesian Location. If the Location is a Cartesian type, it can also have an optional pointer to a RefFrame Object.
For most common operations that require the position and orientation of a Location Object, the data of interest is referred to the “total position” or “position” of the Location. The “total position” or “position” is synonymous with the following:
For Cartesian Locations without a reference frame, the position and orientation stored in the Location.
For Cartesian Locations with a reference frame, the combination of the position and orientation stored in the Location with the position and orientation of its reference frame.
For Angles Locations, the stored axes positions.
For some computations, it is convenient to access the Cartesian position and orientation stored in a Cartesian Location while ignoring the optional reference frame. To distinguish this value from the “total position”, this data is referred to as the Location’s “position with respect to the reference frame” (PosWrtRef) whether or not a reference frame is specified. The PosWrtRef property is not meaningful for Angles Locations.
Throughout GPL, Cartesian positions and orientations are internally stored as a sparse 4 by 4 matrix called a “homogeneous transformation”. This matrix represents the three positional degrees-of-freedom and the three rotational degrees-of-freedom needed to fully specify a robot or part position and orientation in Cartesian coordinates. Homogeneous transforms have several computational advantages and are used to store the “total position” of Cartesian Locations, PosWrtRef values, reference frames positions and orientations, and during Cartesian Location position and orientation computations. However, while this representation has computational benefits, entering the values for the elements of a 4 by 4 homogeneous transformation matrix is not very convenient.
To simplify data entry, transformation values are converted to X, Y, and Z position displacement components and three “Euler angles”. The three Euler angles consist of a rotation about the Z-axis, followed by a rotation about the new Y-axis, followed by a rotation about the new Z-axis. This set of displacements and angles is often referred to as X, Y, Z, Yaw, Pitch, and Roll. In general terms, if you are standing up straight and looking at the horizon, the Yaw angle is the amount that you rotate to look left and right along the horizon. The Pitch angle defines if you subsequently tilt your head to look up into the sky or down into the ground. The Roll angle defines a final rotation of your head about its new vertical axis. The X, Y, and Z values are in units of millimeters and the Yaw, Pitch, and Roll are in units of degrees.
Since flexible automation must be able to alter a robot’s actions in order to accommodate process variations, one of the most important features of the GPL system is the ability to efficiently and easily mathematically manipulate position and orientation data. In the case of AnglesLocations, this capability is limited to providing the ability to change individual axes position values. However, for Cartesian Locations, a much more powerful mathematics is provided.
As mentioned above, each Cartesian Location can have a reference frame or series of reference frames associated with it. These reference frames can not only translate but also rotate the base coordinate system in which the positions are defined. This allows arbitrary 6 degree-of-freedom adjustments to be applied to correct for part and process tolerances and variations.
More generally, GPL includes several methods that can be used to combine the positions and orientations of Cartesian Locations and reference frames. Reference frames are a super-set of Cartesian Locations. So, in the following paragraphs, the comments concerning Locations apply to reference frames as well.
When we combine multiple Location positions and orientations, it is easiest to think of Location Objects as representing a change in position and orientation with respect to a coordinate system, which in turn defines a new coordinate system. So, if we have a Location A, A can be thought of as defining a new coordinate system relative to its base coordinate system. If we combine A with a second Location B, the change in position and orientation of B is interpreted with respect to the new coordinate system defined by A. If a third Location C is added, the combination of A, B, and C can be computed by interpreting the change in position and orientation of C with respect to the coordinate system generated by combining A and B.
As a specific example, let’s consider the simple case without rotations where Location A has a X, Y, Z value of (10,25,-40) and Location B has a X, Y, Z value of (0,5,0). If we now combined the values, B’s incremental displacement of 5 mm along its Y-axis should be interpreted with respect to A’s prior translations. The combined result would be (10,30,-40). Now, we can see what happens if we change A so it includes a 90-degree rotation about its Z-axis (10,25,-40,0,0,90). In this case, when we combine the two values, B’s base Y-axis has been rotated to point along the negative X-axis of A’s base coordinate system. So, the resulting combination would be (5,25,-40,0,0,90).
In addition to combining Locations, we can also eliminate the effects of Locations by computing the “inverse” of a Location. An inverse negates the change in position and orientation of a Location. When we combine these negative results with other computations in the proper order, we can unwind Location computations.
The Location Class and its Object include not only basic properties, but also extensive methods for mathematically manipulating the positions and orientations contained with these objects. All of these properties and methods are described in detail in the Reference Documentation section and are briefly summarized in Table 19-14.
| Member | Type | Description |
|---|---|---|
|
location_obj.Angle |
Property |
Sets and gets a single axis position for an Angles Location. |
|
location_obj.Angles |
Method |
Changes all of the axes positions values in an Angles Location. |
|
location_obj.Clone |
Method |
Returns a copy of the location_obj. |
|
location_obj.Config |
Property |
Sets and gets the bit flags that specify special robot specific location attributes. |
|
location_obj.ConveyorLimit |
Method |
Returns the distance that a Location, which is defined relative to a conveyor reference frame, is from the operating limits of the conveyor. |
|
Location.Distance |
Method |
Returns the distance between the XYZ positions of two Cartesian Locations. |
|
location_obj.Here |
Method |
Modifies the “total position” of the location_obj to be equal to the current location of a robot. |
|
location_obj.Here3 |
Method |
Defines the "total position" of location_obj based upon the XYZ coordinates of three specified locations. |
|
location_obj.Inverse |
Method |
Returns the inverse of the “total position” of the Cartesian location_obj. |
|
location_obj.Kinesol |
Method |
Returns a Cartesian Location equivalent to an Angles Location for a specific kinematic model or vise versa. |
|
location_obj.Mul |
Method |
Returns the result of combining the “total position” of location_obj with the “total position” of another Cartesian Location. |
|
location_obj.Normalize |
Method |
Corrects the value of the PosWrtRef of a Cartesian Location for any mathematical inconsistencies in the value. |
|
location_obj.Pitch |
Property |
Sets and gets the Pitch angle of the PosWrtRef of a Cartesian Location. |
|
location_obj.Pos |
Property |
Sets and gets the “total position” of the location_obj. |
|
location_obj.PosWrtRef |
Property |
Sets and gets the PosWrtRef of a Cartesian Location. |
|
location_obj.Roll |
Property |
Sets and gets the Roll angle of the PosWrtRef of a Cartesian Location. |
|
location_obj.Text |
Property |
Sets and gets a String value not used by GPL. Available for general use by applications. |
|
location_obj.Type |
Property |
Sets and gets the Type specification. |
|
location_obj.X |
Property |
Sets and gets the X position value of the PosWrtRef of a Cartesian Location. |
|
location_obj.XYZ |
Method |
Changes the X, Y, Z, Yaw, Pitch, and Roll values of the PosWrtRef of a Cartesian Location. |
|
location_obj.XYZInc |
Method |
Increments the X, Y, and Z values of the PosWrtRef of a Cartesian Location. |
|
Location.XYZValue |
Method |
Returns a Cartesian Location with a "total position" equal to specified X, Y, Z, Yaw, Pitch, and Roll coordinates. |
|
location_obj.Y |
Property |
Sets and gets the Y position value of the PosWrtRef of a Cartesian Location. |
|
location_obj.Yaw |
Property |
Sets and gets the Yaw angle of the PosWrtRef of a Cartesian Location. |
|
location_obj.Z |
Property |
Sets and gets the Z position value of the PosWrtRef of a Cartesian Location. |
|
location_obj.ZClearance |
Property |
Sets and gets the distance along the Z-axis that defines the safe approach position to the Location. |
|
location_obj.ZWorld |
Property |
Sets and gets the flag that indicates if the approach distance is measured along the Tool or World Z coordinate axis. |