Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correctly parse optimizer params for base optimizer in gnc #1085

Merged
merged 2 commits into from
Feb 19, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions gtsam/nonlinear/GncOptimizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ class GTSAM_EXPORT GncOptimizer {
/// Compute optimal solution using graduated non-convexity.
Values optimize() {
NonlinearFactorGraph graph_initial = this->makeWeightedGraph(weights_);
BaseOptimizer baseOptimizer(graph_initial, state_);
BaseOptimizer baseOptimizer(
graph_initial, state_, params_.baseOptimizerParams);
Values result = baseOptimizer.optimize();
double mu = initializeMu();
double prev_cost = graph_initial.error(result);
Expand Down Expand Up @@ -227,7 +228,8 @@ class GTSAM_EXPORT GncOptimizer {

// variable/values update
NonlinearFactorGraph graph_iter = this->makeWeightedGraph(weights_);
BaseOptimizer baseOptimizer_iter(graph_iter, state_);
BaseOptimizer baseOptimizer_iter(
graph_iter, state_, params_.baseOptimizerParams);
result = baseOptimizer_iter.optimize();

// stopping condition
Expand Down