Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
software
ndt_core_public
Commits
d813ba3c
Commit
d813ba3c
authored
Aug 27, 2018
by
daniel
Browse files
fixed tostring formatting
parent
2bef7a85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
ndt_generic/src/eigen_utils.cpp
ndt_generic/src/eigen_utils.cpp
+6
-3
No files found.
ndt_generic/src/eigen_utils.cpp
View file @
d813ba3c
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment