Sensing#
Arm Sensing#
Can 6-Axis Arm Move to Position#
The Can 6-Axis Arm Move to Position block is used to report if the 6-Axis Robotic Arm is able to reach the specified position.
<[arm v] move to position x: (0) y: (0) z: (0) [mm v] ?>
The Can 6-Axis Arm Move to Position block reports True
when the 6-Axis Arm can reach that position.
The Can 6-Axis Arm Move to Position block reports False
when the 6-Axis Arm can not reach that position.
Choose which 6-Axis Arm to use.
Select which unit to use: millimeters (mm) or inches.
In this example, the 6-Axis Arm will check if it can move to (0, 0, 0) and print that it can not reach the position.
when started :: hat events
if <not <[arm v] move to position x: (0) y: (0) z: (0) [mm v] ?>>then
print [The Arm can't move to this position.] ▶
Can 6-Axis Arm Increment Move to Position#
The Can 6-Axis Arm Increment Move to Position block is used to report if the 6-Axis Robotic Arm is able to incrementally move for that distance.
<[arm v] increment position by x: (0) y: (0) z: (0) [mm v] ?>
The Can 6-Axis Arm Increment Move to Position block reports True
when the 6-Axis Arm can incrementally move for that distance.
The Can 6-Axis Arm Increment Move to Position block reports False
when the 6-Axis Arm can not incrementally move for that distance.
Select which unit to use: millimeters (mm) or inches.
In this example, the 6-Axis Arm will check if it can increment move for 500 millimeters on the Y axis and print that it can’t move for that distance.
when started :: hat events
if <not <[arm v] increment position by x: (0) y: (500) z: (0) [mm v] ?>>then
print [The Arm can't incremental move for this distance.] ▶
Can 6-Axis Arm End Effector Move to Orientation#
The Can 6-Axis Arm End Effector Move to Orientation block is used to report if the 6-Axis Arm’s End Effector can rotate about an axis to a specific orientation.
<[arm v] move end effector to [pitch v] (0) degrees?>
The Can 6-Axis Arm End Effector Move to Orientation block reports True
when the 6-Axis Arm can rotate about an axis to a specific orientation.
The Can 6-Axis Arm End Effector Move to Orientation block reports False
when the 6-Axis Arm can not rotate about an axis to a specific orientation.
Select which axis to use:
pitch - Movement around the Y-axis.
roll - Movement around the X-axis.
yaw - Movement around the Z-axis.
In this example, the 6-Axis Arm will check if the End Effector can point towards the 40 degrees position on the X axis and print if it can or can not.
when started :: hat events
if <[arm v] move end effector to [roll v] (40) degrees?> then
print [The End Effector can move to this orientation.] ▶
else
print [The End Effector can move to this orientation.] ▶
Can 6-Axis Arm End Effector Incrementally Move to Orientation#
The Can 6-Axis Arm End Effector Incrementally Move to Orientation block is used to report if the 6-Axis Arm’s End Effector can incrementally rotate about an axis its orientation for a specific amount of degrees.
<[arm v] increment orientation by [pitch v] (0) degrees?>
The Can 6-Axis Arm End Effector Incrementally Move to Orientation block reports True
when the 6-Axis Arm can incrementally rotate about an axis for a specific amount of degrees.
The Can 6-Axis Arm End Effector Incrementally Move to Orientation block reports False
when the 6-Axis Arm can not incrementally rotate about an axis for a specific amount of degrees.
Select which axis to use:
pitch - Rotation around the Y-axis.
roll - Rotation around the X-axis.
yaw - Rotation around the Z-axis.
In this example, the 6-Axis Arm will check if the End Effector can increment move for 20 degrees on the Z axis and print if it can or can not.
when started :: hat events
if <[arm v] increment orientation by [yaw v] (20) degrees?> then
print [The End Effector can increment move for this distance.] ▶
else
print [The End Effector can not increment move for this distance.] ▶
6-Axis Arm is Done?#
The 6-Axis Arm is Done? block is used to report if the 6-Axis Arm has completed moving.
<[arm v] is done moving?>
The 6-Axis Arm is Done? block reports True
when the 6-Axis Arm is not moving.
The 6-Axis Arm is Done? block reports False
when the 6-Axis Arm is moving.
In this example, the Arm will move to the position (-100, 200, 100) and print its Y coordinate in mm every .25 seconds as it moves, until it is done moving.
when started :: hat events
[Move to (-100, 200, 100) and let subsequent blocks trigger.]
move [Arm1 v] to position x: (-100) y: (200) z: (100) [mm v] ◀ and don't wait
[Repeat the blocks until the Arm has finished moving.]
repeat until <[Arm1 v] is done moving?>
[Print the Arm's current Y position in mm on the Brain every .25 seconds.]
print ([Arm1 v] position [y v] in [mm v]) on [Brain v] ◀ and set cursor to next row
wait (0.25) seconds
6-Axis Arm Position#
The 6-Axis Arm Position block is used to report the current position of the 6-Axis Arm in the specified axis.
([arm v] position [x v] in [mm v])
Choose which axis to report.
Choose which unit to report with: millimeters (mm) or inches.
In this example, the 6-Axis Arm will print its current Z axis position in millimeters to the Print Console.
when started :: hat events
print ([arm v] position [z v] in [mm v]) ▶
6-Axis Arm End Effector Orientation#
The 6-Axis Arm End Effector Orientation block is used to report the current orientation of the 6-Axis Arm’s End Effector.
([arm v] orientation [pitch v] in degrees)
Choose which axis to report:
pitch - Rotation around the Y-axis.
roll - Rotation around the X-axis.
yaw - Rotation around the Z-axis.
In this example, the 6-Axis Arm will print the End Effector’s current Y axis orientation in degrees to the Print Console.
when started :: hat events
print ([arm v] orientation [pitch v] in degrees) ▶