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

Remove debug code

parent 63f9ab75
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 #5453 passed
...@@ -93,7 +93,6 @@ class TrajectoryBase : public NodeBase, public std::enable_shared_from_this<Traj ...@@ -93,7 +93,6 @@ class TrajectoryBase : public NodeBase, public std::enable_shared_from_this<Traj
bool state_blocks, bool state_blocks,
std::ostream& stream = std::cout, std::ostream& stream = std::cout,
std::string _tabs = "") const; std::string _tabs = "") const;
void printDebug();
private: private:
FrameBasePtr addFrame(FrameBasePtr _frame_ptr); FrameBasePtr addFrame(FrameBasePtr _frame_ptr);
void removeFrame(FrameBasePtr _frame_ptr); void removeFrame(FrameBasePtr _frame_ptr);
......
...@@ -21,10 +21,7 @@ TrajectoryBase::~TrajectoryBase() ...@@ -21,10 +21,7 @@ TrajectoryBase::~TrajectoryBase()
FrameBasePtr TrajectoryBase::addFrame(FrameBasePtr _frame_ptr) FrameBasePtr TrajectoryBase::addFrame(FrameBasePtr _frame_ptr)
{ {
// add to list // add to list
std::cout << "Inserting " << _frame_ptr->getTimeStamp() << " " << _frame_ptr << std::endl; frame_list_.insert(std::pair<TimeStamp, FrameBasePtr>(_frame_ptr->getTimeStamp(), _frame_ptr));
auto success = frame_list_.insert(std::pair<TimeStamp, FrameBasePtr>(_frame_ptr->getTimeStamp(), _frame_ptr));
std::cout << "Sucess? " << success.second << std::endl;
printDebug();
return _frame_ptr; return _frame_ptr;
} }
...@@ -75,9 +72,4 @@ void TrajectoryBase::print(int _depth, bool _constr_by, bool _metric, bool _stat ...@@ -75,9 +72,4 @@ void TrajectoryBase::print(int _depth, bool _constr_by, bool _metric, bool _stat
F->print(_depth, _constr_by, _metric, _state_blocks, _stream, _tabs + " "); F->print(_depth, _constr_by, _metric, _state_blocks, _stream, _tabs + " ");
} }
void TrajectoryBase::printDebug()
{
for( auto it : frame_list_ )
WOLF_DEBUG("KEY ", it.first, " VALUE ", it.second);
}
} // namespace wolf } // namespace wolf
...@@ -81,7 +81,6 @@ TEST(FrameBase, LinksToTree) ...@@ -81,7 +81,6 @@ TEST(FrameBase, LinksToTree)
auto f = FeatureBase::emplace<FeatureBase>(C, "f", Vector1d(1), Matrix<double,1,1>::Identity()*.01); auto f = FeatureBase::emplace<FeatureBase>(C, "f", Vector1d(1), Matrix<double,1,1>::Identity()*.01);
auto c = FactorBase::emplace<FactorOdom2d>(f, f, F2, p, false); auto c = FactorBase::emplace<FactorOdom2d>(f, f, F2, p, false);
P->print(4,1,1,1);
//TODO: WARNING! I dropped this comprovations since the emplacing operation is now atomic. //TODO: WARNING! I dropped this comprovations since the emplacing operation is now atomic.
ASSERT_FALSE(F2->getConstrainedByList().empty()); ASSERT_FALSE(F2->getConstrainedByList().empty());
...@@ -95,8 +94,7 @@ P->print(4,1,1,1); ...@@ -95,8 +94,7 @@ P->print(4,1,1,1);
ASSERT_FALSE(F1->getCaptureList().empty()); ASSERT_FALSE(F1->getCaptureList().empty());
ASSERT_TRUE(F1->getConstrainedByList().empty()); ASSERT_TRUE(F1->getConstrainedByList().empty());
ASSERT_EQ(F1->getHits() , (unsigned int) 0); ASSERT_EQ(F1->getHits() , (unsigned int) 0);
P->print(4,1,1,1);
WOLF_INFO("F2 id", F2->id());
// F2 has no capture and one factor-by // F2 has no capture and one factor-by
ASSERT_TRUE(F2->getCaptureList().empty()); ASSERT_TRUE(F2->getCaptureList().empty());
ASSERT_FALSE(F2->getConstrainedByList().empty()); ASSERT_FALSE(F2->getConstrainedByList().empty());
......
...@@ -311,7 +311,6 @@ TEST_F(ProcessorTrackerFeatureDummyTest, process) ...@@ -311,7 +311,6 @@ TEST_F(ProcessorTrackerFeatureDummyTest, process)
//4TH TIME //4TH TIME
WOLF_INFO("Forth time..."); WOLF_INFO("Forth time...");
CaptureBasePtr cap4 = std::make_shared<CaptureVoid>(3, sensor); CaptureBasePtr cap4 = std::make_shared<CaptureVoid>(3, sensor);
problem->getTrajectory()->printDebug();
cap4->process(); cap4->process();
ASSERT_EQ(processor->getLast()->getFeatureList().size(), params->max_new_features-3); ASSERT_EQ(processor->getLast()->getFeatureList().size(), params->max_new_features-3);
......
...@@ -44,7 +44,7 @@ struct DummySolverManager : public SolverManager ...@@ -44,7 +44,7 @@ struct DummySolverManager : public SolverManager
}; };
/// Set to true if you want debug info /// Set to true if you want debug info
bool debug = true; bool debug = false;
TEST(TrajectoryBase, ClosestKeyFrame) TEST(TrajectoryBase, ClosestKeyFrame)
{ {
......
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