Skip to content
Snippets Groups Projects
Commit 18db640b authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Improve test rendering with initial state at the origin being printed

parent 1a249afa
No related branches found
No related tags found
No related merge requests found
...@@ -61,19 +61,20 @@ int main() ...@@ -61,19 +61,20 @@ int main()
std::cout << "\nIntegrating states at synchronous time values..." << std::endl; std::cout << "\nIntegrating states at synchronous time values..." << std::endl;
std::cout << "State(" << (t-t0) << ") : " << odom3d_ptr->state().transpose() << std::endl;
for (int i = 1; i <= 5; i++) for (int i = 1; i <= 5; i++)
{ {
t += dt;
cap_ptr->setTimeStamp(t); cap_ptr->setTimeStamp(t);
odom3d_ptr->process(cap_ptr); odom3d_ptr->process(cap_ptr);
std::cout << "State(" << (t-t0) << ") : " << odom3d_ptr->state().transpose() << std::endl; std::cout << "State(" << (t-t0) << ") : " << odom3d_ptr->state().transpose() << std::endl;
t += dt;
} }
std::cout << "\nQuery states at asynchronous time values..." << std::endl; std::cout << "\nQuery states at asynchronous time values..." << std::endl;
t = t0; t = t0;
WolfScalar dt_2 = dt/2; WolfScalar dt_2 = dt/2;
dt = 0.0027; // new dt dt = 0.0037; // new dt
for (int i = 1; i <= 20; i++) for (int i = 1; i <= 20; i++)
{ {
std::cout << "State(" << (t-t0) << ") = " << odom3d_ptr->state(t+dt_2).transpose() << std::endl; std::cout << "State(" << (t-t0) << ") = " << odom3d_ptr->state(t+dt_2).transpose() << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment