Difference between revisions of "MC-Basic:TOJOINT"

From SoftMC-Wiki
Jump to: navigation, search
m (1 revision)
m (corrected formula)
Line 25: Line 25:
  
 
value = 1– Righty(armcmd = 2)
 
value = 1– Righty(armcmd = 2)
 
  
  
Line 43: Line 42:
  
 
value = 1 – Righty(armcmd = 2)
 
value = 1 – Righty(armcmd = 2)
 
 
 
  
  
Line 51: Line 47:
  
 
The configuration flag argument of the tojoint is defined as:
 
The configuration flag argument of the tojoint is defined as:
 +
:<math>
 +
cfg = \sum_{i=0,1,2}(value_i-1)\cdot 2^i
 +
</math>
  
 +
Return Value:    Joint point
  
 
+
{{Note|Constants lefty, righty, above, below, flip and noflip are defined as [[Axystems:MC-Basic:Predefined constants|built-in constants]] of the MC-BASIC language.}}
<sub></sub>
 
 
 
 
 
 
 
Note! Constants lefty, righty, above, below, flip and noflip are defined as built-in constants of the MC-BASIC language.
 
 
 
Return Value:     Joint point
 
  
 
|TYPE=
 
|TYPE=

Revision as of 17:08, 13 December 2010

Converts a location point to a joint point the inverse kinematics function implementation. Input parameters:

<Robot> = name of the group for which the direct kinematics is computed, when a WITH command is executed this argument is not needed (the comma should also be omitted).

<Location> = location coordinates of the point to be translated into joint coordinates.

<configuration> = integer describing the configuration of the returned joint position (for SCARA it is the same as ARMCMD or ARMFBK).


The number and type of configuration flags depend on each robot type. Note that robot properties ARMCMD, ECMD, WCMD have all three values(0,1,2) where 0 is reserved for AUTO option. The configuration bits hovewer have only two values (0,1).

for SCARA robot : Arm ( Bit 0):     value = 0 – Lefty(armcd = 1)

value = 1– Righty(armcmd = 2)


for PUMA robot :   Arm ( Bit 0):     value = 0 – Lefty(armcd = 1)

value = 1 – Righty(armcmd = 2)

Elbow ( Bit 1): value = 0 – Below(ecmd = 1)

value = 1 – Above(ecmd = 2)

Wrist ( Bit 2):   value = 0-  Noflip(wcmd = 1)

value = 1 – Flip (wcmd = 2)

for TRAVERSEARM robot: Arm ( Bit 0):    value = 0 – Lefty(armcd = 1)

value = 1 – Righty(armcmd = 2)


for DELTA, SCISSORS, … and other robots that have no configuration flags these fileds are not used.

The configuration flag argument of the tojoint is defined as:

Return Value: Joint point

NOTE-Info.svgNOTE
Constants lefty, righty, above, below, flip and noflip are defined as built-in constants of the MC-BASIC language.

Syntax

<joint_variable>=ToJoint (<Robot>, <location>, <configuration>)

Availability

Versions 3.7.x and higher

Scope

Task, Terminal

Limitations

Not in Configuration context

The joint variable and the location parameter must either have a group type identical to the group parameter, or have the same number of coordinates.

The values of the configuration argument (the long type parameter) can be only: 0, 1 or 2, with the same meaning as ARMCMD.

Examples

? ToJoint (G1, #{1,2,3}, 1)

? ToJoint (G1, G1.Here, X)

-->?ToJoint(#{768.198 , 0 , 233.198 , 0 , 180 , 0},0b010)J1 = ToJoint (SCARA, L1, 0)

See Also