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

Cleanup conflict comments

parent 4392a2f3
No related branches found
No related tags found
1 merge request!362WIP: Resolve "std::set and std::map instead of std::list in wolf nodes"
Pipeline #5821 passed
......@@ -301,15 +301,6 @@ inline VectorXd HasStateBlocks::getStateVector(const StateStructure& _structure)
inline VectorComposite HasStateBlocks::getState(const StateStructure& _structure) const
{
//<<<<<<< HEAD
// StateStructure structure = (_structure == "" ? structure_ : _structure);
//
// VectorComposite state;
// for (const auto& ckey : structure)
// {
// const auto& key = string(1,ckey); // ckey is char
// state.emplace(key, state_block_map_.at(key)->getState());
//=======
const StateStructure& structure = (_structure == "" ? structure_ : _structure);
VectorComposite state;
......@@ -321,7 +312,6 @@ inline VectorComposite HasStateBlocks::getState(const StateStructure& _structure
if (state_it != state_block_map_.end())
state.emplace(key, state_it->second->getState());
//>>>>>>> devel
}
return state;
......
......@@ -330,9 +330,6 @@ FrameBasePtr Problem::emplaceKeyFrame(const TimeStamp& _time_stamp, //
const SizeEigen _dim, //
const Eigen::VectorXd& _frame_state)
{
//<<<<<<< HEAD
// auto frm = FrameBase::emplaceKeyFrame<FrameBase>(trajectory_ptr_,
//=======
VectorComposite state;
SizeEigen index = 0;
SizeEigen size = 0;
......@@ -356,11 +353,9 @@ FrameBasePtr Problem::emplaceKeyFrame(const TimeStamp& _time_stamp, //
assert (_frame_state.size() == index && "State vector incompatible with given structure and dimension! Vector too large.");
auto frm = FrameBase::emplaceKeyFrame<FrameBase>(trajectory_ptr_,
// _frame_key_type,
//>>>>>>> devel
_time_stamp,
_frame_structure,
state);
_time_stamp,
_frame_structure,
state);
return frm;
}
......@@ -410,17 +405,6 @@ FrameBasePtr Problem::emplaceKeyFrame(const TimeStamp& _time_stamp)
TimeStamp Problem::getTimeStamp ( ) const
{
//<<<<<<< HEAD
// if ( processor_is_motion_list_.empty() ) // Use last estimated frame's state
// {
// auto last_kf = trajectory_ptr_->getLastKeyFrame();
//
// assert(last_kf != nullptr && "Problem has no Keyframe so no timestamp can be obtained!");
//
// return last_kf->getTimeStamp();
// }
// else
//=======
TimeStamp ts = TimeStamp::Invalid();
for (const auto& prc : processor_is_motion_list_)
......@@ -430,7 +414,6 @@ TimeStamp Problem::getTimeStamp ( ) const
if (not ts.ok())
//>>>>>>> devel
{
const auto& last_kf_or_aux = trajectory_ptr_->getLastKeyFrame();
......@@ -451,20 +434,8 @@ VectorComposite Problem::getState(const StateStructure& _structure) const
VectorComposite state;
//<<<<<<< HEAD
// if ( processor_is_motion_list_.empty() ) // Use last estimated frame's state
// {
// auto last_kf = trajectory_ptr_->getLastKeyFrame();
// if (last_kf)
// state = last_kf->getState(structure);
// else
// state = stateZero(structure);
// }
// else // Compose from different processor motion
//=======
// compose the states of all processor motions into one only state
for (const auto& prc : processor_is_motion_list_)
//>>>>>>> devel
{
const auto& prc_state = prc->getState(structure);
for (const auto& pair_key_vec : prc_state)
......@@ -507,22 +478,6 @@ VectorComposite Problem::getState (const TimeStamp& _ts, const StateStructure& _
{
StateStructure structure = (_structure == "" ? getFrameStructure() : _structure);
//<<<<<<< HEAD
// if ( processor_is_motion_list_.empty() ) // Use last estimated frame's state
// {
// const auto& last_kf = trajectory_ptr_->closestKeyFrameToTimeStamp(_ts);
// if (last_kf)
// {
// return last_kf->getState(structure);
// }
// else
// {
// return stateZero(structure);
// }
// }
//
//=======
//>>>>>>> devel
VectorComposite state;
for (const auto& prc : processor_is_motion_list_)
......
......@@ -656,16 +656,9 @@ void ProcessorMotion::setOrigin(FrameBasePtr _origin_frame)
// ---------- LAST ----------
// Make non-key-frame for last Capture
//<<<<<<< HEAD
last_frame_ptr_ = FrameBase::createNonKeyFrame<FrameBase>(origin_ts,
getStateStructure(),
_origin_frame->getState());
//=======
// auto new_frame_ptr = getProblem()->emplaceFrame(NON_ESTIMATED,
// origin_ts,
// getProblem()->getFrameStructure(),
// _origin_frame->getState());
//>>>>>>> devel
// emplace (emtpy) last Capture
last_ptr_ = emplaceCapture(last_frame_ptr_,
......@@ -801,20 +794,17 @@ void ProcessorMotion::reintegrateBuffer(CaptureMotionPtr _capture_ptr)
CaptureMotionPtr ProcessorMotion::findCaptureContainingTimeStamp(const TimeStamp& _ts) const
{
//<<<<<<< HEAD
assert(_ts.ok());
// First check if last_ptr is the one we are looking for
if (last_ptr_->containsTimeStamp(_ts, this->params_->time_tolerance))
// if (fabs(last_ptr_->getTimeStamp() - _ts) <= this->params_->time_tolerance)
return last_ptr_;
// Then look in the Wolf tree...
// -----------------------------
//
//=======
assert(_ts.ok());
//>>>>>>> devel
// We need to search in previous keyframes for the capture containing a motion buffer with the queried time stamp
// Note: since the buffer goes from a KF in the past until the next KF, we need to:
// 1. See that the KF contains a CaptureMotion
......
......@@ -81,17 +81,10 @@ void ProcessorTracker::processCapture(CaptureBasePtr _incoming_ptr)
{
WOLF_DEBUG( "PT ", getName(), " FIRST_TIME_WITHOUT_PACK" );
//<<<<<<< HEAD
FrameBasePtr kfrm = FrameBase::emplaceKeyFrame<FrameBase>(getProblem()->getTrajectory(),
incoming_ptr_->getTimeStamp(),
getStateStructure(),
getProblem()->getState(getStateStructure()));
//=======
// FrameBasePtr kfrm = getProblem()->emplaceFrame(KEY,
// incoming_ptr_->getTimeStamp());//,
// //getStateStructure(),
// //getProblem()->getState(getStateStructure()));
//>>>>>>> devel
incoming_ptr_->link(kfrm);
// Process info
......@@ -210,16 +203,9 @@ void ProcessorTracker::processCapture(CaptureBasePtr _incoming_ptr)
resetDerived();
// make F; append incoming to new F
//<<<<<<< HEAD
FrameBasePtr frm = FrameBase::createNonKeyFrame<FrameBase>(incoming_ptr_->getTimeStamp(),
getProblem()->getFrameStructure(),
// getProblem()->getDim(),
last_ptr_->getFrame()->getState());
//=======
// FrameBasePtr frm = getProblem()->emplaceFrame(NON_ESTIMATED,
// incoming_ptr_->getTimeStamp(),
// last_ptr_->getFrame()->getState());
//>>>>>>> devel
incoming_ptr_->link(frm);
origin_ptr_ = last_ptr_;
last_ptr_ = incoming_ptr_;
......@@ -266,16 +252,9 @@ void ProcessorTracker::processCapture(CaptureBasePtr _incoming_ptr)
advanceDerived();
// Replace last frame for a new one in incoming
//<<<<<<< HEAD
FrameBasePtr frm = FrameBase::createNonKeyFrame<FrameBase>(incoming_ptr_->getTimeStamp(),
getProblem()->getFrameStructure(),
// getProblem()->getDim(),
last_ptr_->getFrame()->getState());
//=======
// FrameBasePtr frm = getProblem()->emplaceFrame(NON_ESTIMATED,
// incoming_ptr_->getTimeStamp(),
// last_ptr_->getFrame()->getState());
//>>>>>>> devel
incoming_ptr_->link(frm);
last_ptr_->getFrame()->remove(); // implicitly calling last_ptr_->remove();
......
......@@ -159,29 +159,14 @@ class FactorDiffDriveTest : public testing::Test
processor = std::static_pointer_cast<ProcessorDiffDrivePublic>(prc);
// frames
//<<<<<<< HEAD
// F0 = FrameBase::emplaceKeyFrame<FrameBase>(trajectory,
// 0.0,
// "PO",
// 2,
// Vector3d(0,0,0));
// F1 = FrameBase::emplaceKeyFrame<FrameBase>(trajectory,
// 1.0,
// "PO",
// 2,
// Vector3d(1,0,0));
//=======
F0 = FrameBase::emplaceKeyFrame<FrameBase>(trajectory,
// KEY,
0.0,
"PO",
std::list<VectorXd>{Vector2d(0,0), Vector1d(0)});
F1 = FrameBase::emplaceKeyFrame<FrameBase>(trajectory,
// KEY,
1.0,
"PO",
std::list<VectorXd>{Vector2d(1,0), Vector1d(0)});
//>>>>>>> devel
// captures
C0 = CaptureBase::emplace<CaptureDiffDrive>(F0,
......
......@@ -130,15 +130,8 @@ TEST_F(HasStateBlocksTest, Add_solve_notify_solve_add)
ASSERT_FALSE(problem->getStateBlockNotification(sbp0, n));
//<<<<<<< HEAD
// // F0->link(problem->getTrajectory());
// F0->addStateBlock("V", sbv0);
// F0->setKey(problem);
//=======
// F0->link(problem->getTrajectory());
F0->addStateBlock('V', sbv0);
F0->setKey(problem);
//>>>>>>> devel
ASSERT_TRUE(problem->getStateBlockNotification(sbv0, n));
ASSERT_EQ(n, ADD);
......@@ -219,9 +212,6 @@ TEST_F(HasStateBlocksTest, getState_structure)
ASSERT_FALSE(state0.count('V'));
ASSERT_FALSE(state0.count('W'));
}
......
......@@ -50,11 +50,6 @@ class ProcessorMotion_test : public testing::Test{
Vector2d data;
Matrix2d data_cov;
// ProcessorMotion_test() :
// ProcessorOdom2d(std::make_shared<ProcessorParamsOdom2d>()),
// dt(0)
// { }
void SetUp() override
{
std::string wolf_root = _WOLF_ROOT_DIR;
......@@ -146,8 +141,7 @@ TEST_F(ProcessorMotion_test, getState_time_structure)
capture->setTimeStamp(t);
capture->setData(data);
capture->setDataCovariance(data_cov);
// capture->process();
processor->captureCallback(capture);
capture->process();
WOLF_DEBUG("t: ", t, " x: ", problem->getState().vector("PO").transpose());
}
......
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