Skip to content

Commit 6c5e79f

Browse files
committed
Update documentation
1 parent 856c942 commit 6c5e79f

3 files changed

Lines changed: 29 additions & 17 deletions

File tree

doc/architecture/instruction_executor.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ Every motion function comes in two flavours:
3232
a Cartesian target with a joint-interpolated motion, or ``moveL(urcl::Q{...})`` to perform a
3333
linear tool-space motion towards the pose implied by a joint configuration.
3434

35+
An ``urcl::Pose`` may optionally carry ``q_near`` (``std::optional<urcl::Q>``), a joint configuration
36+
hint for IK when the pose is sent over the trajectory interface; see :ref:`trajectory_point_interface`.
37+
3538
The Instruction Executor uses the :ref:`trajectory_point_interface` and the
3639
:ref:`reverse_interface`
3740
for sending motion instructions to the robot. Hence, it requires a :ref:`ur_driver` object.

doc/architecture/trajectory_point_interface.rst

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,20 @@ representations in 21 datafields. The data fields have the following meaning:
4444
0-5 trajectory point positions (multiplied by ``MULT_JOINTSTATE``).
4545

4646
Interpreted as joint positions [rad] or as a Cartesian pose ([m, m, m, rad, rad, rad])
47-
depending on the motion type at index 18 (see below).
47+
depending on the motion type at index 20 (see below).
4848

4949
6-11 Depending on the motion type, this represents either
5050

51-
- Q-near (joint configuration closest to the target pose) when passing a pose to MoveJ or
52-
OptimoveJ (``MOVEJ_POSE`` and ``OPTIMOVEJ_POSE``). Used, when the "has Q-near" (see
53-
byte 14) flag is set.
51+
- Joint hint ``q_near`` (six joint positions in radians, ``MULT_JOINTSTATE``-scaled) when
52+
the motion target is a Cartesian ``urcl::Pose`` with ``Pose::q_near`` set on the library
53+
side. The bundled ``external_control.urscript`` applies this hint for ``MOVEJ_POSE`` and
54+
``OPTIMOVEJ_POSE`` (``get_inverse_kin`` seed); other pose motion types still receive the
55+
block on the wire but ignore it in the default script.
5456

5557
- For all MOVEC variants this field contains the via point (same
5658
joint-vs-pose interpretation as the target at indices 0-5, see the motion type at
57-
index 18).
58-
- trajectory point velicities (multiplied by ``MULT_JOINTSTATE``) for spline joint types
59+
index 20).
60+
- trajectory point velocities (multiplied by ``MULT_JOINTSTATE``) for spline joint types
5961

6062
12-17 Depending on the motion type, this represents either
6163

@@ -68,11 +70,21 @@ representations in 21 datafields. The data fields have the following meaning:
6870
- 13: acceleration (multiplied by ``MULT_JOINTSTATE``)
6971
- 14: Depending on motion type:
7072

71-
- ``MOVEC_*``: mode (multiplied by ``MULT_JOINTSTATE``)
72-
- ``MOVEJ_POSE`` and ``OPTIMOVEJ_POSE``: boolean "has Q-near" (multiplied by ``MULT_JOINTSTATE``)
73+
- ``MOVEC_*``: arc mode (multiplied by ``MULT_JOINTSTATE``)
74+
- Other non-spline primitives with a Cartesian ``Pose`` target: ``1.0`` or ``0.0``
75+
(scaled by ``MULT_JOINTSTATE``) indicating whether indices 6–11 carry ``q_near``.
76+
The bundled URScript consumes ``q_near`` for ``MOVEJ_POSE`` and ``OPTIMOVEJ_POSE``
77+
only; the flag and joint block are still defined this way for all such pose motions.
7378

79+
18 segment duration (seconds, multiplied by ``MULT_TIME``; integer microseconds on the wire).
7480

75-
18 trajectory point type. The base values below use the URScript command's "natural"
81+
19 depending on trajectory point type
82+
83+
- All MOVE* and OPTIMOVE* variants: point blend radius (in meters, multiplied by
84+
``MULT_TIME``)
85+
- SPLINE: spline type (1: CUBIC, 2: QUINTIC; raw integer, not ``MULT_TIME``-scaled)
86+
87+
20 trajectory point type. The base values below use the URScript command's "natural"
7688
target type (joints for ``movej`` / ``optimovej``, Cartesian pose for ``movel`` /
7789
``movep`` / ``movec`` / ``optimovel``). The ``*_POSE`` / ``*_JOINT`` variants indicate
7890
that the other target kind is being sent instead.
@@ -94,13 +106,6 @@ representations in 21 datafields. The data fields have the following meaning:
94106
- 12: OPTIMOVEJ_POSE – ``optimovej`` to a pose target
95107
- 13: OPTIMOVEL_JOINT – ``optimovel`` to the pose implied by a joint target
96108
- 51: SPLINE
97-
98-
19 trajectory point time (in seconds, multiplied by ``MULT_TIME``)
99-
20 depending on trajectory point type
100-
101-
- All MOVE* and OPTIMOVE* variants: point blend radius (in meters, multiplied by
102-
``MULT_TIME``)
103-
- SPLINE: spline type (1: CUBIC, 2: QUINTIC)
104109
===== =====
105110

106111
where
@@ -118,7 +123,7 @@ where
118123
targets freely through the high-level APIs (see :ref:`instruction_executor` and the
119124
``urcl::MotionTarget`` type). On the wire the positions are always packed as a 6-tuple of
120125
``MULT_JOINTSTATE``-scaled integers; which physical quantity they represent (joint angles or
121-
Cartesian pose components) is determined solely by the motion type field at index 18. The
126+
Cartesian pose components) is determined solely by the motion type field at index 20. The
122127
corresponding mapping back to ``movej`` / ``movel`` / ``movep`` / ``movec`` / ``optimovej`` /
123128
``optimovel`` calls with either ``q`` or ``p[...]`` arguments is performed on the robot side
124129
by ``resources/external_control.urscript``.

doc/examples/instruction_executor.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,7 @@ natural overload, so ``moveJ({ ... })`` continues to be interpreted as joint pos
8484
``moveJ(urcl::Pose{...})`` performs a ``movej`` towards a Cartesian target and
8585
``moveL(urcl::Q{...})`` performs a ``movel`` towards the pose implied by a joint configuration.
8686
The same rules apply to ``moveP``, ``moveC``, ``optimoveJ`` and ``optimoveL``.
87+
88+
For Cartesian targets, ``urcl::Pose`` may optionally set ``q_near`` (a ``urcl::Q``): a joint-space
89+
hint forwarded on the trajectory socket for inverse kinematics. The bundled external-control
90+
URScript uses it for ``movej`` / ``optimovej`` to a pose; see :ref:`trajectory_point_interface`.

0 commit comments

Comments
 (0)