Skip to content

Commit

Permalink
fix erase of old imu messages
Browse files Browse the repository at this point in the history
  • Loading branch information
borongyuan committed Jan 11, 2024
1 parent e84c8ca commit 60ac071
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ov_init/src/init/InertialInitializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void InertialInitializer::feed_imu(const ov_core::ImuData &message, double oldes
if (oldest_time != -1) {
auto it0 = imu_data->begin();
while (it0 != imu_data->end()) {
if (message.timestamp < oldest_time) {
if (it0->timestamp < oldest_time) {
it0 = imu_data->erase(it0);
} else {
it0++;
Expand Down

0 comments on commit 60ac071

Please sign in to comment.