﻿# Empty trajectory topics: reconcile the Kilted documentation with the rejecting code path

The reviewed Kilted topic callback validates points before replacement, despite a documentation statement about empty-trajectory override. Do not treat publication as cancellation.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/robotics-empty-trajectory-topic-validation-not-cancel/
Language: en

## A published empty command is not a stop receipt

An integration sends an empty JointTrajectory message to interrupt a robot trajectory. The publisher reports no transport error, and the UI displays stopped. That chain has no evidence that the controller accepted a replacement or canceled the action. Before adopting this convention, inspect the actual topic callback and its validation. A fire-and-forget publication does not supply an action result. The critical question is whether this specific input reaches the controller’s replacement path at all.

## The documentation makes a specific claim

The reviewed [Kilted user documentation](https://control.ros.org/kilted/doc/ros2_controllers/joint_trajectory_controller/doc/userdoc.html) says an empty trajectory from the topic interface overrides an action without aborting it. The same page distinguishes topic commands from action execution monitoring. Preserve this as a statement in the documentation, not a reproduced result. A controller build can diverge from prose, and a distribution label alone does not identify the installed package revision. Review the implementation associated with the deployment before relying on the described special case.

## The reviewed callback rejects before replacement

In the reviewed [Kilted source](https://raw.githubusercontent.com/ros-controls/ros2_controllers/kilted/joint_trajectory_controller/src/joint_trajectory_controller.cpp), topic_callback first calls validate_trajectory_msg and returns on failure. The validator rejects an empty points array. Only a validated message can reach add_new_trajectory_msg through that callback while the subscriber is active. This directly conflicts with treating the documented empty-message special case as established for this path. It is a source-review conclusion, not a claim that a robot was tested or that every release shares the same behavior.

## Isolate the empty-points check in a passive fixture

Propose a nonactuating controller fixture with correct joint names and an empty points array. Correct names avoid confusing an earlier joint-name rejection with the points check. Retain input identity, validation diagnostics and observations at the replacement boundary. Compare a valid harmless trajectory as a control. No controller or robot was run here. Acceptance requires explaining whether the empty input was rejected or replaced under the installed revision, rather than inferring either result from a publisher’s successful send.

## Use an explicitly qualified interruption contract

If the application needs cancellation of an action goal, qualify its supported action-cancellation path and eventual result separately. If it needs a hold or deceleration behavior, inspect the controller configuration and physical consequences of that path. Do not substitute a guessed empty topic convention for either requirement. A canceled result and a generated hold command still do not independently measure physical standstill. Keep motion-state evidence within the application’s separately reviewed hardware and control design.

## Keep conflicting evidence visible in the release review

[Triton cancellation validation](/journal/triton-inference-cancellation/) distinguishes a client signal from terminated work. [Terminal request consistency](/journal/provider-terminal-request-record-consistency/) keeps final outcomes attached to their operation. For this controller, retain documentation date, source revision, installed package identity and passive-fixture result when available. A disagreement is useful evidence to resolve, not a reason to claim an unobserved behavior. Recheck the input path after upgrades instead of carrying forward an undocumented stop assumption.
