Skip to main content

Appendix B - Recording Code

Here is an up-to-date, exhaustive list of all commands and details about them in the recording data

CommandDataExample
N#Line numberN1
N2
N3
t#Time (ms) throughout recordingt1 - 1ms into the recorded data
t10 - 10ms into the recorded data
t20 - 20ms into the recorded data
{ 0:
1: }
At each time interval, all data for each follower will be between these braces.
The 0: is one follower, the 1: is another follower, (e.g. an Arm and Gripper)
{ 0: X0.15 Y2.4
1: X0 }
This example shows follower 0 given just an X and Y coordinate and follower 1 given an X coordinate.
X#.#####X coordinate in MetersX0.523
X-0.0021
Y#.#####Y coordinate in MetersY0.234
Y-0.00022
Z#.#####Z coordinate in MetersZ0.0024
Z-0.3400
rW rX rY rZQuaternion - vector pointing outward at the robot flangerW0.0498286 rX-0.032 rY0.998 rZ-0.024
F#.#####Feed rate for cartesian XYZ movementsF0.0010804
F0.0150
Fa#.#####Feed rate for orientation rW,rX,rY,rZ movementsFa0.2586200
Fa1.0053328
J6[#,#,#,#,#,#]Joint Angles during recordingJ6[2.466 26.561 11.815 -3.983 46.007 1.453]
JV6[#,#,#,#,#,#]Not Currently Used - Future
Joint Velocities during recording
JV6[0.000 0.000 0.000 0.000 0.000 0.000]

​

Feedrate - one speed for recording​

This recording below is an example of setting the feed rate for Cartesian and Orientation once at the first line, and again at the 5th line.
Lines N1 - N4 all run at the first feedrate
Lines N5- N6 run at the second feedrate.
The Feedrate takes effect for the movement on its own row and persists until updated.

N1 t1 {
0: X0.184 Y0.004 Z0.141 rW0.0498 rX-0.032 rY0.998 rZ-0.024 F0.00200 Fa0.005
}
N2 t10 {
0: X0.184 Y0.022 Z0.141 rW0.0498 rX-0.032 rY0.998 rZ-0.024
}
N3 t20 {
0: X0.184 Y0.022 Z-0.052 rW0.049 rX-0.032 rY0.998 rZ-0.024
}
N4 t31 {
0: X0.184 Y0.022 Z-0.600 rW0.049 rX-0.032 rY0.998 rZ-0.024
}
N5 t41 {
0: X-0.005 Y0.022 Z-0.6 rW0.049 rX-0.032 rY0.998 rZ-0.024 F0.00010 Fa0.400
}
N6 t51 {
0: X-0.005 Y-0.054 Z0.000 rW0.049 rX-0.032 rY0.998 rZ-0.024
}

Save Z height​

This example shows how you can place a single Z command at line N4 to move to a Z height without any other commands.

N1 t1 {
0: X0.184 Y0.004 Z0.141 rW0.0498 rX-0.032 rY0.998 rZ-0.024 F0.00200 Fa0.005
}
N2 t10 {
0: X0.184 Y0.022 Z0.141 rW0.0498 rX-0.032 rY0.998 rZ-0.024
}
N3 t20 {
0: X0.184 Y0.022 Z-0.052 rW0.049 rX-0.032 rY0.998 rZ-0.024
}
N4 t31 {
0: Z0.600
}
N5 t41 {
0: X-0.005 Y0.022 Z-0.6 rW0.049 rX-0.032 rY0.998 rZ-0.024 F0.00010 Fa0.400
}
N6 t51 {
0: X-0.005 Y-0.054 Z0.000 rW0.049 rX-0.032 rY0.998 rZ-0.024
}

Move XY only​

This example shows how you can use just an X and Y command to move in only those two axes. Line N5 moves only X and Y

N1 t1 {
0: X0.184 Y0.004 Z0.141 rW0.0498 rX-0.032 rY0.998 rZ-0.024 F0.00200 Fa0.005
}
N2 t10 {
0: X0.184 Y0.022 Z0.141 rW0.0498 rX-0.032 rY0.998 rZ-0.024
}
N3 t20 {
0: X0.184 Y0.022 Z-0.052 rW0.049 rX-0.032 rY0.998 rZ-0.024
}
N4 t31 {
0: X0.184 Y0.022 Z-0.600 rW0.049 rX-0.032 rY0.998 rZ-0.024 F0.00010 Fa0.400
}
N5 t41 {
0: X-0.005 Y0.022
}
N6 t51 {
0: X-0.005 Y-0.054 Z0.000 rW0.049 rX-0.032 rY0.998 rZ-0.024
}

Optimized code​

Here is an example of our code fully optimized

  • Our Orientation never changes
  • Our first command sends us to the full position at a set feed rate.
  • N2 only moves Y axis
  • N3 - N4 only move Z axis
  • N5 moves X and changes Feedrate
  • N6 moves Y and Z
N1 t1 {
0: X0.184 Y0.004 Z0.141 rW0.0498 rX-0.032 rY0.998 rZ-0.024 F0.00200 Fa0.005
}
N2 t10 {
0: Y0.022
}
N3 t20 {
0: Z-0.052
}
N4 t31 {
0: Z-0.600
}
N5 t41 {
0: X-0.005 F0.00010 Fa0.400
}
N6 t51 {
0: Y-0.054 Z0.000
}