Skip to content

Commit

Permalink
cast solver errors to int
Browse files Browse the repository at this point in the history
  • Loading branch information
ccarigna committed Oct 23, 2024
1 parent f36ad6d commit b9f06c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions orocos_kdl/tests/solvertest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ void SolverTest::IkVelSolverPinvTest()
q(5) = 0.0;
q(6) = 0.0;

CPPUNIT_ASSERT_EQUAL(SolverI::E_NOERROR, ikvelsolver.CartToJnt(q, dx, dq)); // pinv mode
CPPUNIT_ASSERT_EQUAL((int)SolverI::E_NOERROR, ikvelsolver.CartToJnt(q, dx, dq)); // pinv mode
CPPUNIT_ASSERT_EQUAL(1u, ikvelsolver.getNrZeroSigmas()); // 1 singular value

std::cout << "Test singular value function" << std::endl;
Expand All @@ -753,19 +753,19 @@ void SolverTest::IkVelSolverPinvTest()

q(1) = 0.2;

CPPUNIT_ASSERT_EQUAL(ChainIkSolverVel_pinv::E_CONVERGE_PINV_SINGULAR, ikvelsolver.CartToJnt(q, dx, dq)); // pinv mode
CPPUNIT_ASSERT_EQUAL((int)ChainIkSolverVel_pinv::E_CONVERGE_PINV_SINGULAR, ikvelsolver.CartToJnt(q, dx, dq)); // pinv mode
CPPUNIT_ASSERT_EQUAL(2u, ikvelsolver.getNrZeroSigmas()) ; // 2 singular values

q(1) = 0.0;

CPPUNIT_ASSERT_EQUAL(ChainIkSolverVel_pinv::E_CONVERGE_PINV_SINGULAR, ikvelsolver.CartToJnt(q, dx, dq)); // pinv mode
CPPUNIT_ASSERT_EQUAL((int)ChainIkSolverVel_pinv::E_CONVERGE_PINV_SINGULAR, ikvelsolver.CartToJnt(q, dx, dq)); // pinv mode
CPPUNIT_ASSERT_EQUAL(2u, ikvelsolver.getNrZeroSigmas()); // 2 singular values

// Fully singular
q(2) = 0.0;
q(3) = 0.0;

CPPUNIT_ASSERT_EQUAL(ChainIkSolverVel_pinv::E_CONVERGE_PINV_SINGULAR, ikvelsolver.CartToJnt(q, dx, dq)); // pinv mode
CPPUNIT_ASSERT_EQUAL((int)ChainIkSolverVel_pinv::E_CONVERGE_PINV_SINGULAR, ikvelsolver.CartToJnt(q, dx, dq)); // pinv mode
CPPUNIT_ASSERT_EQUAL(4u, ikvelsolver.getNrZeroSigmas());
}

Expand Down

0 comments on commit b9f06c5

Please sign in to comment.