@@ -124,15 +124,37 @@ class ReverseInterface
124124 const RobotReceiveTimeout& robot_receive_timeout = RobotReceiveTimeout::millisec(20 ));
125125
126126 /* !
127- * \brief Writes needed information to the robot to be read by the URScript program .
127+ * \brief Sends a trajectory-control message to the URScript program over the reverse socket .
128128 *
129- * \param trajectory_action 1 if a trajectory is to be started, -1 if it should be stopped
130- * \param point_number The number of points of the trajectory to be executed
131- * \param robot_receive_timeout The read timeout configuration for the reverse socket running in the external
132- * control script on the robot. If you want to make the read function blocking then use RobotReceiveTimeout::off()
133- * function to create the RobotReceiveTimeout object
129+ * \param trajectory_action One of the values of TrajectoryControlMessage. The value selects which
130+ * trajectory-control action the URScript dispatcher takes, and dictates how \p point_number is
131+ * interpreted:
132+ * - TRAJECTORY_CANCEL (-1): Cancels the currently executing trajectory. \p point_number is unused.
133+ * - TRAJECTORY_NOOP (0): No-op; serves as a keepalive on the reverse socket while a trajectory
134+ * executes. The producer must send these (or another trajectory-control message) periodically
135+ * while waiting for trajectory completion so that the URScript dispatcher's read does not
136+ * time out and exit the external_control program. \p point_number is unused.
137+ * - TRAJECTORY_START (1): Begins a finite trajectory of declared length. \p point_number is the
138+ * total number of subsequent writeTrajectoryPoint / writeTrajectorySplinePoint / writeMotionPrimitive
139+ * calls the producer will issue on the trajectory socket. URScript reads exactly that many points
140+ * and then completes.
141+ * - TRAJECTORY_STREAM_START (2): Begins an open-ended (streaming) trajectory. The producer streams
142+ * spline points and signals end-of-stream with TRAJECTORY_STREAM_END. \p point_number is unused.
143+ * - TRAJECTORY_STREAM_END (3): Ends an open-ended streaming trajectory started by
144+ * TRAJECTORY_STREAM_START. \p point_number must equal the total number of spline points the
145+ * producer wrote on the trajectory socket since TRAJECTORY_STREAM_START.
134146 *
135- * \returns True, if the write was performed successfully, false otherwise.
147+ * \param point_number Mode-dependent point-count argument. See the description of \p
148+ * trajectory_action for the per-mode semantics.
149+ *
150+ * \param robot_receive_timeout The read timeout configuration for the reverse socket running in the
151+ * external control script on the robot. If you want to make the read function blocking then use
152+ * RobotReceiveTimeout::off() function to create the RobotReceiveTimeout object.
153+ *
154+ * \returns True if the write was performed successfully, false otherwise.
155+ *
156+ * \see examples/trajectory_point_interface.cpp for a finite-trajectory usage example, or
157+ * examples/trajectory_streaming.cpp for an open-ended streaming trajectory example.
136158 */
137159 bool
138160 writeTrajectoryControlMessage (const TrajectoryControlMessage trajectory_action, const int point_number = 0 ,
0 commit comments