Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
pinocchio
Commits
251164b8
Verified
Commit
251164b8
authored
Apr 08, 2020
by
Justin Carpentier
Browse files
test/joints: remove useless print function
parent
f260eec5
Changes
1
Hide whitespace changes
Inline
Side-by-side
unittest/joints.cpp
View file @
251164b8
...
@@ -21,31 +21,8 @@
...
@@ -21,31 +21,8 @@
#include
<boost/test/unit_test.hpp>
#include
<boost/test/unit_test.hpp>
//#define VERBOSE
using
namespace
pinocchio
;
using
namespace
pinocchio
;
template
<
typename
JointData
>
void
printOutJointData
(
const
Eigen
::
VectorXd
&
q
,
const
Eigen
::
VectorXd
&
v
,
const
JointDataBase
<
JointData
>
&
joint_data
)
{
PINOCCHIO_UNUSED_VARIABLE
(
q
);
PINOCCHIO_UNUSED_VARIABLE
(
v
);
PINOCCHIO_UNUSED_VARIABLE
(
joint_data
);
#ifdef VERBOSE
using
namespace
std
;
cout
<<
"q: "
<<
q
.
transpose
()
<<
endl
;
cout
<<
"v: "
<<
v
.
transpose
()
<<
endl
;
cout
<<
"Joint configuration:"
<<
endl
<<
joint_data
.
M
()
<<
endl
;
cout
<<
"v_J:
\n
"
<<
(
Motion
)
joint_data
.
v
()
<<
endl
;
cout
<<
"c_J:
\n
"
<<
(
Motion
)
joint_data
.
c
()
<<
endl
;
#endif
}
template
<
typename
D
>
template
<
typename
D
>
void
addJointAndBody
(
Model
&
model
,
void
addJointAndBody
(
Model
&
model
,
const
JointModelBase
<
D
>
&
jmodel
,
const
JointModelBase
<
D
>
&
jmodel
,
...
@@ -645,8 +622,6 @@ BOOST_AUTO_TEST_CASE ( test_kinematics )
...
@@ -645,8 +622,6 @@ BOOST_AUTO_TEST_CASE ( test_kinematics )
joint_model
.
calc
(
joint_data
,
q
,
q_dot
);
joint_model
.
calc
(
joint_data
,
q
,
q_dot
);
printOutJointData
<
JointDataPX
>
(
q
,
q_dot
,
joint_data
);
BOOST_CHECK
(
expected_configuration
.
rotation
().
isApprox
(
joint_data
.
M
.
rotation
(),
1e-12
));
BOOST_CHECK
(
expected_configuration
.
rotation
().
isApprox
(
joint_data
.
M
.
rotation
(),
1e-12
));
BOOST_CHECK
(
expected_configuration
.
translation
().
isApprox
(
joint_data
.
M
.
translation
(),
1e-12
));
BOOST_CHECK
(
expected_configuration
.
translation
().
isApprox
(
joint_data
.
M
.
translation
(),
1e-12
));
BOOST_CHECK
(
expected_v_J
.
toVector
().
isApprox
(((
Motion
)
joint_data
.
v
).
toVector
(),
1e-12
));
BOOST_CHECK
(
expected_v_J
.
toVector
().
isApprox
(((
Motion
)
joint_data
.
v
).
toVector
(),
1e-12
));
...
@@ -656,11 +631,8 @@ BOOST_AUTO_TEST_CASE ( test_kinematics )
...
@@ -656,11 +631,8 @@ BOOST_AUTO_TEST_CASE ( test_kinematics )
q
<<
1.
;
q
<<
1.
;
q_dot
<<
1.
;
q_dot
<<
1.
;
joint_model
.
calc
(
joint_data
,
q
,
q_dot
);
joint_model
.
calc
(
joint_data
,
q
,
q_dot
);
printOutJointData
<
JointDataPX
>
(
q
,
q_dot
,
joint_data
);
expected_configuration
.
translation
()
<<
1
,
0
,
0
;
expected_configuration
.
translation
()
<<
1
,
0
,
0
;
expected_v_J
.
linear
()
<<
1.
,
0.
,
0.
;
expected_v_J
.
linear
()
<<
1.
,
0.
,
0.
;
...
...
Write
Preview
Supports
Markdown
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