diff --git a/src/spatio_temporal_voxel_layer.cpp b/src/spatio_temporal_voxel_layer.cpp index 1e022c48..aebab0b7 100644 --- a/src/spatio_temporal_voxel_layer.cpp +++ b/src/spatio_temporal_voxel_layer.cpp @@ -285,7 +285,7 @@ void SpatioTemporalVoxelLayer::onInitialize(void) std::shared_ptr > filter(new tf2_ros::MessageFilter( - *sub, *tf_, _global_frame, 50, rclcpp_node_)); + *sub, *tf_, _global_frame, 50, rclcpp_node_, tf2::durationFromSec(transform_tolerance))); if (inf_is_valid) { filter->registerCallback( @@ -310,7 +310,7 @@ void SpatioTemporalVoxelLayer::onInitialize(void) std::shared_ptr > filter(new tf2_ros::MessageFilter( - *sub, *tf_, _global_frame, 50, rclcpp_node_)); + *sub, *tf_, _global_frame, 50, rclcpp_node_, tf2::durationFromSec(transform_tolerance))); filter->registerCallback( std::bind( &SpatioTemporalVoxelLayer::PointCloud2Callback, this, _1,