Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(voxel_based_compare_map): temporary fix pointcloud transform lookup #10299

Prev Previous commit
Next Next commit
chore: reduce timeout
Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
badai-nguyen committed Mar 19, 2025

Verified

This commit was signed with the committer’s verified signature.
badai-nguyen badai nguyen
commit 106514e67c51bf1578280579fab22b582e0f34dd
Original file line number Diff line number Diff line change
@@ -103,14 +103,15 @@ void VoxelBasedCompareMapFilterComponent::input_indices_callback(
// Lookup the transform from input frame to "map"
geometry_msgs::msg::TransformStamped transform_stamped = tf_buffer_.lookupTransform(
tf_input_frame_, tf_input_orig_frame_, rclcpp::Time(cloud->header.stamp),
rclcpp::Duration::from_seconds(1.0));
rclcpp::Duration::from_seconds(0.0));

// Transform the point cloud
tf2::doTransform(*cloud, cloud_transformed, transform_stamped);
cloud_transformed.header.frame_id = tf_input_frame_; // Update frame ID to "map"
cloud_tf = std::make_shared<PointCloud2>(cloud_transformed);
} catch (tf2::TransformException & ex) {
RCLCPP_WARN(this->get_logger(), "Could not transform point cloud: %s", ex.what());
RCLCPP_WARN_THROTTLE(
this->get_logger(), *this->get_clock(), 5000, "Could not transform pointcloud: %s",
ex.what());
cloud_tf = cloud; // Fallback to original data
}
} else {