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

adapted to simplified solver options

parent 19de27db
No related branches found
No related tags found
1 merge request!448Draft: Resolve "Implementation of new nodes creation"
Pipeline #19003 failed
...@@ -118,7 +118,7 @@ int main() ...@@ -118,7 +118,7 @@ int main()
params_solver["parameter_tolerance"] = 1e-8; params_solver["parameter_tolerance"] = 1e-8;
params_solver["function_tolerance"] = 1e-8; params_solver["function_tolerance"] = 1e-8;
params_solver["gradient_tolerance"] = 1e-9; params_solver["gradient_tolerance"] = 1e-9;
params_solver["minimizer"] = "LEVENBERG_MARQUARDT"; params_solver["minimizer"] = "levenberg_marquardt";
params_solver["use_nonmonotonic_steps"] = false; params_solver["use_nonmonotonic_steps"] = false;
params_solver["compute_cov"] = false; params_solver["compute_cov"] = false;
SolverCeresPtr ceres = std::static_pointer_cast<SolverCeres>(SolverCeres::create(problem, params_solver)); SolverCeresPtr ceres = std::static_pointer_cast<SolverCeres>(SolverCeres::create(problem, params_solver));
......
...@@ -27,8 +27,8 @@ solver: ...@@ -27,8 +27,8 @@ solver:
interrupt_on_problem_change: false interrupt_on_problem_change: false
n_threads: 2 n_threads: 2
compute_cov: false compute_cov: false
minimizer: LEVENBERG_MARQUARDT minimizer: levenberg_marquardt
use_nonmonotonic_steps: false # only for LEVENBERG_MARQUARDT and DOGLEG use_nonmonotonic_steps: false # only for levenberg_marquardt and DOGLEG
parameter_tolerance: 1e-6 parameter_tolerance: 1e-6
function_tolerance: 1e-6 function_tolerance: 1e-6
gradient_tolerance: 1e-10 gradient_tolerance: 1e-10
......
...@@ -5,8 +5,8 @@ max_num_iterations: 1000 ...@@ -5,8 +5,8 @@ max_num_iterations: 1000
n_threads: 2 n_threads: 2
function_tolerance: 0.000001 function_tolerance: 0.000001
gradient_tolerance: 0.0000000001 gradient_tolerance: 0.0000000001
minimizer: "LEVENBERG_MARQUARDT" minimizer: "levenberg_marquardt"
use_nonmonotonic_steps: false # only for LEVENBERG_MARQUARDT and DOGLEG use_nonmonotonic_steps: false # only for levenberg_marquardt and DOGLEG
max_consecutive_nonmonotonic_steps: 5 # only if use_nonmonotonic_steps = true max_consecutive_nonmonotonic_steps: 5 # only if use_nonmonotonic_steps = true
compute_cov: true compute_cov: true
cov_period: 1 #only if compute_cov cov_period: 1 #only if compute_cov
......
...@@ -47,10 +47,10 @@ use_nonmonotonic_steps: ...@@ -47,10 +47,10 @@ use_nonmonotonic_steps:
_mandatory: false _mandatory: false
_type: bool _type: bool
_default: false _default: false
_doc: If the solver is allowed to update the solution with non-monotonic steps. Only used in LEVENBERG_MARQUARDT and DOGLEG minimizers. _doc: If the solver is allowed to update the solution with non-monotonic steps. Only used in 'levenberg_marquardt' and 'dogleg' minimizers.
max_consecutive_nonmonotonic_steps: max_consecutive_nonmonotonic_steps:
_mandatory: false _mandatory: false
_type: unsigned int _type: unsigned int
_default: 2 _default: 2
_doc: Amount of consecutive non-monotonic steps allowed. Only used in LEVENBERG_MARQUARDT and DOGLEG minimizers. _doc: Amount of consecutive non-monotonic steps allowed. Only used in 'levenberg_marquardt' and 'dogleg' minimizers.
\ No newline at end of file \ No newline at end of file
...@@ -82,6 +82,9 @@ SolverManagerPtr SolverManager::autoSetup(const ProblemPtr& _problem, ...@@ -82,6 +82,9 @@ SolverManagerPtr SolverManager::autoSetup(const ProblemPtr& _problem,
// Create YAML server // Create YAML server
yaml_schema_cpp::YamlServer server = yaml_schema_cpp::YamlServer(_schema_folders); yaml_schema_cpp::YamlServer server = yaml_schema_cpp::YamlServer(_schema_folders);
server.setYaml(_param_node); server.setYaml(_param_node);
// Add the already loaded plugins' installed schema folders after optional input folders
server.addFolderSchema(FolderRegistry::getRegisteredFolders());
// Validate against TypeAndPlugin (check if it has 'type' and 'plugin') // Validate against TypeAndPlugin (check if it has 'type' and 'plugin')
if (not server.applySchema("TypeAndPlugin")) if (not server.applySchema("TypeAndPlugin"))
......
...@@ -11,5 +11,5 @@ parameter_tolerance: 0.0 # DOC Parameter tolerance. Convergence criterion. Typi ...@@ -11,5 +11,5 @@ parameter_tolerance: 0.0 # DOC Parameter tolerance. Convergence criterion. Typi
function_tolerance: 0.0 # DOC Function tolerance. Convergence criterion. Typical value: 1e-8 (see: http://ceres-solver.org/nnls_solving.html) - TYPE double function_tolerance: 0.0 # DOC Function tolerance. Convergence criterion. Typical value: 1e-8 (see: http://ceres-solver.org/nnls_solving.html) - TYPE double
gradient_tolerance: 0.0 # DOC Gradient tolerance. Convergence criterion. Typical value: 1e-8 (see: http://ceres-solver.org/nnls_solving.html) - TYPE double gradient_tolerance: 0.0 # DOC Gradient tolerance. Convergence criterion. Typical value: 1e-8 (see: http://ceres-solver.org/nnls_solving.html) - TYPE double
n_threads: 1 # DOC Amount of threads used by ceres. - TYPE unsigned int - OPTIONS [1, 2, 3, 4] n_threads: 1 # DOC Amount of threads used by ceres. - TYPE unsigned int - OPTIONS [1, 2, 3, 4]
use_nonmonotonic_steps: false # OPTIONAL - DOC If the solver is allowed to update the solution with non-monotonic steps. Only used in LEVENBERG_MARQUARDT and DOGLEG minimizers. - TYPE bool use_nonmonotonic_steps: false # OPTIONAL - DOC If the solver is allowed to update the solution with non-monotonic steps. Only used in 'levenberg_marquardt' and 'dogleg' minimizers. - TYPE bool
max_consecutive_nonmonotonic_steps: 2 # OPTIONAL - DOC Amount of consecutive non-monotonic steps allowed. Only used in LEVENBERG_MARQUARDT and DOGLEG minimizers. - TYPE unsigned int max_consecutive_nonmonotonic_steps: 2 # OPTIONAL - DOC Amount of consecutive non-monotonic steps allowed. Only used in 'levenberg_marquardt' and 'dogleg' minimizers. - TYPE unsigned int
\ No newline at end of file \ No newline at end of file
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