Skip to content

Commit

Permalink
Remove printouts in test case
Browse files Browse the repository at this point in the history
  • Loading branch information
dmronga committed Jun 5, 2024
1 parent 1cd40f8 commit 01aeebf
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/solvers/osqp/test/test_osqp_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE(solver_without_constraints)
gettimeofday(&end, NULL);
long useconds = end.tv_usec - start.tv_usec;

cout<<"\n----------------------- Test Results ----------------------"<<endl<<endl;
/*cout<<"\n----------------------- Test Results ----------------------"<<endl<<endl;
std::cout<<"Solver took "<<useconds<<" us "<<std::endl;
cout<<"No of joints: "<<NO_JOINTS<<endl;
cout<<"No of eq. constraints: "<<NO_EQ_CONSTRAINTS<<endl;
Expand All @@ -70,13 +70,13 @@ BOOST_AUTO_TEST_CASE(solver_without_constraints)
cout<<"Constraint Matrix A:"<<endl; cout<<A<<endl;
cout<<"Reference: y = "<<y.transpose()<<endl;
cout<<"\nSolver Output: q_dot = "<<solver_output.transpose()<<endl;
cout<<"\nSolver Output: q_dot = "<<solver_output.transpose()<<endl;*/
Eigen::VectorXd test = A*solver_output;
cout<<"Test: A * q_dot = "<<test.transpose();
//cout<<"Test: A * q_dot = "<<test.transpose();
for(uint j = 0; j < NO_JOINTS; j++)
BOOST_CHECK(fabs(test(j) - y(j)) < 1e-3);

cout<<"\n............................."<<endl;
//cout<<"\n............................."<<endl;
}

BOOST_AUTO_TEST_CASE(solver_with_equality_constraints)
Expand Down Expand Up @@ -125,7 +125,7 @@ BOOST_AUTO_TEST_CASE(solver_with_equality_constraints)
gettimeofday(&end, NULL);
long useconds = end.tv_usec - start.tv_usec;

cout<<"\n----------------------- Test Results ----------------------"<<endl<<endl;
/*cout<<"\n----------------------- Test Results ----------------------"<<endl<<endl;
std::cout<<"Solver took "<<useconds<<" us "<<std::endl;
cout<<"No of joints: "<<NO_JOINTS<<endl;
cout<<"No of eq. constraints: "<<NO_EQ_CONSTRAINTS<<endl;
Expand All @@ -135,13 +135,13 @@ BOOST_AUTO_TEST_CASE(solver_with_equality_constraints)
cout<<"Constraint Matrix A:"<<endl; cout<<A<<endl;
cout<<"Reference: y = "<<y.transpose()<<endl;
cout<<"\nSolver Output: q_dot = "<<solver_output.transpose()<<endl;
cout<<"\nSolver Output: q_dot = "<<solver_output.transpose()<<endl;*/
Eigen::VectorXd test = A*solver_output;
cout<<"Test: A * q_dot = "<<test.transpose();
//cout<<"Test: A * q_dot = "<<test.transpose();
for(uint j = 0; j < y.size(); j++)
BOOST_CHECK(fabs(test(j) - y(j)) < 1e-3);

cout<<"\n............................."<<endl;
//cout<<"\n............................."<<endl;
}

BOOST_AUTO_TEST_CASE(solver_bounded)
Expand Down

0 comments on commit 01aeebf

Please sign in to comment.