g2o
Loading...
Searching...
No Matches
g2o_viewer.cpp
Go to the documentation of this file.
1// g2o - General Graph Optimization
2// Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard
3//
4// This file is part of g2o.
5//
6// g2o is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// g2o is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with g2o. If not, see <http://www.gnu.org/licenses/>.
18
19#include <QApplication>
20#include <iostream>
21
26#include "run_g2o_viewer.h"
27using namespace std;
28using namespace g2o;
29
30int main(int argc, char** argv) {
32 QApplication qapp(argc, argv);
33
34 CommandArgs arg;
35#ifndef G2O_DISABLE_DYNAMIC_LOADING_OF_LIBRARIES
36 string dummy;
37 arg.param("solverlib", dummy, "",
38 "specify a solver library which will be loaded");
39 arg.param("typeslib", dummy, "",
40 "specify a types library which will be loaded");
41 // loading the standard solver / types
42 DlWrapper dlTypesWrapper;
43 loadStandardTypes(dlTypesWrapper, argc, argv);
44 // register all the solvers
45 DlWrapper dlSolverWrapper;
46 loadStandardSolver(dlSolverWrapper, argc, argv);
47#endif
48
49 // run the viewer
50 return RunG2OViewer::run(argc, argv, arg);
51}
Command line parsing of argc and argv.
void param(const std::string &name, bool &p, bool defValue, const std::string &desc)
Loading libraries during run-time.
Definition dl_wrapper.h:46
static int run(int argc, char **argv, CommandArgs &arg)
int main()
Definition gicp_demo.cpp:44
void loadStandardTypes(DlWrapper &dlTypesWrapper, int argc, char **argv)
void loadStandardSolver(DlWrapper &dlSolverWrapper, int argc, char **argv)
Definition jet.h:876