Skip to content

Commit

Permalink
fix: use object_buffer_time_length_
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitrii Koldaev <[email protected]>
  • Loading branch information
Dmitrii Koldaev committed Apr 9, 2024
1 parent 8617285 commit c561a64
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1360,15 +1360,15 @@ void MapBasedPredictionNode::removeOldObjectsHistory(
const double latest_object_time = rclcpp::Time(object_data.back().header.stamp).seconds();

// Delete Old Objects
if (current_time - latest_object_time > 2.0) {
if (current_time - latest_object_time > object_buffer_time_length_) {
invalid_object_id.push_back(object_id);
continue;
}

// Delete old information
while (!object_data.empty()) {
const double post_object_time = rclcpp::Time(object_data.front().header.stamp).seconds();
if (current_time - post_object_time > 2.0) {
if (current_time - post_object_time > object_buffer_time_length_) {
// Delete Old Position
object_data.pop_front();
} else {
Expand Down

0 comments on commit c561a64

Please sign in to comment.