MapperNode.cpp
Go to the documentation of this file.
00001 #include <ros/ros.h>
00002 
00003 #include "MultiMapper.h"
00004 
00005 #ifdef USE_G2O
00006 #include "G2oSolver.h"
00007 #else
00008 #include "SpaSolver.h"
00009 #endif
00010 
00011 int main(int argc, char **argv)
00012 {
00013         // Initialize ROS
00014         ros::init(argc, argv, "MultiMapper");
00015         ros::NodeHandle node;
00016 
00017         // Create a scan-solver
00018 #ifdef USE_G2O
00019         G2oSolver* solver = new G2oSolver();
00020 #else
00021         SpaSolver* solver = new SpaSolver();
00022 #endif
00023 
00024         // Create the MultiMapper
00025         MultiMapper* mapper = new MultiMapper();
00026         mapper->setScanSolver(solver);
00027 
00028         // Start main loop
00029         ros::Rate publishRate(10);
00030         while(ros::ok())
00031         {
00032                 mapper->publishTransform();
00033                 ros::spinOnce();
00034                 publishRate.sleep();
00035         }
00036 
00037         // Quit
00038         delete mapper;
00039         delete solver;
00040         return 0;
00041 }


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Thu Aug 27 2015 14:07:25