36 #include <QApplication> 50 "rtabmap-wifi_mapping [options]\n" 52 " -i \"name\" Wifi interface name (e.g. \"eth0\"). Only required on Linux.\n" 53 " -m Enable mirroring of the camera image.\n" 54 " -d # Driver number to use: 0=OpenNI-PCL, 1=OpenNI2, 2=Freenect, 3=OpenNI-CV, 4=OpenNI-CV-ASUS, 5=Freenect2, 6=ZED SDK, 7=RealSense, 8=RealSense2 9=Kinect for Azure SDK 10=MYNT EYE S\n\n");
68 std::string interfaceName =
"wlan0";
70 bool mirroring =
false;
73 for(
int i = 1; i<argc; ++i)
75 if(strcmp(argv[i],
"-i") == 0)
80 interfaceName = argv[i];
88 if(strcmp(argv[i],
"-m") == 0)
93 if(strcmp(argv[i],
"-d") == 0)
98 driver = atoi(argv[i]);
99 if(driver < 0 || driver > 8)
101 UERROR(
"driver should be between 0 and 8.");
112 UERROR(
"Option \"%s\" not recognized!", argv[i]);
122 Transform opticalRotation(0,0,1,0, -1,0,0,0, 0,-1,0,0);
127 UERROR(
"Not built with OpenNI2 support...");
136 UERROR(
"Not built with Freenect support...");
145 UERROR(
"Not built with OpenNI from OpenCV support...");
154 UERROR(
"Not built with OpenNI from OpenCV support...");
159 else if (driver == 5)
163 UERROR(
"Not built with Freenect2 support...");
168 else if (driver == 6)
172 UERROR(
"Not built with ZED SDK support...");
175 camera =
new CameraStereoZed(0, 2, 1, 1, 100,
false, 0, opticalRotation);
177 else if (driver == 7)
181 UERROR(
"Not built with RealSense support...");
186 else if (driver == 8)
190 UERROR(
"Not built with RealSense2 support...");
195 else if (driver == 9)
199 UERROR(
"Not built with Kinect for Azure SDK support...");
204 else if (driver == 10)
208 UERROR(
"Not built with Mynt Eye S support...");
221 UERROR(
"Camera init failed! Try another camera driver.");
233 QApplication
app(argc, argv);
242 param.insert(
ParametersPair(Parameters::kMemRehearsalSimilarity(),
"1.0"));
243 param.insert(
ParametersPair(Parameters::kRGBDLinearUpdate(),
"0"));
244 param.insert(
ParametersPair(Parameters::kRGBDAngularUpdate(),
"0"));
245 rtabmap->
init(param);
265 rtabmapThread.
start();
267 cameraThread.
start();
270 mapBuilderWifi.show();
280 odomThread.
join(
true);
281 rtabmapThread.
join(
true);
282 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[])
void init(const ParametersMap ¶meters, const std::string &databasePath="", bool loadDatabaseParameters=false)
static void setLevel(ULogger::Level level)
virtual bool init(const std::string &calibrationFolder=".", const std::string &cameraName="")=0
static Odometry * create(const ParametersMap ¶meters=ParametersMap())
static void setType(Type type, const std::string &fileName=kDefaultLogFileName, bool append=true)
void setMirroringEnabled(bool enabled)
void registerToEventsManager()
void unregisterFromEventsManager()
void join(bool killFirst=false)