diff --git a/demos/hello_wolf/CMakeLists.txt b/demos/hello_wolf/CMakeLists.txt index bf223af61a3358cfc458d8360c1b07e7ab1aff01..81291a479cd3e524ba77b3676982ed0e140d965b 100644 --- a/demos/hello_wolf/CMakeLists.txt +++ b/demos/hello_wolf/CMakeLists.txt @@ -22,17 +22,17 @@ SET(HDRS_PROCESSOR ${HDRS_PROCESSOR} add_library(hellowolf SHARED ${SRCS_HELLOWOLF}) -TARGET_LINK_LIBRARIES(hellowolf ${PROJECT_NAME}) +TARGET_LINK_LIBRARIES(hellowolf ${PLUGIN_NAME}) ADD_EXECUTABLE(hello_wolf hello_wolf.cpp) -TARGET_LINK_LIBRARIES(hello_wolf ${PROJECT_NAME} hellowolf) +TARGET_LINK_LIBRARIES(hello_wolf ${PLUGIN_NAME} hellowolf) ADD_EXECUTABLE(hello_wolf_autoconf hello_wolf_autoconf.cpp) -#TARGET_LINK_LIBRARIES(hello_wolf_autoconf ${PROJECT_NAME}) -TARGET_LINK_LIBRARIES(hello_wolf_autoconf ${PROJECT_NAME} hellowolf) +#TARGET_LINK_LIBRARIES(hello_wolf_autoconf ${PLUGIN_NAME}) +TARGET_LINK_LIBRARIES(hello_wolf_autoconf ${PLUGIN_NAME} hellowolf) #add_library(sensor_odom SHARED ../src/sensor/sensor_odom_2d.cpp ../src/processor/processor_odom_2d.cpp) -#TARGET_LINK_LIBRARIES(sensor_odom ${PROJECT_NAME} hellowolf) +#TARGET_LINK_LIBRARIES(sensor_odom ${PLUGIN_NAME} hellowolf) # #add_library(range_bearing SHARED sensor_range_bearing.cpp processor_range_bearing.cpp) -#TARGET_LINK_LIBRARIES(range_bearing ${PROJECT_NAME} hellowolf) +#TARGET_LINK_LIBRARIES(range_bearing ${PLUGIN_NAME} hellowolf) diff --git a/demos/hello_wolf/hello_wolf.cpp b/demos/hello_wolf/hello_wolf.cpp index c4e50a20be489bb48163eaa198701ab020d594cb..ef4f173494fbb602b2042088b065f45bf28ae43b 100644 --- a/demos/hello_wolf/hello_wolf.cpp +++ b/demos/hello_wolf/hello_wolf.cpp @@ -105,7 +105,7 @@ int main() // Wolf problem and solver ProblemPtr problem = Problem::create("PO", 2); SolverCeresPtr ceres = std::make_shared<SolverCeres>(problem); - ceres.getSolverOptions().max_num_iterations = 1000; // We depart far from solution, need a lot of iterations + ceres->getSolverOptions().max_num_iterations = 1000; // We depart far from solution, need a lot of iterations // sensor odometer 2d ParamsSensorOdom2dPtr intrinsics_odo = std::make_shared<ParamsSensorOdom2d>(); diff --git a/demos/hello_wolf/hello_wolf_autoconf.cpp b/demos/hello_wolf/hello_wolf_autoconf.cpp index cf5f946b3916707d20547080f4e02070785b9ec8..e975bb30fa55bb3cb39026a4377f7f4e62b2e58b 100644 --- a/demos/hello_wolf/hello_wolf_autoconf.cpp +++ b/demos/hello_wolf/hello_wolf_autoconf.cpp @@ -7,7 +7,8 @@ // wolf core includes -#include "../../include/core/ceres_wrapper/solver_ceres.h" +#include "core/ceres_wrapper/solver_ceres.h" +#include "core/solver/factory_solver.h" #include "core/common/wolf.h" #include "core/capture/capture_odom_2d.h" #include "core/processor/processor_motion.h" @@ -110,9 +111,10 @@ int main() problem->print(4,0,1,0); // Solver. Configure a Ceres solver - ceres::Solver::Options options; - options.max_num_iterations = 1000; // We depart far from solution, need a lot of iterations - SolverCeresPtr ceres = std::make_shared<SolverCeres>(problem, options); + // ceres::Solver::Options options; + // options.max_num_iterations = 1000; // We depart far from solution, need a lot of iterations + // SolverCeresPtr ceres = std::make_shared<SolverCeres>(problem, options); + SolverManagerPtr ceres = FactorySolver::create("SolverCeres", problem, server); // recover sensor pointers and other stuff for later use (access by sensor name) SensorBasePtr sensor_odo = problem->getSensor("sen odom"); diff --git a/demos/hello_wolf/yaml/hello_wolf_config.yaml b/demos/hello_wolf/yaml/hello_wolf_config.yaml index f2e4f8db31f97ef8059b4d59483a747456e6d19c..a7d674d13d929cdcd260c571d9c12cde02e67658 100644 --- a/demos/hello_wolf/yaml/hello_wolf_config.yaml +++ b/demos/hello_wolf/yaml/hello_wolf_config.yaml @@ -1,7 +1,6 @@ config: problem: - tree_manager: type: "TreeManagerSlidingWindow" n_key_frames: -1 @@ -20,7 +19,12 @@ config: P: [0.31, 0.31] O: [0.31] time_tolerance: 0.1 - + + solver: + max_num_iterations: 100 + verbose: 0 + period: 0.2 + update_immediately: false sensors: - type: "SensorOdom2d"