Skip to content

Commit 133d263

Browse files
zygfrydwZygfryd Wieszok
authored andcommitted
Fixed state history reversion (#736)
Co-authored-by: Zygfryd Wieszok <[email protected]>
1 parent 309b731 commit 133d263

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ros_filter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3345,7 +3345,7 @@ bool RosFilter<T>::revertTo(const rclcpp::Time & time)
33453345
// If we have a valid reversion state, revert
33463346
if (last_history_state) {
33473347
// Reset filter to the latest state from the queue.
3348-
const FilterStatePtr & state = filter_state_history_.back();
3348+
const FilterStatePtr & state = last_history_state;
33493349
filter_.setState(state->state_);
33503350
filter_.setEstimateErrorCovariance(state->estimate_error_covariance_);
33513351
filter_.setLastMeasurementTime(state->last_measurement_time_);

0 commit comments

Comments
 (0)