﻿# ROS MessageFilter tolerance adds a transform-time requirement rather than relaxing it

Inspect setTolerance before treating it as an allowed timestamp mismatch: the reviewed filter additionally waits for transform availability after the message stamp.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/robotics-messagefilter-tolerance-additional-transform-time/
Language: en

## Increasing tolerance can delay the callback

A perception consumer receives stamped measurements but its transform-ready callback arrives later after a tolerance setting is increased. The operator expected tolerance to permit a looser timestamp match and therefore release more messages sooner. That interpretation does not describe the reviewed MessageFilter path. Establish what condition the option adds before tuning it. An option named tolerance can refer to additional required time coverage rather than permission to substitute a nearby observation or transform.

## The filter asks for an additional time

In the reviewed [Kilted MessageFilter](https://raw.githubusercontent.com/ros2/geometry2/kilted/tf2_ros/include/tf2_ros/message_filter.hpp), each target frame gets a transform request at the message stamp. If time_tolerance is nonzero, another request is added at stamp plus that duration. The expected success count changes accordingly. This is an added availability requirement, not an epsilon interval from which any convenient transform may be chosen. Keep the message’s actual timestamp intact when explaining why its callback is still waiting.

## Availability, queue capacity and wait duration differ

The [buffer time-query implementation](https://raw.githubusercontent.com/ros2/geometry2/kilted/tf2_ros_py/tf2_ros/buffer.py) provides separate time arguments and waiting behavior. In the filter, target times, pending-message capacity and buffer timeout are also distinct controls. A larger message queue cannot create transform history at a missing time. A longer wait can help if the required transform will arrive, but cannot establish physical motion information that the producer never supplied. Record which condition prevented release instead of describing every filter delay as a network-latency problem.

## Stage transform coverage in a passive fixture

Propose a harmless stamped message whose required transform is available at its stamp, while coverage at stamp plus tolerance is deliberately absent. Compare zero tolerance with a positive tolerance under the same target and buffer configuration. Then supply the additional required transform coverage and observe release or the declared failure. Keep message identities and requested times in the trace. No filter or transform producer was run here. Acceptance explains the changed readiness predicate without inventing a callback-latency measurement.

## Transform readiness does not transform the message

Passing a filter makes the guarded callback eligible under the checked availability condition. It does not, by itself, rewrite every coordinate value into the target frame or certify the calibration. Review what the callback actually transforms, using which timestamp and message-specific semantics. Likewise, filter tolerance does not establish synchronization of different sensors. A downstream approximate-time association policy is another mechanism with its own rules. Keeping these operations separate prevents a single successful callback from being credited with several unperformed data corrections.

## Name the predicate in the release record

[Bounded readiness waiting](/journal/guide-grpc-wait-ready-bound/) concerns another waiting population. [RH20T temporal association](/journal/fg2-rh20t-aligned-query-not-simultaneous-sensor-acquisition/) distinguishes derived alignment from acquisition. For MessageFilter, retain target frames, original stamp, added time requirement, timeout and message outcome. Recheck these after changing tolerance or transform publication behavior. The resulting record establishes why a message was released or withheld; it does not claim prediction of future robot motion or independent validation of the physical measurement.
