Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ class Source
bool getTransform(
const std::string & source_frame_id,
const rclcpp::Time & source_time,
const rclcpp::Time & curr_time,
tf2::Transform & tf_transform) const;

// ----- Variables -----
Expand Down
2 changes: 1 addition & 1 deletion nav2_collision_monitor/src/pointcloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void PointCloud::getData(
// Obtaining the transform to get data from source frame and time where it was received
// to the base frame and current time
tf2::Transform tf_transform;
if (!getTransform(data_->header.frame_id, data_->header.stamp, curr_time, tf_transform)) {
if (!getTransform(data_->header.frame_id, data_->header.stamp, tf_transform)) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion nav2_collision_monitor/src/scan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void Scan::getData(
// Obtaining the transform to get data from source frame and time where it was received
// to the base frame and current time
tf2::Transform tf_transform;
if (!getTransform(data_->header.frame_id, data_->header.stamp, curr_time, tf_transform)) {
if (!getTransform(data_->header.frame_id, data_->header.stamp, tf_transform)) {
return;
}

Expand Down
6 changes: 1 addition & 5 deletions nav2_collision_monitor/src/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ bool Source::sourceValid(
bool Source::getTransform(
const std::string & source_frame_id,
const rclcpp::Time & source_time,
const rclcpp::Time & curr_time,
tf2::Transform & tf2_transform) const
{
geometry_msgs::msg::TransformStamped transform;
Expand All @@ -88,10 +87,7 @@ bool Source::getTransform(
try {
// Obtaining the transform to get data from source to base frame.
// This also considers the time shift between source and base.
transform = tf_buffer_->lookupTransform(
base_frame_id_, curr_time,
source_frame_id, source_time,
global_frame_id_, transform_tolerance_);
transform = tf_buffer_->lookupTransform(base_frame_id_, source_frame_id, source_time, transform_tolerance_);
} catch (tf2::TransformException & e) {
RCLCPP_ERROR(
logger_,
Expand Down