diff --git a/include/core/processor/processor_motion.h b/include/core/processor/processor_motion.h index 3e127c9cb01067b5a7a6170984d28debacc409bc..ab0e9b9cf222bbb16ab9e6713d273fbedadde8fe 100644 --- a/include/core/processor/processor_motion.h +++ b/include/core/processor/processor_motion.h @@ -466,7 +466,7 @@ class ProcessorMotion : public ProcessorBase, public IsMotion bool state_blocks, std::ostream& stream , std::string _tabs = "") const override; -CaptureMotionPtr last_ptr_; + protected: // Attributes SizeEigen x_size_; ///< The size of the state vector @@ -475,7 +475,7 @@ CaptureMotionPtr last_ptr_; SizeEigen delta_cov_size_; ///< the size of the delta covariances matrix SizeEigen calib_size_; ///< the size of the calibration parameters (TBD in derived classes) CaptureMotionPtr origin_ptr_; - + CaptureMotionPtr last_ptr_; CaptureMotionPtr incoming_ptr_; protected: diff --git a/src/processor/processor_motion.cpp b/src/processor/processor_motion.cpp index d8c6c1a4491ad7a8afcda06a4a368cf208785890..36425f7946971b25c1921f6d93cef800fbf0a81a 100644 --- a/src/processor/processor_motion.cpp +++ b/src/processor/processor_motion.cpp @@ -25,13 +25,13 @@ ProcessorMotion::ProcessorMotion(const std::string& _type, ProcessorBase(_type, _dim, _params_motion), params_motion_(_params_motion), processing_step_(RUNNING_WITHOUT_KF), - last_ptr_(), x_size_(_state_size), data_size_(_data_size), delta_size_(_delta_size), delta_cov_size_(_delta_cov_size), calib_size_(_calib_size), origin_ptr_(), + last_ptr_(), incoming_ptr_(), dt_(0.0), x_(_state_size), @@ -302,7 +302,7 @@ void ProcessorMotion::processCapture(CaptureBasePtr _incoming_ptr) // Update state and time stamps last_ptr_->setTimeStamp(getCurrentTimeStamp()); auto test_last = last_ptr_->getFrame(); - WOLF_TRACE("HELLO KITTY ", test_last == nullptr); + WOLF_TRACE("Is last_ptr_ null? ", test_last == nullptr); test_last->setTimeStamp(getCurrentTimeStamp()); test_last->setState(getProblem()->getState(getCurrentTimeStamp())); diff --git a/test/gtest_processor_base.cpp b/test/gtest_processor_base.cpp index 5c62cac885fe2af03d832433f8c497f5081507a0..1665ca2df5c419a55f58ae427316710ccff6e0fd 100644 --- a/test/gtest_processor_base.cpp +++ b/test/gtest_processor_base.cpp @@ -116,9 +116,9 @@ TEST(ProcessorBase, KeyFrameCallback) capt_odo->setTimeStamp(t); std::cout << "2\n"; problem->check(1); - auto proc_odo_motion = std::static_pointer_cast<ProcessorMotion>(proc_odo); - auto last_ptr = proc_odo_motion->last_ptr_; - auto last_ptr_frame = last_ptr->getFrame(); +// auto proc_odo_motion = std::static_pointer_cast<ProcessorMotion>(proc_odo); +// auto last_ptr = proc_odo_motion->last_ptr_; +// auto last_ptr_frame = last_ptr->getFrame(); proc_odo->captureCallback(capt_odo); std::cout << "3\n";