39 #include <gtest/gtest.h>
41 #include <unsupported/Eigen/AutoDiff>
60 tf2.translation() = p;
71 using derivative_t = Eigen::Matrix<S, 3, 1>;
72 using scalar_t = Eigen::AutoDiffScalar<derivative_t>;
73 using input_t = Eigen::Matrix<scalar_t, 3, 1>;
75 input_t pos(40, 0, 0);
76 pos(0).derivatives() = derivative_t::Unit(3, 0);
77 pos(1).derivatives() = derivative_t::Unit(3, 1);
78 pos(2).derivatives() = derivative_t::Unit(3, 2);
86 pos(0).derivatives() = derivative_t::Unit(3, 0);
87 pos(1).derivatives() = derivative_t::Unit(3, 1);
88 pos(2).derivatives() = derivative_t::Unit(3, 2);
95 pos(0).derivatives() = derivative_t::Unit(3, 0);
96 pos(1).derivatives() = derivative_t::Unit(3, 1);
97 pos(2).derivatives() = derivative_t::Unit(3, 2);
108 test_basic<double>();
112 int main(
int argc,
char* argv[])
114 ::testing::InitGoogleTest(&argc, argv);
115 return RUN_ALL_TESTS();