Zum Hauptinhalt springen

Macro File Format

This section provides a deeper overview of the recorded .hrpr macro file format.

When you open a recorded .hrpr file, you will see a series of header fields followed by the recorded motion data organized by time step.

The header contains the following keys:

  • FORMAT_VERSION: Specifies the version of the .hrpr file format.
  • PROGRAM_NAME: Specifies the full path where the file was saved. Mixed \ and / separators, as well as repeated //, do not affect file interpretation.
  • DATE: Specifies the date when the recording was created.
  • SAMPLE_RATE: Specifies the recording frequency. HARP records at 100 samples per second (100 Hz).
  • POSITION_LEADER: Identifies the Inverse3 device used as the position leader during the recording.
  • ORIENTATION_LEADER: Identifies the VerseGrip or Ruko device used as the orientation leader during the recording.
  • FOLLOWERS: Lists the follower devices included in the recording. For example, cg_0 refers to Control Group 0, and the value in brackets identifies the follower slot within that control group.
  • DESCRIPTION: Stores an optional free-text description associated with the recording.

Following the header, the recorded motion data is stored using the format described in the table below.

FieldMeaningExample
N#Frame numberN1
N169
t#Time as a Unix timestamp in millisecondst1788878409547
{...}Holds one frame. Each follower line ends with ,. A file needs at least one complete block to play back.{cg_0::Follower(0): ...
cg_0::Follower(1): ...}
X Y ZTool position coordinate in metersX0.1183887 Y-0.0375092 Z0.1076392
rW rX rY rZTool orientation as a quaternionrW0.1575889 rX-0.160 rY0.973 rZ-0.051
F#.#####Linear speed (feed rate), in m/sF0.0010804
F0.0150
Fa#.#####Angular speed (feed rate), in rad/sFa0.2586200
Fa1.0053328
J6[#,#,#,#,#,#]Joint angles in radiansJ6[0.403,0.157,1.000,-0.936,0.214,0.977]
JV6[#,#,#,#,#,#]Joint velocitiesJV6[0.000 0.000 0.000 0.000 0.000 0.000]

How Lines Are Interpreted​

  • A line that specifies X, Y, and Z commands moves the robot to the corresponding absolute Cartesian position.
  • If a coordinate is omitted, the robot retains its current value for that axis.
    • For example, if X is omitted from a command, playback updates only the specified axes, such as Y and Z, while maintaining the current X position.
  • The file format is intentionally permissive, allowing each line to include only the axes or values that need to change.
  • When editing an existing .hrpr file, use Save As to preserve the original file and create a separate version of your modified macro.

Examples​

Format​

The following example shows a portion of a recorded .hrpr macro file, including the header information and recorded motion samples:

(FORMAT_VERSION: 1)
(PROGRAM_NAME: C:\Users\demo\Documents\user\projects\demo\raw//2026-8-14_12-13-19.hrpr)
(DATE: 2026/09/14)
(SAMPLE_RATE: 100)
(POSITION_LEADER: 051D)
(ORIENTATION_LEADER: 1451)
(FOLLOWERS:
cg_0::Follower(0): Mecademic Industrial Robotics SERIAL (arm);
cg_0::Follower(1): Mecademic Industrial Robotics PARALLEL (end_effector);
)
(DESCRIPTION: a story of two machines)
N1 t1789402399210 {
cg_0::Follower(0): X0.1183887 Y0.0375092 Z0.1076392 rW0.1575889 rX-0.160 rY0.973 rZ-0.051 F0.0008606 Fa0.9414008 J6[0.403,0.157,1.000,-0.936,0.214,0.977] JV6[0.000,0.000,0.000,0.000,0.000,0.000] ,
cg_0::Follower(1): J1[4.800] ,
}
...

Sichere Z-Höhe​

Dieses Beispiel zeigt, wie in Zeile N4 ein einzelner Z-Achsen-Befehl hinzugefügt werden kann, um den Roboter auf eine vorgegebene Z-Position zu fahren, ohne die anderen Achsen zu verändern.

Da nicht angegebene Achswerte beibehalten werden, wird in diesem Schritt nur die Z-Achse aktualisiert.

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​

Dieses Beispiel zeigt, wie die Befehle X und Y gemeinsam verwendet werden können, um den Roboter nur entlang dieser beiden Achsen zu bewegen.

In Zeile N5 werden nur die Werte der X- und Y-Achse aktualisiert. Alle weggelassenen Achsen behalten ihre aktuellen Werte.

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
}

Optimieren eines Makros​

Das folgende Beispiel zeigt ein optimiertes Makro, in dem jeder Befehl nur die Werte enthält, die sich ändern müssen.

  • Die Roboterorientierung bleibt während der gesamten Sequenz unverändert.
  • Der erste Befehl bewegt den Roboter mit einer festgelegten Vorschubgeschwindigkeit zur vollständigen Zielpose.
  • N2 aktualisiert nur die Y-Achse.
  • N3 und N4 aktualisieren nur die Z-Achse.
  • N5 aktualisiert die X-Achse und ändert die Vorschubgeschwindigkeiten.
  • N6 aktualisiert sowohl die Y-Achse als auch die Z-Achse.

Durch das Weglassen unveränderter Werte bleibt das Makro kompakter und lässt sich leichter lesen oder ändern.

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
}