Field guide
ROS 2 Joint Trajectories: Verify Tolerances and Execution
Diagnose joint trajectory failures in ROS 2 Jazzy. Resolve path and goal tolerances, check timeout semantics, and use an execution acceptance worksheet.
The short answer
Before accepting a ROS 2 joint trajectory as successfully executed, resolve its effective tolerances, read the result for the correct action goal, and check what the controller’s feedback actually measures. A valid plan, an accepted goal, and a completed physical task are different outcomes.
For the ros2_control Jazzy Joint Trajectory Controller, use the action interface when you need execution monitoring. Its official documentation distinguishes the monitored follow_joint_trajectory action from the fire-and-forget joint_trajectory topic. Publishing a trajectory message does not provide the equivalent per-goal result.
This guide offers a diagnostic sequence and a reusable execution acceptance worksheet. We reviewed official Jazzy documentation and pinned source on November 9, 2026. We did not run ros2_control, execute the proposed checks, or move a robot. The online Jazzy documentation evolves, so record your installed package version and compare it with the cited revision before using version-sensitive features.
Establish which controller received which trajectory
Record the controller namespace, action endpoint, goal UUID, joint names, trajectory timestamp, and ordered waypoints. Preserve the exact submitted goal, not just the planning application’s summary.
The controller documentation says that all controller joints must be specified unless allow_partial_joints_goal is enabled. The parameter reference lists its default as false. If a goal is rejected, compare the intended joint set with the receiving controller before changing tracking tolerances.
Then separate three records:
- The planner produced a trajectory for a particular robot model and scene.
- The controller accepted and processed a particular action goal.
- The application observed its required physical outcome.
Our MoveIt scene-verification guide addresses the first boundary. This article addresses the second. Neither establishes the third on its own.
Resolve tolerance values before interpreting a result
The pinned JointTolerance definition gives zero and minus one special meanings. They are not ordinary numerical error limits.
| Value in a goal’s tolerance field | Meaning | Review consequence |
|---|---|---|
| Positive value | An explicit tolerance for that component | Check units, joint identity, and physical justification |
| Zero | Unspecified, leaving the default in place | Inspect the actual server default, not just the goal |
| Minus one | Erase the corresponding tolerance | Do not describe the component as constrained by the previous default |
| Field or joint tolerance omitted | The action definition uses server defaults | Preserve the defaults alongside the submitted goal |
The message specifies position in radians for revolute joints or meters for prismatic joints, with corresponding velocity and acceleration units. A joint-space position tolerance is not directly an end-effector placement tolerance.
The pinned controller implementation makes the resolution concrete. It starts from controller defaults, applies positive goal overrides, and converts an erased tolerance to an internal zero. Its check only applies a component’s limit when that resolved limit is positive. Therefore, an internal zero is not an exact-tracking requirement.
The same source builds default path position tolerances from constraints.<joint>.trajectory, final position tolerances from constraints.<joint>.goal, and final velocity tolerances from constraints.stopped_velocity_tolerance. Inspect all relevant components. Checking only final position can miss the velocity condition or an unconstrained path.
A malformed override may fall back to defaults
In the reviewed tolerance-resolution implementation, an unknown joint name in a path or goal tolerance returns the default tolerance set. An illegal negative value also triggers a logged error and default fallback. Do not assume that a malformed override always causes the entire action to be rejected.
This is a bounded implementation finding, not a universal ROS action rule. Review the logs and installed source when a submitted tolerance appears to have no effect. Capture both requested values and the effective configuration established by your integration evidence. A saved request alone does not prove which checks ran.
Distinguish tracking failure from final-state failure
The pinned FollowJointTrajectory action defines two separate tolerance outcomes:
PATH_TOLERANCE_VIOLATED: a tolerance was exceeded while following the trajectory.GOAL_TOLERANCE_VIOLATED: the final tolerance was not satisfied within the applicable completion allowance.
It also defines INVALID_GOAL, INVALID_JOINTS, and OLD_HEADER_TIMESTAMP. Preserve the terminal action status, error_code, and error_string for the same goal. A connection failure or a rejected goal is not a measured path-tracking failure.
For a path violation, inspect the desired and actual states around the first reported deviation, joint mapping, timing, hardware limits, and controller configuration. For a final-state violation, inspect the last target, resolved final tolerances, settling behavior, and applicable time allowance. These are our proposed diagnostic branches, not a claim that one result code identifies a hardware root cause.
Do not widen a tolerance until the action succeeds and then call the motion fixed. First decide what deviation the application can accept and why. A wider threshold changes the acceptance rule; it does not establish better tracking.
If a Cartesian command slows before execution, our robot singularity and joint-speed calculation explains a separate possibility: a reachable configuration can require excessive joint rates for a particular tip velocity. Establish that motion-feasibility boundary before treating the symptom as a tracking-tolerance problem.
Audit completion time separately from command freshness
The action definition describes goal_time_tolerance as additional time after the trajectory’s end to reach the final state. The reviewed controller resolver resolves that field against the controller default. A zero-valued goal field therefore does not independently establish an immediate deadline.
The current Jazzy parameter reference identifies several different settings:
| Setting | Documented purpose | Important boundary |
|---|---|---|
constraints.goal_time |
Default time allowance for reaching the goal | Zero can mean a potentially infinite wait |
action_execution_timeout |
Absolute timeout from trajectory start | Controller-level, disabled at zero, verify installed-version support |
cmd_timeout |
Stale-command timeout counted from the last trajectory point | Disabled at zero and ignored unless greater than constraints.goal_time |
action_monitor_rate |
Rate for monitoring action status changes | Not a physical tracking or safety deadline |
Do not apply the zero rule from one parameter to another. Nor should a client-side wait timeout silently mark the controller’s goal failed or canceled. It establishes that the client stopped waiting, not the server’s terminal outcome. Use the action cancellation guide when cancellation is actually required.
Our proposed integration policy is to record the resolved completion allowance, any supported controller execution timeout, and the client’s own wait policy separately. Define how the application handles an unresolved goal before allowing a dependent operation. Do not copy numerical thresholds from documentation examples into a physical cell without an application-specific assessment.
Check state provenance and command ownership
The action’s feedback definition includes joint names plus desired, actual, and error trajectory points. Preserve the mapping and timestamps with those values. A controller result is only as informative as the state path used to produce it.
Record whether feedback came from simulated hardware, measured encoders, or another adapter. Verify that the adapter’s exported state corresponds to what the integration team thinks it measures. This is our evidence requirement, not a claim that the action interface independently validates sensors, calibration, object pose, or contact forces.
Also identify every process allowed to send trajectories. The Jazzy controller documentation says only one action goal can be active at a time and describes preemption by another action command. It also documents a special case: an empty trajectory from the topic interface can override the current action goal without aborting the action. Inspect competing command paths rather than assuming the goal UUID is exclusive authority over the hardware.
For evidence preservation across processes, use the incident recording and replay guide. Do not replay recorded command traffic into connected actuators merely to reproduce a result.
An execution acceptance worksheet
Start in a non-actuating software environment with a known model and controlled state feedback. Fault injection into a physical controller requires a separately assessed test plan. The checks below are proposed integration work, not tests performed by Physical AI Guide or a certification protocol.
| Review item | Proposed check | Evidence to retain |
|---|---|---|
| Identity | Match action endpoint, goal UUID, joints, and trajectory | Exact submitted goal and receiving controller version |
| Defaults | Resolve omitted, zero, positive, and erased tolerance fields | Per-joint path and final limits, units, and source configuration |
| Invalid override | Exercise an unknown tolerance joint or illegal value in isolation | Actual fallback or rejection, logs, and resulting tolerance evidence |
| Path negative control | Introduce a known tracking deviation with a positive path limit | Same-goal terminal result, error, and relevant state samples |
| Final-state negative control | Keep the final state outside a positive goal limit with a bounded completion policy | Result, timing evidence, and resolved limits |
| Success control | Follow a trajectory that satisfies the same configured checks | Terminal status, result payload, and state evidence |
| Ownership | Review a competing command and preemption in isolation | Both command identities and observed controller behavior |
| Application handoff | Withhold the next operation when the result or physical evidence is unresolved | Decision log and the separately required task evidence |
Execution status: NOT TESTED by Physical AI Guide. Add expected outcome, observed outcome, artifact location, reviewer, and date to each row. Leave missing observations unknown. A negative control that fails to produce the expected violation is a reason to investigate the acceptance mechanism, not evidence that the robot tracks perfectly.
Keep the success control under the same relevant configuration as the negative controls. A test that disables the limit being evaluated cannot validate that limit’s enforcement.
What success still does not prove
A successful joint trajectory action is not proof that a gripper retained an object, a part seated correctly, a force stayed acceptable, or a human-shared application is safe. It is a bounded software execution result under particular limits and feedback.
Define task-level acceptance separately, such as inspected placement, verified retention, or an application-specific force condition. Connect those observations to the trajectory record without replacing one with the other. The developer-stack guide maps these control and task layers, while the robot safety standards guide addresses the separate application-safety boundary.
The useful handoff is not simply trajectory succeeded. It is: this controller processed this goal under these resolved checks, produced this result, and these additional observations establish whether the next operation may begin.
Sources and review scope
Reviewed November 9, 2026:
- Jazzy Joint Trajectory Controller documentation, action versus topic monitoring, joint coverage, preemption, and command-path boundaries.
- Jazzy controller parameter reference, tolerance defaults and distinct time policies. This online page can change independently of an installed package.
- FollowJointTrajectory at control_msgs revision ab911bf, tolerance fields, result codes, diagnostic string, and feedback.
- JointTolerance at the same revision, special values and units.
- Tolerance implementation at ros2_controllers revision bee185c, default resolution, invalid-override fallback, and positive-limit checks. These implementation findings are revision-specific.
Frequently asked questions
Does zero mean exact tracking in a ROS 2 JointTolerance message?
No. Zero leaves the server default in place. Minus one erases the corresponding tolerance. Resolve the goal fields against the actual controller defaults before interpreting success.
What is the difference between path and goal tolerances?
Path tolerances constrain tracking during execution. Goal tolerances constrain the final state. FollowJointTrajectory defines separate PATH_TOLERANCE_VIOLATED and GOAL_TOLERANCE_VIOLATED result codes.
Does a successful joint trajectory action prove that a manipulation task succeeded?
No. It reports the controller's execution outcome under its configured tolerances and state feedback. Grasp quality, object placement, contact forces, and application safety require separate evidence.