Commit 642a7145 authored by Gabriele Buondonno's avatar Gabriele Buondonno
Browse files

[unittest] Test isNormalized

parent b3cb23de
......@@ -362,6 +362,26 @@ BOOST_AUTO_TEST_CASE ( normalize_test )
BOOST_CHECK(q.tail(n).isApprox(Eigen::VectorXd::Ones(n)));
}
BOOST_AUTO_TEST_CASE ( is_normalized_test )
{
Model model; buildAllJointsModel(model);
Eigen::VectorXd q;
q = Eigen::VectorXd::Ones(model.nq);
BOOST_CHECK(!pinocchio::isNormalized(model, q));
pinocchio::normalize(model, q);
BOOST_CHECK(pinocchio::isNormalized(model, q));
q = pinocchio::neutral(model);
BOOST_CHECK(pinocchio::isNormalized(model, q));
model.lowerPositionLimit = -1 * Eigen::VectorXd::Ones(model.nq);
model.upperPositionLimit = Eigen::VectorXd::Ones(model.nq);
q = pinocchio::randomConfiguration(model);
BOOST_CHECK(pinocchio::isNormalized(model, q));
}
BOOST_AUTO_TEST_CASE ( integrateCoeffWiseJacobian_test )
{
Model model; buildModels::humanoidRandom(model);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment