36 #include <Eigen/Geometry> 38 #include <gtest/gtest.h> 42 Eigen::Isometry3d t(Eigen::AngleAxisd(0.42, Eigen::Vector3d(1, 1, 1).normalized()));
45 const Eigen::Vector3d oldDiagonal = t.linear().diagonal();
46 t.linear() = t.linear() * Eigen::DiagonalMatrix<double, 3, 3>(1.0, 2.0, 3.0);
49 t.matrix().row(3) = Eigen::Vector4d(1e-6, 1e-6, 1e-6, 1 - 1e-6);
52 t.linear().diagonal() = oldDiagonal;
60 TEST(Utils, assertIsometry)
62 Eigen::Isometry3d t(Eigen::AngleAxisd(0.42, Eigen::Vector3d(1, 1, 1).normalized()));
65 t.linear() = t.linear() * Eigen::DiagonalMatrix<double, 3, 3>(1.0, 2.0, 3.0);
72 t.matrix().row(3) = Eigen::Vector4d(1e-6, 1e-6, 1e-6, 1 - 1e-6);
82 int main(
int argc,
char** argv)
84 testing::InitGoogleTest(&argc, argv);
85 return RUN_ALL_TESTS();
bool checkIsometry(const Eigen::Isometry3d &transform, const double precision=CHECK_ISOMETRY_PRECISION, const bool printError=true)
Check whether the given transform is really (mathematically) an isometry.
int main(int argc, char **argv)
#define ASSERT_ISOMETRY(transform)
Assert that the given transform is an isometry.
#define CHECK_ISOMETRY_PRECISION
This file provides functions and macros that can be used to verify that an Eigen::Isometry3d is reall...
TEST(Utils, checkIsometry)