Skip to content

Commit

Permalink
Smaller window to save imu values
Browse files Browse the repository at this point in the history
  • Loading branch information
goldbattle committed Jun 15, 2021
1 parent fae7144 commit 8ebb782
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ov_msckf/src/state/Propagator.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ namespace ov_msckf {
// Append it to our vector
imu_data.emplace_back(message);

// Loop through and delete imu messages that are older then 20 seconds
// Loop through and delete imu messages that are older then 10 seconds
// TODO: we should probably have more elegant logic then this
// TODO: but this prevents unbounded memory growth and slow prop with high freq imu
auto it0 = imu_data.begin();
while(it0 != imu_data.end()) {
if(message.timestamp-(*it0).timestamp > 20) {
if(message.timestamp-(*it0).timestamp > 10) {
it0 = imu_data.erase(it0);
} else {
it0++;
Expand Down
4 changes: 2 additions & 2 deletions ov_msckf/src/update/UpdaterZeroVelocity.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@ namespace ov_msckf {
// return i.timestamp < j.timestamp;
//});

// Loop through and delete imu messages that are older then 20 seconds
// Loop through and delete imu messages that are older then 10 seconds
// TODO: we should probably have more elegant logic then this
// TODO: but this prevents unbounded memory growth and slow prop with high freq imu
auto it0 = imu_data.begin();
while(it0 != imu_data.end()) {
if(message.timestamp-(*it0).timestamp > 60) {
if(message.timestamp-(*it0).timestamp > 10) {
it0 = imu_data.erase(it0);
} else {
it0++;
Expand Down

0 comments on commit 8ebb782

Please sign in to comment.