Skip to content

Commit

Permalink
fix to auto project the state forward when meas timeout (cra-ros-pkg#798
Browse files Browse the repository at this point in the history
)
  • Loading branch information
JoeFrancis7 committed Jun 22, 2023
1 parent ea976f9 commit b0c767f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ros_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ void RosFilter<T>::integrateMeasurements(const rclcpp::Time & current_time)
"\n" <<
measurement_queue_.size() << " measurements in queue.\n");

bool predict_to_current_time = predict_to_current_time_;
//bool predict_to_current_time = predict_to_current_time_;

// If we have any measurements in the queue, process them
if (!measurement_queue_.empty()) {
Expand Down Expand Up @@ -736,7 +736,7 @@ void RosFilter<T>::integrateMeasurements(const rclcpp::Time & current_time)

// If we get a large delta, then continuously predict until
if (last_update_delta >= filter_.getSensorTimeout()) {
predict_to_current_time = true;
predict_to_current_time_ = true;

RF_DEBUG(
"Sensor timeout! Last measurement time was " <<
Expand All @@ -749,7 +749,7 @@ void RosFilter<T>::integrateMeasurements(const rclcpp::Time & current_time)
RF_DEBUG("Filter not yet initialized.\n");
}

if (filter_.getInitializedStatus() && predict_to_current_time) {
if (filter_.getInitializedStatus() && predict_to_current_time_) {
rclcpp::Duration last_update_delta =
current_time - filter_.getLastMeasurementTime();

Expand Down

0 comments on commit b0c767f

Please sign in to comment.