location_object.KineSol Method

Returns a Cartesian Location Object equivalent to an Angles Location Object for a specific kinematic model or vise versa.

...location_object.KineSol(mode, location)

Prerequisites

A robot must be currently Selected, but need not be Attached.

Parameters

mode

An optional numeric expression that defines the operational mode for this function.  If this value is 1, any conversion errors (e.g. joint out-of-range, position too far/close) are ignored.  If this value is 0, these errors will generate a program exception.  If not specified, this value defaults to 0.

location

An optional locations expression that must produce a Joints type location value. If specified, this is passed to the reverse kinematics routine that converts a Cartesian Location value into an equivalent Joints Location value. These values are used by the conversion routine as a starting point for computing the joint angles. If a rotary axis can turn more than 360 degrees, the conversion routine will try to keep the final angle within +/- 180 degrees of the passed in angle. For "extra" independent axes such as servo grippers and linear rails, the passed in position is returned as the axis position. This argument is not currently used by the kinematics routines that convert Joint Locations to Cartesian Locations.

Remarks

This method converts a set of axes positions to an equivalent Cartesian position and orientation or converts a Cartesian position and orientation to an equivalent set of axes positions based upon the Selected robot’s geometry (kinematics). These operations are typically called the “forward and reverse kinematic solutions” and require an optional kinematic module.

Specifically, if the location_object is an Angles type, the KineSol method returns a Location Object with the properties in the table below.

Property Returned Location Object Value

Type

Cartesian Location

PosWrtRef

Equivalent to location_objectAngles values

Config

Appropriate for location_objectAngles values

RefFrame

Null

All other properties

Same as location_object

 

Alternatively, if the location_object is a Cartesian type, the KineSol method returns a Location Object with the properties in the table below.

Property Returned Location Object Value

Type

Angles Location

Angles

Equivalent to location_object’s“total position”

Config

0

RefFrame

Null

All other properties

Same as location_object

If Uncertified Safety Zones are defined and the "mode" is 0, both the input Cartesian location and the Cartesian location generated as a result of a conversion will be tested to verify that no uncertified Safety Zones have been violated. 

Examples

 
Dim loc1 As New Location ' Create new Location set to default values
Dim loc2, loc3 As Location
Dim axis2 As Double
loc1.Angles(12, 42, 17) ' Assume these values legal values for robot
loc2 = loc1.KineSol ' Set loc2 to equivalent Cartesian Location
loc3 = loc2.KineSol ' Regenerate Angles Location
axis2 = loc3.Angle(2) ' axis2 should be 42 as in loc1

See Also

Location Class | location_object.Inverse |location_object.Mul | Robot.Selected