17 #ifndef CARTOGRAPHER_TRANSFORM_RIGID_TRANSFORM_H_ 18 #define CARTOGRAPHER_TRANSFORM_RIGID_TRANSFORM_H_ 24 #include "Eigen/Geometry" 32 template <
typename FloatType>
35 using Vector = Eigen::Matrix<FloatType, 2, 1>;
46 return Rigid2(Vector::Zero(), rotation);
50 return Rigid2(Vector::Zero(), rotation);
54 return Rigid2(vector, Rotation2D::Identity());
61 template <
typename OtherType>
78 return Rigid2(translation, rotation);
87 out.append(
"], r: [");
98 template <
typename FloatType>
106 template <
typename FloatType>
114 template <
typename T>
124 template <
typename FloatType>
127 using Vector = Eigen::Matrix<FloatType, 3, 1>;
143 return Rigid3(Vector::Zero(), rotation);
147 return Rigid3(vector, Quaternion::Identity());
154 template <
typename OtherType>
166 return Rigid3(translation, rotation);
171 out.append(
"{ t: [");
177 out.append(
"], q: [");
178 out.append(std::to_string(
rotation().w()));
180 out.append(std::to_string(
rotation().x()));
182 out.append(std::to_string(
rotation().y()));
184 out.append(std::to_string(
rotation().z()));
194 template <
typename FloatType>
202 template <
typename FloatType>
210 template <
typename T>
222 Eigen::Quaterniond
RollPitchYaw(
double roll,
double pitch,
double yaw);
232 #endif // CARTOGRAPHER_TRANSFORM_RIGID_TRANSFORM_H_
T NormalizeAngleDifference(T difference)