Skip to content
Snippets Groups Projects
Commit 00abe629 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

demos adapted to SolverCeres

parent 3e2db0ba
No related branches found
No related tags found
2 merge requests!39release after RAL,!38After 2nd RAL submission
......@@ -31,11 +31,10 @@ int main(int argc, char** argv)
wolf_problem_ptr_->installProcessor("IMU", "IMU pre-integrator", "Main IMU", "");
// Ceres wrappers
ceres::Solver::Options ceres_options;
ceres_options.minimizer_type = ceres::TRUST_REGION; //ceres::TRUST_REGION;ceres::LINE_SEARCH
ceres_options.max_line_search_step_contraction = 1e-3;
ceres_options.max_num_iterations = 1e4;
SolverCeres* ceres_manager_wolf_diff = new SolverCeres(wolf_problem_ptr_, ceres_options, true);
SolverCeres* ceres_manager_wolf_diff = new SolverCeres(wolf_problem_ptr_);
ceres_manager_wolf_diff->getSolverOptions().minimizer_type = ceres::TRUST_REGION; //ceres::TRUST_REGION;ceres::LINE_SEARCH
ceres_manager_wolf_diff->getSolverOptions().max_line_search_step_contraction = 1e-3;
ceres_manager_wolf_diff->getSolverOptions().max_num_iterations = 1e4;
// Time and data variables
TimeStamp t;
......
......@@ -74,11 +74,10 @@ int main(int argc, char** argv)
TimeStamp t(0);
// CERES WRAPPER
ceres::Solver::Options ceres_options;
ceres_options.minimizer_type = ceres::TRUST_REGION; //ceres::TRUST_REGION;ceres::LINE_SEARCH
ceres_options.max_line_search_step_contraction = 1e-3;
ceres_options.max_num_iterations = 1e4;
SolverCeres* ceres_manager_wolf_diff = new SolverCeres(wolf_problem_ptr_, ceres_options);
SolverCeres* ceres_manager_wolf_diff = new SolverCeres(wolf_problem_ptr_);
ceres_manager_wolf_diff->getSolverOptions().minimizer_type = ceres::TRUST_REGION; //ceres::TRUST_REGION;ceres::LINE_SEARCH
ceres_manager_wolf_diff->getSolverOptions().max_line_search_step_contraction = 1e-3;
ceres_manager_wolf_diff->getSolverOptions().max_num_iterations = 1e4;
// SENSOR + PROCESSOR IMU
SensorBasePtr sen0_ptr = wolf_problem_ptr_->installSensor("IMU", "Main IMU", (Vector7d()<<0,0,0,0,0,0,1).finished(), wolf_root + "/src/examples/sensor_imu.yaml");
......
......@@ -95,11 +95,10 @@ int main(int argc, char** argv)
imu_data_input >> origin_bias[0] >> origin_bias[1] >> origin_bias[2] >> origin_bias[3] >> origin_bias[4] >> origin_bias[5];
// CERES WRAPPER
ceres::Solver::Options ceres_options;
ceres_options.minimizer_type = ceres::TRUST_REGION; //ceres::TRUST_REGION;ceres::LINE_SEARCH
ceres_options.max_line_search_step_contraction = 1e-3;
ceres_options.max_num_iterations = 1e4;
SolverCeres* ceres_manager_wolf_diff = new SolverCeres(wolf_problem_ptr_, ceres_options);
SolverCeres* ceres_manager_wolf_diff = new SolverCeres(wolf_problem_ptr_);
ceres_manager_wolf_diff->getSolverOptions().minimizer_type = ceres::TRUST_REGION; //ceres::TRUST_REGION;ceres::LINE_SEARCH
ceres_manager_wolf_diff->getSolverOptions().max_line_search_step_contraction = 1e-3;
ceres_manager_wolf_diff->getSolverOptions().max_num_iterations = 1e4;
// SENSOR + PROCESSOR IMU
SensorBasePtr sen0_ptr = wolf_problem_ptr_->installSensor("IMU", "Main IMU", (Vector7d()<<0,0,0,0,0,0,1).finished(), wolf_root + "/src/examples/sensor_imu.yaml");
......
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