9 template class Map<Sophus::SE3<double>>;
10 template class Map<Sophus::SE3<double>
const>;
15 template class SE3<double, Eigen::AutoAlign>;
16 template class SE3<float, Eigen::DontAlign>;
18 template class SE3<ceres::Jet<double, 3>>;
21 template <
class Scalar>
70 Eigen::Matrix<Scalar, 7, 1> raw;
73 Eigen::Map<SE3Type const> map_of_const_se3(raw.data());
75 passed, map_of_const_se3.unit_quaternion().coeffs().eval(),
78 raw.template tail<3>().eval(),
81 passed, map_of_const_se3.unit_quaternion().coeffs().data(), raw.data());
84 Eigen::Map<SE3Type const> const_shallow_copy = map_of_const_se3;
86 const_shallow_copy.unit_quaternion().coeffs().eval(),
87 map_of_const_se3.unit_quaternion().coeffs().eval());
89 map_of_const_se3.translation().eval());
91 Eigen::Matrix<Scalar, 7, 1> raw2;
94 Eigen::Map<SE3Type> map_of_se3(raw.data());
95 Eigen::Quaternion<Scalar> quat;
96 quat.coeffs() = raw2.template head<4>();
97 map_of_se3.setQuaternion(quat);
98 map_of_se3.translation() = raw2.template tail<3>();
100 raw2.template head<4>().eval(),
103 raw2.template tail<3>().eval(),
109 quat.coeffs().data());
110 Eigen::Map<SE3Type> shallow_copy = map_of_se3;
112 map_of_se3.unit_quaternion().coeffs().eval());
114 map_of_se3.translation().eval());
115 Eigen::Map<SE3Type>
const const_map_of_se3 = map_of_se3;
117 const_map_of_se3.unit_quaternion().coeffs().eval(),
118 map_of_se3.unit_quaternion().coeffs().eval());
120 map_of_se3.translation().eval());
122 SE3Type const const_se3(quat, raw2.template tail<3>().eval());
123 for (
int i = 0; i < 7; ++i) {
127 SE3Type se3(quat, raw2.template tail<3>().eval());
128 for (
int i = 0; i < 7; ++i) {
132 for (
int i = 0; i < 7; ++i) {
162 se3.setRotationMatrix(R.matrix());
171 Eigen::Matrix<Scalar, 4, 4> I = Eigen::Matrix<Scalar, 4, 4>::Identity();
191 template <
class S = Scalar>
195 for (
int i = 0; i < 100; ++i) {
215 template <
class S = Scalar>
220 std::vector<SE3Type, Eigen::aligned_allocator<SE3Type>>
se3_vec_;
221 std::vector<Tangent, Eigen::aligned_allocator<Tangent>>
tangent_vec_;
222 std::vector<Point, Eigen::aligned_allocator<Point>>
point_vec_;
229 cerr <<
"Test SE3" << endl << endl;
230 cerr <<
"Double tests: " << endl;
232 cerr <<
"Float tests: " << endl;
236 cerr <<
"ceres::Jet<double, 3> tests: " << endl;