8 #ifndef ecl_linear_algebra_SOPHUS_FORMATTERS_HPP_ 9 #define ecl_linear_algebra_SOPHUS_FORMATTERS_HPP_ 17 #include <sophus/se3.hpp> 144 template <
typename OutputStream>
153 const Sophus::SE3f *
s_;
156 template <
typename OutputStream>
160 "sophus object was not initialised " 161 "please pass the your matrix through () operator") );
164 "either there is no data available, or you have tried to use the " 165 "formatter more than once in a single streaming operation. " 166 "C++ produces unspecified results when functors are used multiply " 167 "in the same stream sequence, so this is not permitted here.") );
180 Eigen::Vector3f translation = formatter.
s_->translation();
181 Eigen::Quaternionf quaternion = formatter.
s_->unit_quaternion();
183 ostream <<
"x:" << formatter.
format(translation.x()) <<
" ";
184 ostream <<
"y:" << formatter.
format(translation.y()) <<
" ";
185 ostream <<
"z:" << formatter.
format(translation.z());
188 ostream <<
"x:" << formatter.
format(quaternion.x()) <<
" ";
189 ostream <<
"y:" << formatter.
format(quaternion.y()) <<
" ";
190 ostream <<
"z:" << formatter.
format(quaternion.z()) <<
" ";
191 ostream <<
"w:" << formatter.
format(quaternion.w()) <<
" ";
#define ecl_assert_throw(expression, exception)