Skip to content

Commit

Permalink
feat(object_recognition_utils): fix failing test (autowarefoundation#…
Browse files Browse the repository at this point in the history
…7268)

* feat(object_recognition_utils): fix failing test

Signed-off-by: Ryohsuke Mitsudome <[email protected]>

* Update common/object_recognition_utils/test/src/test_predicted_path_utils.cpp

---------

Signed-off-by: Ryohsuke Mitsudome <[email protected]>
Co-authored-by: Yukihiro Saito <[email protected]>
  • Loading branch information
mitsudome-r and yukkysaito authored Jun 5, 2024
1 parent df99718 commit 97173bc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ TEST(predicted_path_utils, resamplePredictedPath_by_vector)
}
}

// Resample which exceeds the maximum size
// Resample the path with more than 100 points
{
std::vector<double> resampling_vec(101);
for (size_t i = 0; i < 101; ++i) {
Expand All @@ -186,7 +186,7 @@ TEST(predicted_path_utils, resamplePredictedPath_by_vector)
EXPECT_EQ(resampled_path.path.size(), resampled_path.path.max_size());
EXPECT_NEAR(path.confidence, resampled_path.confidence, epsilon);

for (size_t i = 0; i < resampled_path.path.max_size(); ++i) {
for (size_t i = 0; i < resampled_path.path.size(); ++i) {
EXPECT_NEAR(resampled_path.path.at(i).position.x, resampling_vec.at(i), epsilon);
EXPECT_NEAR(resampled_path.path.at(i).position.y, 0.0, epsilon);
EXPECT_NEAR(resampled_path.path.at(i).position.z, 0.0, epsilon);
Expand Down

0 comments on commit 97173bc

Please sign in to comment.