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
Gabriele Buondonno
pinocchio
Commits
b9a80b6c
Commit
b9a80b6c
authored
Oct 05, 2017
by
jcarpent
Browse files
[Unit Test] Add distance algo checking
parent
9d75dc3c
Changes
1
Hide whitespace changes
Inline
Side-by-side
unittest/joint-configurations.cpp
View file @
b9a80b6c
...
@@ -329,6 +329,19 @@ BOOST_AUTO_TEST_CASE ( neutral_configuration_test )
...
@@ -329,6 +329,19 @@ BOOST_AUTO_TEST_CASE ( neutral_configuration_test )
BOOST_CHECK_MESSAGE
(
model
.
neutralConfiguration
.
isApprox
(
expected
,
1e-12
),
"neutral configuration - wrong results"
);
BOOST_CHECK_MESSAGE
(
model
.
neutralConfiguration
.
isApprox
(
expected
,
1e-12
),
"neutral configuration - wrong results"
);
}
}
BOOST_AUTO_TEST_CASE
(
distance_configuration_test
)
{
Model
model
;
buildModel
(
model
);
Eigen
::
VectorXd
q0
(
model
.
neutralConfiguration
);
Eigen
::
VectorXd
q1
(
q0
+
Eigen
::
VectorXd
::
Ones
(
model
.
nq
));
double
dist
=
distance
(
model
,
q0
,
q1
);
BOOST_CHECK_MESSAGE
(
dist
>
0.
,
"distance - wrong results"
);
BOOST_CHECK_SMALL
(
dist
-
differentiate
(
model
,
q0
,
q1
).
norm
(),
1e-12
);
}
BOOST_AUTO_TEST_CASE
(
uniform_sampling_test
)
BOOST_AUTO_TEST_CASE
(
uniform_sampling_test
)
{
{
Model
model
;
buildModel
(
model
);
Model
model
;
buildModel
(
model
);
...
...
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