Skip to content
Snippets Groups Projects
Commit 203518d3 authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Update demos to current wolf

parent 27ce5838
No related branches found
No related tags found
No related merge requests found
Pipeline #5887 passed
......@@ -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)
......@@ -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>();
......
......@@ -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");
......
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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment