Fixed compile issues with examples

release/4.3a0
dellaert 2015-02-20 02:42:51 +01:00
parent 843bc7cb82
commit 7ecf8ec1ac
4 changed files with 5 additions and 5 deletions

View File

@ -32,7 +32,7 @@ using namespace std;
using namespace gtsam; using namespace gtsam;
// Make the typename short so it looks much cleaner // Make the typename short so it looks much cleaner
typedef gtsam::SmartProjectionPoseFactor<gtsam::Pose3, gtsam::Cal3_S2> SmartFactor; typedef SmartProjectionPoseFactor<Cal3_S2> SmartFactor;
/* ************************************************************************* */ /* ************************************************************************* */
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
@ -111,7 +111,7 @@ int main(int argc, char* argv[]) {
// The graph stores Factor shared_ptrs, so we cast back to a SmartFactor first // The graph stores Factor shared_ptrs, so we cast back to a SmartFactor first
SmartFactor::shared_ptr smart = boost::dynamic_pointer_cast<SmartFactor>(graph[j]); SmartFactor::shared_ptr smart = boost::dynamic_pointer_cast<SmartFactor>(graph[j]);
if (smart) { if (smart) {
// The output of point() is in boost::optional<gtsam::Point3>, as sometimes // The output of point() is in boost::optional<Point3>, as sometimes
// the triangulation operation inside smart factor will encounter degeneracy. // the triangulation operation inside smart factor will encounter degeneracy.
boost::optional<Point3> point = smart->point(result); boost::optional<Point3> point = smart->point(result);
if (point) // ignore if boost::optional return NULL if (point) // ignore if boost::optional return NULL

View File

@ -28,7 +28,7 @@ using namespace std;
using namespace gtsam; using namespace gtsam;
// Make the typename short so it looks much cleaner // Make the typename short so it looks much cleaner
typedef gtsam::SmartProjectionPoseFactor<gtsam::Pose3, gtsam::Cal3_S2> SmartFactor; typedef SmartProjectionPoseFactor<Cal3_S2> SmartFactor;
/* ************************************************************************* */ /* ************************************************************************* */
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {

View File

@ -46,7 +46,7 @@ using namespace gtsam;
int main(int argc, char** argv){ int main(int argc, char** argv){
typedef SmartProjectionPoseFactor<Pose3, Cal3_S2> SmartFactor; typedef SmartProjectionPoseFactor<Cal3_S2> SmartFactor;
Values initial_estimate; Values initial_estimate;
NonlinearFactorGraph graph; NonlinearFactorGraph graph;

View File

@ -46,7 +46,7 @@ using namespace gtsam;
int main(int argc, char** argv){ int main(int argc, char** argv){
typedef SmartStereoProjectionPoseFactor<Pose3, Point3, Cal3_S2Stereo> SmartFactor; typedef SmartStereoProjectionPoseFactor<Cal3_S2Stereo> SmartFactor;
bool output_poses = true; bool output_poses = true;
string poseOutput("../../../examples/data/optimized_poses.txt"); string poseOutput("../../../examples/data/optimized_poses.txt");