Ask Your Question

Revision history [back]

tf message_filters and child_frame_id

Message filters are handy when you want to only fire callbacks if a transform is available for the data contained therein. The user sets the target frame_id, and presumably the source frame_id is derived from the message's header.

However, nav_msgs/Odometry messages contain both pose and twist data, with the former being in the message header's frame_id, and the latter being in the message's child_frame_id. Even if no transform exists for the pose data, there may be a transform for the twist data. I can't just set up another filter with the target child_frame_id, as the message filter will then look for a transform from the odometry message's frame_id (i.e., pose data frame) to the target child_frame_id, which will probably not make any sense.

Do I have any recourse here? Clearly, I can just fire all the callbacks and check for the transform availability myself, but I'm guessing I'm going to lose some efficiency that way.