Some tools to ease pretty printing of objects in HPP. To print vectors, you have the following options:
std::cout << incindent << iendl <<
pretty_print(SE3::Identity()) << iendl
<< decindent << iendl;
<< iendl;
<< iendl;
<< iendl <<
one_line(m.block(1, 1, 2, 2)) << iendl;
PrettyPrint< T, PrettyOutput > pretty_print(const T &t)
Pretty printing.
Definition: util.hh:214
PrettyPrint< T, CondensedOutput > condensed(const T &t)
Condensed printing.
Definition: util.hh:219
HPP_PINOCCHIO_DLLAPI std::ostream & unsetpyformat(std::ostream &o)
PrettyPrint< T, OneLineOutput > one_line(const T &t)
Print on one line.
Definition: util.hh:224
HPP_PINOCCHIO_DLLAPI std::ostream & setpyformat(std::ostream &o)
Eigen::Matrix< value_type, Eigen::Dynamic, 1 > vector_t
Definition: fwd.hh:88
Eigen::Ref< vector_t > vectorOut_t
Definition: fwd.hh:94
Eigen::Matrix< value_type, Eigen::Dynamic, Eigen::Dynamic > matrix_t
Definition: fwd.hh:95
Eigen::Ref< const vector_t > vectorIn_t
Definition: fwd.hh:93
which should output something like
R = 1, 0, 0
0, 1, 0
0, 0, 1
p = 0, 0, 0
q = 0, 0, 0, 1
p = 0, 0, 0
q = 0, 0, 0, 1, p = 0, 0, 0
R = ( (1, 0, 0,)
(0, 1, 0,)
(0, 0, 1,) )
p = (0, 0, 0,)
q = (0, 0, 0, 1,)
p = (0, 0, 0,)
q = (0, 0, 0, 1,), p = (0, 0, 0,)
1, 1
1, 1
1, 1
1, 1
1, 1
( (1, 0, 0,),
(0, 1, 0,),
(0, 0, 1,), )
( (1, 0, 0,), (0, 1, 0,), (0, 0, 1,), )
( (1, 0,), (0, 1,), )
◆ anonymous enum
The printing options, currently only contains the output format.
Enumerator |
---|
OutputFormatBits | |
OneLineOutput | |
CondensedOutput | |
PrettyOutput | |
◆ condensed()
◆ one_line()
◆ pretty_print()
template<typename T >
PrettyPrint<T, PrettyOutput> hpp::pretty_print |
( |
const T & |
t | ) |
|
|
inline |
◆ setpyformat()
◆ unsetpyformat()