Skip to content

Commit

Permalink
Minor test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
JHartzer committed Sep 27, 2024
1 parent 320ec27 commit b57786b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/ekf/update/test/imu_updater_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ TEST(test_imu_updater, update) {
EXPECT_EQ(state.body_state.pos_b_in_l[1], 4);
EXPECT_EQ(state.body_state.pos_b_in_l[2], 4);

EXPECT_NEAR(state.body_state.vel_b_in_l[0], 10.4139, 1e-3);
EXPECT_NEAR(state.body_state.vel_b_in_l[0], 10.4139, 1e-2);
EXPECT_EQ(state.body_state.vel_b_in_l[1], 1);
EXPECT_EQ(state.body_state.vel_b_in_l[2], 1);
}
Expand Down Expand Up @@ -188,11 +188,11 @@ TEST(test_imu_updater, imu_prediction_update) {
ekf, time, acceleration, acceleration_cov, angular_rate, angular_rate_cov, use_for_prediction);

state = ekf->m_state;
EXPECT_EQ(state.body_state.pos_b_in_l[0], 3);
EXPECT_EQ(state.body_state.pos_b_in_l[0], 8);
EXPECT_EQ(state.body_state.pos_b_in_l[1], 3);
EXPECT_EQ(state.body_state.pos_b_in_l[2], 3);

EXPECT_EQ(state.body_state.vel_b_in_l[0], 1);
EXPECT_EQ(state.body_state.vel_b_in_l[0], 11);
EXPECT_EQ(state.body_state.vel_b_in_l[1], 1);
EXPECT_EQ(state.body_state.vel_b_in_l[2], 1);

Expand All @@ -201,11 +201,11 @@ TEST(test_imu_updater, imu_prediction_update) {
ekf, time, acceleration, acceleration_cov, angular_rate, angular_rate_cov, use_for_prediction);

state = ekf->m_state;
EXPECT_EQ(state.body_state.pos_b_in_l[0], 4);
EXPECT_EQ(state.body_state.pos_b_in_l[0], 24);
EXPECT_EQ(state.body_state.pos_b_in_l[1], 4);
EXPECT_EQ(state.body_state.pos_b_in_l[2], 4);

EXPECT_EQ(state.body_state.vel_b_in_l[0], 11);
EXPECT_EQ(state.body_state.vel_b_in_l[0], 21);
EXPECT_EQ(state.body_state.vel_b_in_l[1], 1);
EXPECT_EQ(state.body_state.vel_b_in_l[2], 1);
}
Expand Down
8 changes: 4 additions & 4 deletions src/ekf/update/test/msckf_updater_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ TEST(test_msckf_updater, update) {
feature_point_3.frame_id = 3;
feature_point_3.key_point = point_3;

std::vector<FeaturePoint> feature_points;
feature_points.push_back(feature_point_1);
feature_points.push_back(feature_point_2);
feature_points.push_back(feature_point_3);
FeatureTrack feature_points;
feature_points.track.push_back(feature_point_1);
feature_points.track.push_back(feature_point_2);
feature_points.track.push_back(feature_point_3);

FeatureTracks feature_tracks;
feature_tracks.push_back(feature_points);
Expand Down

0 comments on commit b57786b

Please sign in to comment.