Skip to content

Commit

Permalink
Updated printing of covariance matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
marip8 committed Jun 18, 2020
1 parent 77f0252 commit 57f717b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rct_optimizations/test/pnp_utest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ TEST(PNP_2D, PerfectInitialConditions)
EXPECT_LT(result.initial_cost_per_obs, 1.0e-15);
EXPECT_LT(result.final_cost_per_obs, 1.0e-15);

Eigen::IOFormat fmt(4, 0, ", ", "\n", "[", "]");
Eigen::IOFormat fmt(4, 0, " | ", "\n", "|", "|");
std::cout << "Covariance:\n" << result.camera_to_target_covariance.format(fmt) << std::endl;
}

Expand Down Expand Up @@ -61,7 +61,7 @@ TEST(PNP_2D, PerturbedInitialCondition)
EXPECT_TRUE(result.camera_to_target.isApprox(camera_to_target, 1.0e-8));
EXPECT_LT(result.final_cost_per_obs, 1.0e-15);

Eigen::IOFormat fmt(4, 0, ", ", "\n", "[", "]");
Eigen::IOFormat fmt(4, 0, " | ", "\n", "|", "|");
std::cout << "Covariance:\n" << result.camera_to_target_covariance.format(fmt) << std::endl;
}

Expand Down Expand Up @@ -100,7 +100,7 @@ TEST(PNP_2D, BadIntrinsicParameters)
EXPECT_FALSE(result.camera_to_target.isApprox(camera_to_target, 1.0e-3));
EXPECT_GT(result.final_cost_per_obs, 1.0e-3);

Eigen::IOFormat fmt(4, 0, ", ", "\n", "[", "]");
Eigen::IOFormat fmt(4, 0, " | ", "\n", "|", "|");
std::cout << "Covariance:\n" << result.camera_to_target_covariance.format(fmt) << std::endl;
}

Expand Down

0 comments on commit 57f717b

Please sign in to comment.