view_graph.cpp
Go to the documentation of this file.
00001 
00039 #include <bwi_mapper/topological_mapper.h>
00040 
00041 #include <opencv2/core/core.hpp>
00042 #include <opencv2/highgui/highgui.hpp>
00043 
00044 int main(int argc, char** argv) {
00045 
00046   if (argc < 3) {
00047     std::cerr << "USAGE: " << argv[0] 
00048         << " <yaml-map-file> <yaml-graph-file>" << std::endl;
00049     return -1;
00050   }
00051 
00052   bwi_mapper::TopologicalMapper mapper(argv[1]);
00053   bwi_mapper::Graph graph;
00054   nav_msgs::MapMetaData info;
00055   mapper.getMapInfo(info);
00056   bwi_mapper::readGraphFromFile(argv[2], info, graph);
00057 
00058   cv::Mat image;
00059   mapper.drawMap(image);
00060   bwi_mapper::drawGraph(image, graph);
00061 
00062   cv::namedWindow("Display window", CV_WINDOW_AUTOSIZE);
00063   cv::imshow("Display window", image);                
00064 
00065   cv::waitKey(0); // Wait for a keystroke in the window
00066   return 0;
00067 }
00068 
00069 
00070 
00071 
00072   


bwi_mapper
Author(s): Piyush Khandelwal
autogenerated on Fri Aug 28 2015 10:14:35