35 #include <QApplication> 45 "rtabmap-wifi_mapping [options]\n" 47 " -i \"name\" Wifi interface name (e.g. \"eth0\"). Only required on Linux.\n" 48 " -m Enable mirroring of the camera image.\n" 49 " -d # Driver number to use: 0=OpenNI-PCL, 1=OpenNI2, 2=Freenect, 3=OpenNI-CV, 4=OpenNI-CV-ASUS\n\n");
54 int main(
int argc,
char * argv[])
59 std::string interfaceName =
"wlan0";
61 bool mirroring =
false;
64 for(
int i = 1; i<argc; ++i)
66 if(strcmp(argv[i],
"-i") == 0)
71 interfaceName = argv[i];
79 if(strcmp(argv[i],
"-m") == 0)
84 if(strcmp(argv[i],
"-d") == 0)
89 driver = atoi(argv[i]);
90 if(driver < 0 || driver > 4)
92 UERROR(
"driver should be between 0 and 4.");
103 UERROR(
"Option \"%s\" not recognized!", argv[i]);
113 Transform opticalRotation(0,0,1,0, -1,0,0,0, 0,-1,0,0);
118 UERROR(
"Not built with OpenNI2 support...");
127 UERROR(
"Not built with Freenect support...");
136 UERROR(
"Not built with OpenNI from OpenCV support...");
145 UERROR(
"Not built with OpenNI from OpenCV support...");
158 UERROR(
"Camera init failed! Try another camera driver.");
170 QApplication
app(argc, argv);
179 param.insert(
ParametersPair(Parameters::kMemRehearsalSimilarity(),
"1.0"));
180 rtabmap->
init(param);
200 rtabmapThread.
start();
202 cameraThread.
start();
205 mapBuilderWifi.show();
215 odomThread.
join(
true);
216 rtabmapThread.
join(
true);
217 wifiThread.
join(
true);
static void createPipe(const UEventsSender *sender, const UEventsHandler *receiver, const std::string &eventName)
std::pair< std::string, std::string > ParametersPair
std::map< std::string, std::string > ParametersMap
int main(int argc, char *argv[])
static void setLevel(ULogger::Level level)
static rtabmap::Transform opticalRotation(1.0f, 0.0f, 0.0f, 0.0f, 0.0f,-1.0f, 0.0f, 0.0f, 0.0f, 0.0f,-1.0f, 0.0f)
virtual bool init(const std::string &calibrationFolder=".", const std::string &cameraName="")=0
static void setType(Type type, const std::string &fileName=kDefaultLogFileName, bool append=true)
void init(const ParametersMap ¶meters, const std::string &databasePath="")
void setMirroringEnabled(bool enabled)
void registerToEventsManager()
void unregisterFromEventsManager()
void join(bool killFirst=false)