36 #include <QApplication> 46 "rtabmap-wifi_mapping [options]\n" 48 " -i \"name\" Wifi interface name (e.g. \"eth0\"). Only required on Linux.\n" 49 " -m Enable mirroring of the camera image.\n" 50 " -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");
60 std::string interfaceName =
"wlan0";
62 bool mirroring =
false;
65 for(
int i = 1; i<argc; ++i)
67 if(strcmp(argv[i],
"-i") == 0)
72 interfaceName = argv[i];
80 if(strcmp(argv[i],
"-m") == 0)
85 if(strcmp(argv[i],
"-d") == 0)
90 driver = atoi(argv[i]);
91 if(driver < 0 || driver > 8)
93 UERROR(
"driver should be between 0 and 8.");
104 UERROR(
"Option \"%s\" not recognized!", argv[i]);
114 Transform opticalRotation(0,0,1,0, -1,0,0,0, 0,-1,0,0);
119 UERROR(
"Not built with OpenNI2 support...");
128 UERROR(
"Not built with Freenect support...");
137 UERROR(
"Not built with OpenNI from OpenCV support...");
146 UERROR(
"Not built with OpenNI from OpenCV support...");
151 else if (driver == 5)
155 UERROR(
"Not built with Freenect2 support...");
160 else if (driver == 6)
164 UERROR(
"Not built with ZED SDK support...");
167 camera =
new CameraStereoZed(0, 2, 1, 1, 100,
false, 0, opticalRotation);
169 else if (driver == 7)
173 UERROR(
"Not built with RealSense support...");
178 else if (driver == 8)
182 UERROR(
"Not built with RealSense2 support...");
187 else if (driver == 9)
191 UERROR(
"Not built with Kinect for Azure SDK support...");
196 else if (driver == 10)
200 UERROR(
"Not built with Mynt Eye S support...");
213 UERROR(
"Camera init failed! Try another camera driver.");
225 QApplication
app(argc, argv);
234 param.insert(
ParametersPair(Parameters::kMemRehearsalSimilarity(),
"1.0"));
235 param.insert(
ParametersPair(Parameters::kRGBDLinearUpdate(),
"0"));
236 param.insert(
ParametersPair(Parameters::kRGBDAngularUpdate(),
"0"));
237 rtabmap->
init(param);
257 rtabmapThread.
start();
259 cameraThread.
start();
262 mapBuilderWifi.show();
272 odomThread.
join(
true);
273 rtabmapThread.
join(
true);
274 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)