Closed edantec closed 1 month ago
Instead of just a shortcut for getting a CostStack from the StageModel, we can do the same as in the previous PR, i.e.
// in StageModelTpl
template<typename U> U* getCost() { return dynamic_cast<U*>(&*this->cost_); }
Following the implementation of dynamic cast for components and residuals, Aligator should manage the templated cast of abstract classes for CostStack, all Integrators and all Dynamics. We should have a function getCostStack() in TrajOptProblem, getIntegrator() in integrator abstract class, and getDynamics() in dynamics abstract class.