|
robotoc
robotoc - efficient ROBOT Optimal Control solvers
|
Base class of components of cost function. More...
#include <cost_function_component_base.hpp>


Public Member Functions | |
| CostFunctionComponentBase () | |
| Default constructor. More... | |
| virtual | ~CostFunctionComponentBase () |
| Destructor. More... | |
| CostFunctionComponentBase (const CostFunctionComponentBase &)=default | |
| Default copy constructor. More... | |
| CostFunctionComponentBase & | operator= (const CostFunctionComponentBase &)=default |
| Default copy operator. More... | |
| CostFunctionComponentBase (CostFunctionComponentBase &&) noexcept=default | |
| Default move constructor. More... | |
| CostFunctionComponentBase & | operator= (CostFunctionComponentBase &&) noexcept=default |
| Default move assign operator. More... | |
| virtual double | evalStageCost (Robot &robot, const ContactStatus &contact_status, CostFunctionData &data, const GridInfo &grid_info, const SplitSolution &s) const =0 |
| Computes the stage cost. More... | |
| virtual void | evalStageCostDerivatives (Robot &robot, const ContactStatus &contact_status, CostFunctionData &data, const GridInfo &grid_info, const SplitSolution &s, SplitKKTResidual &kkt_residual) const =0 |
| Computes the first-order partial derivatives of the stage cost. This function is always called just after evalStageCost(). More... | |
| virtual void | evalStageCostHessian (Robot &robot, const ContactStatus &contact_status, CostFunctionData &data, const GridInfo &grid_info, const SplitSolution &s, SplitKKTMatrix &kkt_matrix) const =0 |
| Computes the Hessian, i.e., the second-order partial derivatives of the stage cost. This function is always called just after evalStageCostDerivatives(). More... | |
| virtual double | evalTerminalCost (Robot &robot, CostFunctionData &data, const GridInfo &grid_info, const SplitSolution &s) const =0 |
| Computes the terminal cost. More... | |
| virtual void | evalTerminalCostDerivatives (Robot &robot, CostFunctionData &data, const GridInfo &grid_info, const SplitSolution &s, SplitKKTResidual &kkt_residual) const =0 |
| Computes the first-order partial derivatives of the terminal cost. This function is always called just after evalTerminalCost(). More... | |
| virtual void | evalTerminalCostHessian (Robot &robot, CostFunctionData &data, const GridInfo &grid_info, const SplitSolution &s, SplitKKTMatrix &kkt_matrix) const =0 |
| Computes the Hessian, i.e., the second-order partial derivatives of the teminal cost. This function is always called just after evalTerminalCostDerivatives(). More... | |
| virtual double | evalImpactCost (Robot &robot, const ImpactStatus &impact_status, CostFunctionData &data, const GridInfo &grid_info, const SplitSolution &s) const =0 |
| Computes the impact cost. More... | |
| virtual void | evalImpactCostDerivatives (Robot &robot, const ImpactStatus &impact_status, CostFunctionData &data, const GridInfo &grid_info, const SplitSolution &s, SplitKKTResidual &kkt_residual) const =0 |
| Computes the first-order partial derivatives of the impact cost. This function is always called just after evalImpactCost(). More... | |
| virtual void | evalImpactCostHessian (Robot &robot, const ImpactStatus &impact_status, CostFunctionData &data, const GridInfo &grid_info, const SplitSolution &s, SplitKKTMatrix &kkt_matrix) const =0 |
| Computes the Hessian, i.e., the second-order partial derivatives of the impact cost. This function is always called just after evalImpactCostDerivatives(). More... | |
| template<typename Derived > | |
| std::shared_ptr< Derived > | as_shared_ptr () |
| Gets the shared ptr of this object as the specified type. If this fails in dynamic casting, throws an exception. More... | |
Base class of components of cost function.
|
inline |
Default constructor.
|
inlinevirtual |
Destructor.
|
default |
Default copy constructor.
|
defaultnoexcept |
Default move constructor.
|
inline |
Gets the shared ptr of this object as the specified type. If this fails in dynamic casting, throws an exception.
| Derived | The derived type. |
|
pure virtual |
Computes the impact cost.
| [in] | robot | Robot model. |
| [in] | impact_status | Impact status. |
| [in] | data | Cost function data. |
| [in] | grid_info | Grid info. |
| [in] | s | Split solution. |
Implemented in robotoc::CoMCost, robotoc::ConfigurationSpaceCost, robotoc::LocalContactForceCost, robotoc::TaskSpace3DCost, and robotoc::TaskSpace6DCost.
|
pure virtual |
Computes the first-order partial derivatives of the impact cost. This function is always called just after evalImpactCost().
| [in] | robot | Robot model. |
| [in] | impact_status | Impact status. |
| [in] | data | Cost function data. |
| [in] | grid_info | Grid info. |
| [in] | s | Split solution. |
| [in,out] | kkt_residual | Split KKT residual. The partial derivatives are added to this object. |
Implemented in robotoc::CoMCost, robotoc::ConfigurationSpaceCost, robotoc::LocalContactForceCost, robotoc::TaskSpace3DCost, and robotoc::TaskSpace6DCost.
|
pure virtual |
Computes the Hessian, i.e., the second-order partial derivatives of the impact cost. This function is always called just after evalImpactCostDerivatives().
| [in] | robot | Robot model. |
| [in] | impact_status | Impact status. |
| [in] | data | Cost function data. |
| [in] | grid_info | Grid info. |
| [in] | s | Split solution. |
| [in,out] | kkt_matrix | Impact split KKT matrix. The Hessians are added to this object. |
Implemented in robotoc::CoMCost, robotoc::ConfigurationSpaceCost, robotoc::LocalContactForceCost, robotoc::TaskSpace3DCost, and robotoc::TaskSpace6DCost.
|
pure virtual |
Computes the stage cost.
| [in] | robot | Robot model. |
| [in] | contact_status | Contact status. |
| [in] | data | Cost function data. |
| [in] | grid_info | Grid info. |
| [in] | s | Split solution. |
Implemented in robotoc::CoMCost, robotoc::ConfigurationSpaceCost, robotoc::LocalContactForceCost, robotoc::TaskSpace3DCost, and robotoc::TaskSpace6DCost.
|
pure virtual |
Computes the first-order partial derivatives of the stage cost. This function is always called just after evalStageCost().
| [in] | robot | Robot model. |
| [in] | contact_status | Contact status. |
| [in] | data | Cost function data. |
| [in] | grid_info | Grid info. |
| [in] | s | Split solution. |
| [in,out] | kkt_residual | Split KKT residual. The partial derivatives are added to this object. |
Implemented in robotoc::CoMCost, robotoc::ConfigurationSpaceCost, robotoc::LocalContactForceCost, robotoc::TaskSpace3DCost, and robotoc::TaskSpace6DCost.
|
pure virtual |
Computes the Hessian, i.e., the second-order partial derivatives of the stage cost. This function is always called just after evalStageCostDerivatives().
| [in] | robot | Robot model. |
| [in] | contact_status | Contact status. |
| [in] | data | Cost function data. |
| [in] | grid_info | Grid info. |
| [in] | s | Split solution. |
| [in,out] | kkt_matrix | Split KKT matrix. The Hessians are added to this object. |
Implemented in robotoc::CoMCost, robotoc::ConfigurationSpaceCost, robotoc::LocalContactForceCost, robotoc::TaskSpace3DCost, and robotoc::TaskSpace6DCost.
|
pure virtual |
Computes the terminal cost.
| [in] | robot | Robot model. |
| [in] | data | Cost function data. |
| [in] | grid_info | Grid info. |
| [in] | s | Split solution. |
Implemented in robotoc::CoMCost, robotoc::ConfigurationSpaceCost, robotoc::LocalContactForceCost, robotoc::TaskSpace3DCost, and robotoc::TaskSpace6DCost.
|
pure virtual |
Computes the first-order partial derivatives of the terminal cost. This function is always called just after evalTerminalCost().
| [in] | robot | Robot model. |
| [in] | data | Cost function data. |
| [in] | grid_info | Grid info. |
| [in] | s | Split solution. |
| [in,out] | kkt_residual | Split KKT residual. The partial derivatives are added to this object. |
Implemented in robotoc::CoMCost, robotoc::ConfigurationSpaceCost, robotoc::LocalContactForceCost, robotoc::TaskSpace3DCost, and robotoc::TaskSpace6DCost.
|
pure virtual |
Computes the Hessian, i.e., the second-order partial derivatives of the teminal cost. This function is always called just after evalTerminalCostDerivatives().
| [in] | robot | Robot model. |
| [in] | data | Cost function data. |
| [in] | grid_info | Grid info. |
| [in] | s | Split solution. |
| [in,out] | kkt_matrix | Split KKT matrix. The Hessians are added to this object. |
Implemented in robotoc::CoMCost, robotoc::ConfigurationSpaceCost, robotoc::LocalContactForceCost, robotoc::TaskSpace3DCost, and robotoc::TaskSpace6DCost.
|
default |
Default copy operator.
|
defaultnoexcept |
Default move assign operator.