COPP C++ API
C++ interface for COPP trajectory optimization
Loading...
Searching...
No Matches
copp::Objective Class Reference

Owning objective descriptor used by C++ COPP solver problem objects. More...

#include <objective.hpp>

Public Member Functions

ObjectiveKind kind () const noexcept
double weight () const noexcept
Span< const double > alpha () const noexcept
Span< const double > beta () const noexcept
Span< const double > normalize () const noexcept

Static Public Member Functions

static Objective Time (double weight=1.0)
 Minimize traversal time.
static Objective Linear (double weight, Span< const double > alpha, Span< const double > beta)
 Add a linear torque objective.
static Objective Linear (double weight, std::initializer_list< double > alpha, std::initializer_list< double > beta)
static Objective ThermalEnergy (double weight, Span< const double > normalize)
 Penalize normalized squared torque / thermal energy.
static Objective ThermalEnergy (double weight, std::initializer_list< double > normalize)
static Objective TotalVariationTorque (double weight, Span< const double > normalize)
 Penalize total variation of torque along the path.
static Objective TotalVariationTorque (double weight, std::initializer_list< double > normalize)

Detailed Description

Owning objective descriptor used by C++ COPP solver problem objects.

This class only stores weights and coefficient vectors. Validation is performed when a solver Problem is constructed, because the expected vector lengths depend on robot dimension and the chosen station interval.

Definition at line 30 of file objective.hpp.

Member Function Documentation

◆ Time()

Objective copp::Objective::Time ( double weight = 1.0)
inlinestatic

Minimize traversal time.

Parameters
weightNonnegative scalar weight.

Definition at line 36 of file objective.hpp.

◆ Linear() [1/2]

Objective copp::Objective::Linear ( double weight,
Span< const double > alpha,
Span< const double > beta )
inlinestatic

Add a linear torque objective.

The objective uses coefficient vectors copied from alpha and beta. Expected lengths depend on the solver/problem dimension and are validated when constructing a COPP problem.

Definition at line 46 of file objective.hpp.

◆ Linear() [2/2]

Objective copp::Objective::Linear ( double weight,
std::initializer_list< double > alpha,
std::initializer_list< double > beta )
inlinestatic

Definition at line 59 of file objective.hpp.

◆ ThermalEnergy() [1/2]

Objective copp::Objective::ThermalEnergy ( double weight,
Span< const double > normalize )
inlinestatic

Penalize normalized squared torque / thermal energy.

Parameters
weightNonnegative scalar weight.
normalizePer-axis normalization vector copied into the objective descriptor.

Definition at line 73 of file objective.hpp.

◆ ThermalEnergy() [2/2]

Objective copp::Objective::ThermalEnergy ( double weight,
std::initializer_list< double > normalize )
inlinestatic

Definition at line 83 of file objective.hpp.

◆ TotalVariationTorque() [1/2]

Objective copp::Objective::TotalVariationTorque ( double weight,
Span< const double > normalize )
inlinestatic

Penalize total variation of torque along the path.

This objective is supported by SOCP solvers.

Definition at line 93 of file objective.hpp.

◆ TotalVariationTorque() [2/2]

Objective copp::Objective::TotalVariationTorque ( double weight,
std::initializer_list< double > normalize )
inlinestatic

Definition at line 103 of file objective.hpp.

◆ kind()

ObjectiveKind copp::Objective::kind ( ) const
inlinenoexcept

Definition at line 110 of file objective.hpp.

◆ weight()

double copp::Objective::weight ( ) const
inlinenoexcept

Definition at line 111 of file objective.hpp.

◆ alpha()

Span< const double > copp::Objective::alpha ( ) const
inlinenoexcept

Definition at line 113 of file objective.hpp.

◆ beta()

Span< const double > copp::Objective::beta ( ) const
inlinenoexcept

Definition at line 118 of file objective.hpp.

◆ normalize()

Span< const double > copp::Objective::normalize ( ) const
inlinenoexcept

Definition at line 123 of file objective.hpp.


The documentation for this class was generated from the following file: