Defining Relations
This task describes how to define kinematic relations.
- Select Kinematic Relations
You are prompted to select a robot.
- Select a robot.
A dialog box listing the non-command joints of the mechanism appears.
- Select a joint from
the list of non-command joints (or directly in the work area)
for which a kinematic relation is to be defined, and click
Add/Edit Relation button to define and compile the
kinematic expression. If the selected joint already has a kinematic
expression defined for it, this expression will be displayed
in the expression editor. The existing expression may then be
edited, if necessary.
-
Joint expressions may be typed directly into the Define Joint
Kinematic Relationship dialog without using the supplied dictionaries.
-
Click OK to apply the defined relationship and close
the dialog box.
-
Dictionary types
The substrings used to compile a kinematic expression are categorized into various dictionaries as as shown in the Define Joint Kinematic Relationship dialog. Each dictionary contains a predefined set of strings.
The contents of the Degree of Freedom (DOF) dictionary is dependent upon the number of DOFs of the mechanism. For a mechanism with N degrees of freedom, the Degree of Freedom dictionary will have DOF(1), DOF(2), ...DOF(N).
The User Variables dictionary will list all of the user-defined variables that have been created.
Operators Math Functions ;
abs
SASA
,
acos, asin, atan
SASS
=
acosr, asinr, atanr
SSSA
+
cos, sin, tan
RANGE
-
cosr,sinr, tanr
INRANGE
*
exp
SASASA
/
Int
SASASS
^
sqrt
SASSSA1
%
floor, ceil
SASSSA2
(
log,log10
RAMP
)
The members of the Operators, Math, and Functions dictionaries are defined as follows:
Operators ; Separator for expressions. Useful in case of multiple expressions for a non-command joint. , Arguments separator in a function = Assignment + Unary plus, binary addition - Unary minus, binary subtraction * Binary multiplication / Binary division ^ Exponent % Module operator ( Opening parenthesis ) Closing parenthesis Math abs(x) returns absolute value acos(x) asin(x) atan(x) returns arc cos, sin, tan in degrees acosr(x) asinr(x) atanr(x) returns arc cos, sin, tan in radians cos(x) sin(x) tan(x) Returns cos, sin, tan in degrees cosr(x) sinr(x) tanr(x) Returns cos, sin, tan in radians exp(x) Returns e raised to power x int(x) Returns integer value resulting from truncation sqrt(x) Returns square root floor(x) ceil(x) Returns floor, ceiling of x log(x) log10(x) Returns natural logarithm, logarithm base 10 Functions Usage The following functions are useful for solving triangles given three sides of the triangle (s1, s2, s3) and one of its angle (a1). Note that all angles are in radians.
sasa(s1,a1,s2) returns angle opposite side s1 sass(s1,a1,s2) returns length of side opposite angle a1 sssa(s1,s2,s3) returns angle opposite side s1 The following functions are useful for solving convex quadrilaterals given four sides (s1, s2, s3, s4) and two of its angles (a1, a2). Note that all angles are in radians.
sasasa(s1,a1,s2,a2,s3) returns angle between sides s3 and s4 sasass(s1,a1,s2,a2,s3) returns length of unknown side s4 sasssa1(s1,a1,s2,s3,s4) returns angle between sides s2 and s3 sasssa2(s1,a1,s2,s3,s4) returns angle between sides s3 and s4 A ramp function will assist in calculating the joint values of a joint whose upper and lower bounds are dependant on the values of another joint.
yy = ramp(xx,x1,y1,x2,y2) returns yy as a linear function of xx, where the inputs x1, y1, x2, y2 are used to define the ramp. inrange(a,b,c) returns 1 if b <= a < c and 0 otherwise range(a,b,c) returns a if b < a, c if b > c and b otherwise Note:
If xx is < x1 then yy stays at y1
If xx is > x2 then yy stays at y2
However, an expert user may directly key in the joint expression with out using the dictionaries provided. You may create/edit/delete user-variables (if required) using the button Create, Edit and Delete buttons. Any new variable created by you will be added to the User-defined Variables dictionary and subsequently can be used in the kinematic expression of the joints. The user variables thus defined are available for use in the kinematics expression of any NC joint of the mechanism. For a list of the values used in converting radians to degrees (or vice versa), plus the value of PI used in this software, click here.