Commit d813ba3c authored by daniel's avatar daniel
Browse files

fixed tostring formatting

parent 2bef7a85
......@@ -87,20 +87,23 @@ std::string transformToEvalString(
const Eigen::Transform<double, 3, Eigen::Affine, Eigen::ColMajor> &T) {
std::ostringstream stream;
// stream << std::setprecision(std::numeric_limits<double>::digits10);
stream<<std::setprecision(6);
Eigen::Quaternion<double> tmp(T.rotation());
stream << T.translation().transpose() << " " << tmp.x() << " " << tmp.y()
stream << T.translation()(0) << T.translation()(1) << T.translation()(2) <<" " << tmp.x() << " " << tmp.y()
<< " " << tmp.z() << " " << tmp.w() << std::endl;
return stream.str();
}
std::string transformToEvalStringNoLineEnd(
const Eigen::Transform<double, 3, Eigen::Affine, Eigen::ColMajor> &T) {
std::ostringstream stream;
stream << std::setprecision(std::numeric_limits<double>::digits10);
stream << std::setprecision(6);
Eigen::Quaternion<double> tmp(T.rotation());
stream << " " << T.translation()(0) << " " << T.translation()(1) << " "
<< T.translation()(2) << " " << tmp.x() << " " << tmp.y() << " "
<< tmp.z() << " " << tmp.w();
return stream.str();
return stream.str();
//String.format("%.4f", T.translation()(0), T.translation()(1), T.translation()(2), tmp.x(), tmp.y(), tmp.z(), tmp.z());
}
std::string affine3dToStringRPY(const Eigen::Affine3d &T) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment