borglab / GTDynamics

Full kinodynamics constraints for arbitrary robot configurations with factor graphs.
BSD 2-Clause "Simplified" License
39 stars 10 forks source link

Convert Optimizer Arguments from shared pointers to objects #323

Closed varunagrawal closed 2 years ago

varunagrawal commented 2 years ago

This fixes #320

This PR proposes to swap Optimizer(const boost::shared_ptr<const OptimizerParams>& params) with the simpler Optimizer(const OptimizerParams& params). Currently we make use of shared pointers for optimizer parameters which seems unnecessarily verbose since we don't expect to have more than a handful of optimizers running. By using const references, we avoid the need to call make_shared at various places and improve the overall readability of the code.

Other benefits include being able to get quick auto-complete with the dot notation, simpler wrapping, and one less dependency on Boost.

dellaert commented 2 years ago

Did you do a design review with Yetong? Does your PR comment give context and rationale for the change? ;-)

varunagrawal commented 2 years ago

I was hoping this could serve as a design review. Yetong is more than welcome to shred this PR to pieces. :smile: I'll update the PR description though.