Skip to content

Commit

Permalink
fix(simple_object_merger): fix timeout (autowarefoundation#4990)
Browse files Browse the repository at this point in the history
Signed-off-by: scepter914 <scepter914@gmail.com>
  • Loading branch information
scepter914 committed Sep 19, 2023
1 parent 4f35db8 commit 0cdecb8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ void SimpleObjectMergerNode::onTimer()
output_objects.header.frame_id = node_param_.new_frame_id;

for (size_t i = 0; i < input_topic_size; i++) {
double time_diff = (this->get_clock()->now()).seconds() -
double time_diff = rclcpp::Time(objects_data_.at(i)->header.stamp).seconds() -
rclcpp::Time(objects_data_.at(0)->header.stamp).seconds();
if (std::abs(time_diff) < node_param_.timeout_threshold) {
transform_ = transform_listener_->getTransform(
Expand Down

0 comments on commit 0cdecb8

Please sign in to comment.