motion_control_interfaces ========================= ``motion_control_interfaces`` defines 8 interface(s). Messages -------- Monitor ~~~~~~~ Unique identifier for this monitor instance, used for tracking and identifying which monitor triggered when publishing monitor results .. code-block:: text string monitor_id # Condition that determines when this monitor should trigger during trajectory execution. # The trigger condition specifies the criteria (ratio, time, or joint state) that must be met # for the monitor to activate and publish its result TriggerCondition trigger_condition MonitorResult ~~~~~~~~~~~~~ Result of a trajectory execution monitor indicating whether the monitor's trigger condition was met. This message is published when a monitor attached to a trajectory evaluates its trigger condition. .. code-block:: text # Unique identifier of the monitor that generated this result. # Must match the monitor_id from the Monitor message that was attached to the trajectory. string monitor_id # Indicates whether the monitor's trigger condition has been activated. # true: The trigger condition was met during trajectory execution. # false: The trigger condition has not been met (or the monitor has not yet been evaluated). bool is_triggered MonitorResultsStamped ~~~~~~~~~~~~~~~~~~~~~ Container for multiple monitor results with timestamp information. This message groups together results from multiple monitors that may have triggered during trajectory execution, providing a timestamped snapshot of monitor status. .. code-block:: text # Header with timestamp indicating when these monitor results were generated/published std_msgs/Header header # Array of monitor results, each indicating whether a specific monitor's trigger condition was met. # Contains results for all monitors that have been evaluated up to the timestamp in the header. MonitorResult[] monitor_results TrajectoryFeedback ~~~~~~~~~~~~~~~~~~ Feedback information about the current state of a trajectory during execution. Provides real-time status updates including progress, timing, and joint positions. .. code-block:: text # Unique identifier of the trajectory being executed. # Must match the trajectory_id from the QueueTrajectory action request. string trajectory_id # Total number of trajectory points in the currently executing trajectory. # This represents the full size of the trajectory that is being executed. uint32 executing_trajectory_size # Zero-based index of the trajectory point currently being executed. # Range: [0, executing_trajectory_size - 1] # Indicates which point in the trajectory sequence is currently active. uint32 executing_point_index # Timestamp when the trajectory execution began. # This is the reference time for calculating time_from_start and is set when # the trajectory starts executing (not when it was queued). builtin_interfaces/Time start_execution_time # Progress ratio of trajectory execution, ranging from 0.0 to 1.0. # 0.0: Trajectory execution has just started (at first point). # 1.0: Trajectory execution is complete (at last point). # Calculated as: (executing_point_index + 1) / executing_trajectory_size float64 ratio_of_trajectory # Elapsed duration since the trajectory started executing. # This is the time difference between the current time and start_execution_time. # Useful for time-based monitor trigger conditions. builtin_interfaces/Duration time_from_start # Current joint state of the robot servomechanism during trajectory execution. # Contains the actual joint positions, velocities, and efforts as the robot # executes the trajectory. This reflects the real-time state of the robot joints. sensor_msgs/JointState current_joint_state TrajectoryFeedbackStamped ~~~~~~~~~~~~~~~~~~~~~~~~~ Timestamped trajectory feedback message. Wraps TrajectoryFeedback with a header containing timestamp and frame information for tracking when the feedback data was generated. .. code-block:: text # Header with timestamp indicating when this trajectory feedback was generated/published std_msgs/Header header # Trajectory feedback data containing execution status, progress, and current joint state TrajectoryFeedback data TriggerCondition ~~~~~~~~~~~~~~~~ Trigger condition definition for trajectory execution monitoring. The trigger check is discrete and requires a valid range to trigger. Therefore, all conditions have corresponding tolerances or validation ranges. .. code-block:: text # --- Condition Type: RATIO --- # Desired ratio of trajectory completion at which to trigger the monitor. # Valid range: [0.0, 1.0] where 0.0 is trajectory start and 1.0 is trajectory completion. # Example: 0.5 triggers when 50% of the trajectory points have been executed float64 ratio_of_trajectory # --- Condition Type: TIME --- # Desired duration from trajectory start at which to trigger the monitor. # WARNING: Trigger will not occur if time_from_start exceeds the total execution # duration of the trajectory. Ensure the duration is within the trajectory's expected execution time. builtin_interfaces/Duration time_from_start # --- Condition Type: JOINT_STATE --- # Desired joint state (position) at which to trigger the monitor. # WARNING: Undesired behavior may occur if the trajectory crosses the joint_state boundary # multiple times (e.g., a trajectory that loops back to the same joint position). # WARNING: Trigger will not occur if the trajectory does not pass near the specified joint_state. # The trigger activates when the actual joint positions fall within the tolerance range # specified by joint_state_tolerances. sensor_msgs/JointState joint_state # Tolerance values for joint_state condition, one per joint. # For each joint i, the trigger activates when: # joint_state.position[i] - joint_state_tolerances[i] <= actual_position[i] <= joint_state.position[i] + joint_state_tolerances[i] # Array length must match the number of joints in joint_state.position float64[] joint_state_tolerances # --- Condition Type Constants --- # Specifies which type of trigger condition is being used. # Only one condition type should be active at a time (set the appropriate field and type value). uint8 RATIO = 1 # Trigger based on trajectory completion ratio uint8 TIME = 2 # Trigger based on elapsed time from start uint8 JOINT_STATE = 3 # Trigger based on joint position reaching target state uint8 type # Type of condition to use: RATIO (1), TIME (2), or JOINT_STATE (3) Services -------- GetTrajectoryStatus ~~~~~~~~~~~~~~~~~~~ .. code-block:: text std_msgs/Header header string trajectory_id --- uint8 EXECUTING = 1 uint8 FINISHED = 2 uint8 IN_QUEUE = 3 uint8 UNKNOWN = 4 uint8 status 4 Actions ------- QueueTrajectory ~~~~~~~~~~~~~~~ --- Request --- .. code-block:: text # Optional header with timestamp indicating when this request was created/submitted std_msgs/Header header # Trajectory to be queued for execution. A valid trajectory must contain a minimum of 3 points, # each with joint positions, joint velocities, and time stamps specified trajectory_msgs/JointTrajectory trajectory # Unique identifier for this queued trajectory, used for monitoring and tracking purposes. # Must be a non-empty string with a unique ID value string trajectory_id # Optional array of monitors to attach to this trajectory for tracking execution status Monitor[] monitors --- # --- Result --- # Header with timestamp indicating when the result was generated std_msgs/Header header # Indicates whether the trajectory execution has completed (true) or is still in progress (false) bool is_finished --- # --- Feedback --- # Feedback messages are sent periodically during trajectory execution to provide progress updates