From 710d396d0b2d5fce67a2d10289dc9fd5b89bf74e Mon Sep 17 00:00:00 2001 From: Chris Beall Date: Tue, 10 Nov 2009 22:49:22 +0000 Subject: [PATCH] cleaned up a few includes to make VSLAMGraph work properly after the move into gtsam. --- cpp/Makefile.am | 2 +- cpp/VSLAMGraph.cpp | 7 +++++-- cpp/VSLAMGraph.h | 11 +++++------ 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/cpp/Makefile.am b/cpp/Makefile.am index 8542ae17e..cdb94ca36 100644 --- a/cpp/Makefile.am +++ b/cpp/Makefile.am @@ -139,7 +139,7 @@ testSimulated3D_LDADD = libgtsam.la check_PROGRAMS += testSimulated3D # Visual SLAM -sources += CalibratedCamera.cpp SimpleCamera.cpp VSLAMConfig.cpp VSLAMFactor.cpp +sources += CalibratedCamera.cpp SimpleCamera.cpp VSLAMConfig.cpp VSLAMGraph.cpp VSLAMFactor.cpp check_PROGRAMS += testCalibratedCamera testSimpleCamera testVSLAMFactor testCalibratedCamera_SOURCES = testCalibratedCamera.cpp testCalibratedCamera_LDADD = libgtsam.la diff --git a/cpp/VSLAMGraph.cpp b/cpp/VSLAMGraph.cpp index ba08f1de0..f0cd22903 100644 --- a/cpp/VSLAMGraph.cpp +++ b/cpp/VSLAMGraph.cpp @@ -9,13 +9,14 @@ #include #include -//#include "VSLAMFactor.h" #include "VSLAMGraph.h" using namespace std; -using namespace gtsam; +namespace gtsam{ /* ************************************************************************* */ +//TODO: CB: This constructor is specific to loading VO data. Should probably +// get rid of this. VSLAMGraph::VSLAMGraph(const std::string& path) { ifstream ifs(path.c_str(), ios::in); @@ -98,3 +99,5 @@ VSLAMGraph::VSLAMGraph(const std::string& path, /* ************************************************************************* */ +} // namespace gtsam + diff --git a/cpp/VSLAMGraph.h b/cpp/VSLAMGraph.h index 6779aef58..2ce58a266 100644 --- a/cpp/VSLAMGraph.h +++ b/cpp/VSLAMGraph.h @@ -5,7 +5,6 @@ * @author Carlos Nieto */ - #pragma once #include @@ -13,15 +12,13 @@ #include #include -#include -#include +#include "NonlinearFactorGraph.h" +#include "FactorGraph-inl.h" #include "VSLAMFactor.h" -#include "VSLAMFactor0.h" -#include "StereoFactor.h" #include "VSLAMConfig.h" - using namespace std; +namespace gtsam{ /** * Non-linear factor graph for visual SLAM @@ -64,3 +61,5 @@ public: int Get_nFeat_ids(){return feat_ids.size();}; feat_ids_type* Get_feat_ids_map(){return &feat_ids;}; }; + +} // namespace gtsam