//WOLF_INFO("4 - The first frame is ", _first_frame->id(), " and it's currently estimated bias is: \n", _first_frame->getCaptureOf(_sensor_ptr)->getStateBlock('I')->getState());
<<state['P'](0)<<";"
//WOLF_INFO("its state vector is: \n", _first_frame->getStateVector());
<<state['V'](0)<<";"
//WOLF_INFO_COND(second_frame, "The second frame has been created");
<<bias_est(0)<<";"
//WOLF_INFO("5 - The last (current) frame is: ", _last_frame->id(), " and it's state vector is: \n", _last_frame->getStateVector());
<<bias_preint(0)<<"\n";
//WOLF_INFO("6 - The current frame's estimated bias is: \n", _last_frame->getCaptureOf(_sensor_ptr)->getStateBlock('I')->getState());
#endif
//WOLF_INFO("7 - The current state is (from _processor_motion): \n", _processor_motion->getState().vector("POV"));
//WOLF_INFO("4 - The first frame is ", _first_frame->id(), " and it's currently estimated bias is: \n", _first_frame->getCaptureOf(_sensor_ptr)->getStateBlock('I')->getState());
//WOLF_INFO("its state vector is: \n", _first_frame->getStateVector());
//WOLF_INFO_COND(second_frame, "The second frame has been created");
//WOLF_INFO("5 - The last (current) frame is: ", _last_frame->id(), " and it's state vector is: \n", _last_frame->getStateVector());
//WOLF_INFO("6 - The current frame's estimated bias is: \n", _last_frame->getCaptureOf(_sensor_ptr)->getStateBlock('I')->getState());
//WOLF_INFO("7 - The current state is (from _processor_motion): \n", _processor_motion->getState().vector("POV"));
//TODO: Fix this, it works because initial position and extrinsics are 0, but gravity has to be preceded by the quaternion that takes it to the IMU reference
//WOLF_INFO("0 - The first frame is ", first_frame_->id(), " and it's currently estimated bias is: \n", first_frame_->getCaptureOf(sensor_ptr_)->getStateBlock('I')->getState());
//WOLF_INFO("its state vector is: \n", first_frame_->getStateVector());
//WOLF_INFO_COND(second_frame, "The second frame has been created");
//WOLF_INFO("1 - The last (current) frame is: ", last_frame_->id(), " and it's state vector is: \n", last_frame_->getStateVector());
//WOLF_INFO("2 - The current frame's estimated bias is: \n", last_frame_->getCaptureOf(sensor_ptr_)->getStateBlock('I')->getState());
//WOLF_INFO("3 - The current state is (from processor_motion_): \n", processor_motion_->getState().vector("POV"));
//WOLF_INFO("4 - The first frame is ", first_frame_->id(), " and it's currently estimated bias is: \n", first_frame_->getCaptureOf(sensor_ptr_)->getStateBlock('I')->getState());
//WOLF_INFO("its state vector is: \n", first_frame_->getStateVector());
//WOLF_INFO_COND(second_frame, "The second frame has been created");
//WOLF_INFO("5 - The last (current) frame is: ", last_frame_->id(), " and it's state vector is: \n", last_frame_->getStateVector());
//WOLF_INFO("6 - The current frame's estimated bias is: \n", last_frame_->getCaptureOf(sensor_ptr_)->getStateBlock('I')->getState());
//WOLF_INFO("7 - The current state is (from processor_motion_): \n", processor_motion_->getState().vector("POV"));
WOLF_INFO("Current frame is ",n_frames," with ID ",processor_motion_->getLast()->id());
WOLF_INFO("The state is \n:",state);
WOLF_INFO("The estimated bias is: \n",bias_est);
WOLF_INFO("The preintegrated bias is: \n",bias_preint);
// //TODO: Fix this, it works because initial position and extrinsics are 0, but gravity has to be preceded by the quaternion that takes it to the IMU reference
// //WOLF_INFO("The Bias ground_truth is: \n", bias_groundtruth);
//
// //dt = 0.3;
//
// WOLF_INFO("Data is: \n", data);
// //int size = 7;
//
// int i = 1;
// int n_frames = 0;
// for(t = t0+dt; t <= t0 + 3 + dt/2; t+=dt){
// WOLF_INFO("Starting iteration ", i, " with timestamp ", t);
// ++i;
// auto C = std::make_shared<CaptureImu>(t, sensor_ptr_, data, data_cov);
// //WOLF_INFO("Created new Capture");
// //WOLF_INFO("Processing capture");
// C->process();
// //WOLF_INFO("Doing the static initialization stuff");
// //WOLF_INFO("0 - The first frame is ", first_frame_->id(), " and it's currently estimated bias is: \n", first_frame_->getCaptureOf(sensor_ptr_)->getStateBlock('I')->getState());
// //WOLF_INFO("its state vector is: \n", first_frame_->getStateVector());
// //WOLF_INFO_COND(second_frame, "The second frame has been created");
// //WOLF_INFO("1 - The last (current) frame is: ", last_frame_->id(), " and it's state vector is: \n", last_frame_->getStateVector());
// //WOLF_INFO("2 - The current frame's estimated bias is: \n", last_frame_->getCaptureOf(sensor_ptr_)->getStateBlock('I')->getState());
// //WOLF_INFO("3 - The current state is (from processor_motion_): \n", processor_motion_->getState().vector("POV"));
// auto bias_est = sensor_ptr_->getIntrinsic()->getState();
// auto bias_preint = processor_motion_->getLast()->getCalibrationPreint();
//
// //WOLF_INFO("Solved");
// if(first_frame_)
// {
// //WOLF_INFO("4 - The first frame is ", first_frame_->id(), " and it's currently estimated bias is: \n", first_frame_->getCaptureOf(sensor_ptr_)->getStateBlock('I')->getState());
// //WOLF_INFO("its state vector is: \n", first_frame_->getStateVector());
// //WOLF_INFO_COND(second_frame, "The second frame has been created");
// //WOLF_INFO("5 - The last (current) frame is: ", last_frame_->id(), " and it's state vector is: \n", last_frame_->getStateVector());
// //WOLF_INFO("6 - The current frame's estimated bias is: \n", last_frame_->getCaptureOf(sensor_ptr_)->getStateBlock('I')->getState());
// //WOLF_INFO("7 - The current state is (from processor_motion_): \n", processor_motion_->getState().vector("POV"));
// WOLF_INFO("Number of frames is ", n_frames, " with ID ", processor_motion_->getLast()->id());
// WOLF_INFO("The state is: ", state);
// WOLF_INFO("The estimated bias is: ", bias_est.transpose());
// WOLF_INFO("The preintegrated bias is: ", bias_preint.transpose());