Skip to content
Snippets Groups Projects
Commit 4457f124 authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Merge branch '14-adapt-to-std-set-and-std-map-instead-of-std-list-in-wolf-nodes' into devel

parents a3bc4429 1bee20aa
No related branches found
No related tags found
3 merge requests!30Release after RAL,!29After 2nd RAL submission,!20WIP: Resolve "Adapt to std::set and std::map instead of std::list in wolf nodes"
......@@ -141,11 +141,11 @@ FrameBasePtrList ProcessorCloseloopIcp::selectCandidates(FrameBasePtr _keyframe_
{
FrameBasePtrList candidates;
int key_frames_counter = 0;
const auto &frames = this->getProblem()->getTrajectory()->getFrameList();
const auto &trajectory = getProblem()->getTrajectory();
//Consider only key_frames from 1 to n - match_past_key_frame_
// std::copy_if(frames.begin(), frames.end(), std::back_inserter(candidates), [&](FrameBasePtr _frame) { if(_frame->isKey()) {key_frames_counter++; return (key_frames_counter % match_past_key_frame_ == 0);
// }else{ return false;};});
for(auto it=frames.rbegin(); it != frames.rend(); it++){
for(auto it=trajectory->rbegin(); it != trajectory->rend(); it++){
if((*it)->isKey()){
// WOLF_DEBUG("TIMESTAMP KEY FRAME ", (*it)->id(), " ", (*it)->getTimeStamp());
key_frames_counter++;
......
......@@ -125,7 +125,8 @@ TEST_F(ProcessorOdomIcp_Test, full)
CaptureLaser2dPtr scan = std::make_shared<CaptureLaser2d>(t, lidar, ranges);
scan->process();
F = problem->getLastFrame();
// F = problem->getLastFrame();
F = processor->getLast()->getFrame();
ASSERT_MATRIX_APPROX(F->getState().vector("PO"), x0.vector("PO"), 1e-6);
......@@ -158,7 +159,7 @@ TEST_F(ProcessorOdomIcp_Test, solve)
t += 1.0;
}
for (auto F : problem->getTrajectory()->getFrameList())
for (auto F : *problem->getTrajectory())
{
if (F->isKey())
F->perturb(0.5);
......@@ -167,7 +168,7 @@ TEST_F(ProcessorOdomIcp_Test, solve)
std::string report = solver->solve(SolverManager::ReportVerbosity::BRIEF);
WOLF_TRACE(report);
for (auto F : problem->getTrajectory()->getFrameList())
for (auto F : *problem->getTrajectory())
{
if (F->isKey())
{
......
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