2020-10-28 02:09:59 +08:00
|
|
|
#include <pose.h>
|
|
|
|
|
|
|
|
namespace oh_my_loam {
|
|
|
|
|
|
|
|
Pose3D Interpolate(const Pose3D& pose_from, const Pose3D& pose_to, double t) {
|
2020-11-02 17:16:42 +08:00
|
|
|
return pose_from.Interpolate(pose_to, t);
|
2020-10-28 02:09:59 +08:00
|
|
|
}
|
|
|
|
|
2020-10-29 20:32:19 +08:00
|
|
|
Pose3D operator*(const Pose3D& lhs, const Pose3D& rhs) {
|
|
|
|
return Pose3D(lhs.q() * rhs.q(), lhs.q() * rhs.p() + lhs.p());
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string Pose3D::ToString() const {
|
|
|
|
std::ostringstream oss;
|
|
|
|
oss << "[Pose3D] q = (" << q_.coeffs().transpose() << "), p = ("
|
|
|
|
<< p_.transpose() << ")";
|
|
|
|
return oss.str();
|
|
|
|
}
|
|
|
|
|
2020-10-28 02:09:59 +08:00
|
|
|
} // namespace oh_my_loam
|