Namespace message_filters

Synchronizes up to 9 messages by their rates with upsampling via zero-order-hold.

Detailed Description

LatestTime policy synchronizes up to 9 incoming channels by the rates they are received. The callback with all the messages will be triggered whenever the fastest message is received. The slower messages will be repeated at the rate of the fastest message and will be updated whenever a new one is received. This is essentially an upsampling of slower messages using a zero-order hold (no interpolation).

USAGE

Example usage would be: typedef LatestTime<sensor_msgs::CameraInfo, sensor_msgs::Image, sensor_msgs::Image> latest_policy; Synchronizer<latest_policy> sync_policies(latest_policy(), caminfo_sub, limage_sub, rimage_sub); sync_policies.registerCallback(callback);

May also take an instance of a rclcpp::Clock::SharedPtr from rclpp::Node::get_clock() to use the node’s time source (e.g. sim time) as in: typedef LatestTime<sensor_msgs::CameraInfo, sensor_msgs::Image, sensor_msgs::Image> latest_policy; Synchronizer<latest_policy> sync_policies(latest_policy(node->get_clock()), caminfo_sub, limage_sub, rimage_sub); sync_policies.registerCallback(callback);

The callback is then of the form: void callback(const sensor_msgs::CameraInfo::ConstPtr&, const sensor_msgs::Image::ConstPtr&, const sensor_msgs::Image::ConstPtr&);

Namespaces

Classes

Typedefs