diff --git a/gtsam_unstable/examples/SmartProjectionFactorTesting.cpp b/gtsam_unstable/examples/SmartProjectionFactorTesting.cpp index 8189985ba..969a42217 100644 --- a/gtsam_unstable/examples/SmartProjectionFactorTesting.cpp +++ b/gtsam_unstable/examples/SmartProjectionFactorTesting.cpp @@ -16,6 +16,8 @@ * @author Luca Carlone */ +#ifdef DEVELOP + // Use a map to store landmark/smart factor pairs #include @@ -113,36 +115,6 @@ void writeValues(string directory_, const Values& values){ } -// Write key values to file -void writeValuesBAL(string directory_, const Values& values, std::vector vector_r, std::vector vector_l, - std::vector vector_u, std::vector vector_v, int totNumPoses, int totNumLandmarks, int totNumMeasurements){ - - string filename = directory_ + "est_BAL_poses.txt"; - ofstream fout; - fout.open(filename.c_str()); - fout.precision(20); - - fout << totNumPoses << " " << totNumLandmarks << " " << totNumMeasurements << endl; - - for(size_t i=0; i::value_type key_value, values.filter()) { - Pose3 CurrPose = key_value.value; - fout << Pose3::Logmap(CurrPose) << endl; - } - if(values.filter().size() > 0) { - // write landmarks - BOOST_FOREACH(Values::ConstFiltered::value_type key_value, values.filter()) { - fout << key_value.value.vector() << endl; - } - fout.close(); - } // end of if on landmarks - -} - void optimizeGraphLM(NonlinearFactorGraph &graph, gtsam::Values::shared_ptr graphValues, Values &result, boost::shared_ptr &ordering) { // Optimization parameters LevenbergMarquardtParams params; @@ -468,9 +440,15 @@ int main(int argc, char** argv) { cout << "===================================================" << endl; writeValues("./", result); - writeValuesBAL("./", result, vector_r, vector_l, vector_u, vector_v, totNumPoses, totNumLandmarks, totNumMeasurements); - if (debug) cout << numLandmarks << " " << numPoses << " " << optimized << endl; exit(0); } + +#endif + +int main(){ + return 1; +} + +