Difference between revisions of "MC-Basic:IsLocationReachable"
Line 1: | Line 1: | ||
{{Languages|MC-Basic:IsLocationReachable}} | {{Languages|MC-Basic:IsLocationReachable}} | ||
− | + | {{MC-Basic |SHORT FORM= |SYNTAX= <''joint_variable''>=IsLocationReachable''(<robot>, <location>, <configuration>)'' | |
|AVAILABILITY= Since Version 3.7.x | |AVAILABILITY= Since Version 3.7.x | ||
|DESCRIPTION= Checks the given point if it is reachable by the given robot. Checks both Cartesian and joint limits. Input parameters: | |DESCRIPTION= Checks the given point if it is reachable by the given robot. Checks both Cartesian and joint limits. 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). <br> | <''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). <br> | ||
<location>: location coordinates of the point to be translated into joint coordinates. <br> | <location>: location coordinates of the point to be translated into joint coordinates. <br> | ||
Line 9: | Line 8: | ||
− | for SCARA robot : Arm (Bit 0) | + | for SCARA robot : Arm |
− | + | (Bit 0) | |
value = 0 – Lefty (armcd = 1) | value = 0 – Lefty (armcd = 1) | ||
− | |||
value = 1 – Righty (armcmd = 2) | value = 1 – Righty (armcmd = 2) | ||
Revision as of 13:20, 7 March 2021
Language: | English |
---|
Checks the given point if it is reachable by the given robot. Checks both Cartesian and joint limits. 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 however 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): 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 fields are not used.
The configuration flag argument of the IsLocationReachable is defined as:
NOTE | |
In this function we can notuse "AUTO" option, therefore this formula differ slightly from bitmap in TOJOINT |
NOTE | |
Constants lefty, righty, above, below, flip and noflip are defined as built-in constants of the MC-Basic language. |
Syntax
<joint_variable>=IsLocationReachable(<robot>, <location>, <configuration>)
Availability
Since Version 3.7.x
Type
Return Type: Long 0 - point is reachable
1,2,3,4,... - index of axis that exceed position limits
Others - system error, basically there is no single axis that exceeds limit but the combination of segment length and input cartesian point does not have solution of Inverse Kinematics. Can be:
* 121 - The target point is not reachable.
* 119 - Point too far. Outside of the working envelope. The target coordinates are too far from the robot's Cartesian space origin point.
* 125 - Wrong point type.
more of them can be found in [Codes], just add to return value 3000 for motion and 13000 for robot errors
.
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, or 1