Skip to content

Error "timer interface not set before call to waitForTransform" when setting tf_message_filter_target_frame #256

Description

@Hugal31

Description

When using tf_message_filter_target_frame, the scan_to_scan_filter_chain crashes with the following error:

terminate called after throwing an instance of 'tf2_ros::CreateTimerInterfaceException'
  what():  timer interface not set before call to waitForTransform

This is because tf2_ros::MessageFilter uses tf2_ros::Buffer waitForTransform with a callback. For that, it needs to have been configured by calling setCreateTimerInterface first.

Reproduce

Run in parallel:

> ros2 run laser_filters scan_to_scan_filter_chain --ros-args -p tf_message_filter_target_frame:=foobar
> ros2 topic pub /scan sensor_msgs/msg/LaserScan 'header: {frame_id: "nop"}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions