createPointCloudModel.cpp
Go to the documentation of this file.
00001 
00033 #include "ros/ros.h"
00034 
00035 
00036 int main(int argc, char **argv)
00037 {
00038   ros::init(argc, argv, "create_pointcloud_model");
00039   ros::NodeHandle n;
00040 
00041   int retVal;
00042   std::string system_command;
00043   std::string command_create_model;
00044 
00045 
00046   if(argc < 6)
00047   {
00048     ROS_WARN("Usage: createPlanarModel <image dir> <model dir> "
00049       "<name model> <output model dir> <surf threshold>");
00050     return 1;
00051   }
00052   
00053   std::string ImageDir = argv[1];
00054   std::string ModelDir = argv[2];
00055   std::string Name = argv[3];
00056   std::string ModelOutDir = argv[4];
00057   std::string SurfThreshold = argv[5];
00058 
00059   std::string path_re_vision;
00060 
00061   FILE * find_file = popen("rospack find re_vision", "r");
00062   char command_find[1000];
00063   int numChar = fread(command_find, 1, 1000, find_file);
00064   command_find[numChar-1] = 0;
00065 
00066   path_re_vision = command_find;
00067 
00068   command_create_model = path_re_vision + "/bin"; 
00069 
00070   ROS_INFO("Ready to create pointcloud model.");
00071 
00072   system_command ="cd " + command_create_model + "; ./createModel.sh " + ImageDir + " " + ModelDir + " " + Name + " " + ModelOutDir + " " + SurfThreshold;
00073 
00074   retVal = system(system_command.c_str());
00075 
00076   return retVal;
00077 }
00078 


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:30:59