Trajectory Point Interface
The TrajectoryPointInterface allows sending trajectory points to the robot. It is intended to
be used in conjunction with the ReverseInterface during trajectory forwarding.
Communication regarding trajectory point execution would usually look like this:
Basically, the TrajectoryPointInterface transfers the trajectory points from the external
control PC to the robot for execution. Execution isn’t started, before a start command is sent via
the ReverseInterface. Once trajectory execution is done (either successful, failed or canceled
externally), the robot will send a response back to the control PC via the trajectory socket.
Note
The TrajectoryPointInterface simply forwards the trajectory points to the robot. Execution
is done using respective URScript functions such as movej
or movel.
Therefore, all parameters and restrictions of these functions apply. For example, velocity and
acceleration parameters will be ignored if there is a time > 0 given.
Communication protocol
The TrajectoryPointInterface’s “trajectory_socket” on the robot is expecting 32 bit integer
representations in 21 datafields. The data fields have the following meaning:
index |
meaning |
|---|---|
0-5 |
trajectory point positions (multiplied by Interpreted as joint positions [rad] or as a Cartesian pose ([m, m, m, rad, rad, rad]) depending on the motion type at index 20 (see below). |
6-11 |
Depending on the motion type, this represents either
|
12-17 |
Depending on the motion type, this represents either
|
18 |
segment duration (seconds, multiplied by |
19 |
depending on trajectory point type
|
20 |
trajectory point type. The base values below use the URScript command’s “natural”
target type (joints for
|
where
MULT_JOINTSTATE: 1000000MULT_TIME: 1000000MULT_VEL_ACC: 100000000
Note
With MULT_TIME being 1000000, the maximum duration that can be sent is 2147 seconds, while
precision is cut off at 1 microsecond. (The same applies to the blend radius, respectively being
max 2147 m and 1 μm precision.)
Note
Spline point velocities and accelerations use the finer MULT_VEL_ACC scaling, giving 1e-8
resolution with a maximum magnitude of ~21.47 rad/s (rad/s²). The coarser MULT_JOINTSTATE
scaling quantizes near-zero accelerations, causing reconstructed acceleration
profile to become jagged, which can trigger controller faults. Values exceeding the maximum magnitude are rejected by the library.
Finer scaling is only used when the control script defines the matching multiplier through
the {{VEL_ACC_REPLACE}} placeholder. For user-supplied scripts without that placeholder the
library falls back to encoding spline velocities and accelerations with MULT_JOINTSTATE.
Note
The *_POSE / *_JOINT motion-type variants let callers mix joint-space and Cartesian
targets freely through the high-level APIs (see Instruction Executor and the
urcl::MotionTarget type). On the wire the positions are always packed as a 6-tuple of
MULT_JOINTSTATE-scaled integers; which physical quantity they represent (joint angles or
Cartesian pose components) is determined solely by the motion type field at index 20. The
corresponding mapping back to movej / movel / movep / movec / optimovej /
optimovel calls with either q or p[...] arguments is performed on the robot side
by resources/external_control.urscript.