Drake
Drake C++ Documentation
cost.h File Reference
#include <cstddef>
#include <limits>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>
#include <Eigen/SparseCore>
#include "drake/common/drake_deprecated.h"
#include "drake/solvers/decision_variable.h"
#include "drake/solvers/evaluator_base.h"
#include "drake/solvers/sparse_and_dense_matrix.h"
Include dependency graph for cost.h:
This graph shows which files directly or indirectly include this file:

Classes

class  Cost
 Provides an abstract base for all costs. More...
 
class  LinearCost
 Implements a cost of the form

\[ a'x + b \]

. More...

 
class  QuadraticCost
 Implements a cost of the form

\[ .5 x'Qx + b'x + c \]

. More...

 
class  L1NormCost
 Implements a cost of the form ‖Ax + b‖₁. More...
 
class  L2NormCost
 Implements a cost of the form ‖Ax + b‖₂. More...
 
class  LInfNormCost
 Implements a cost of the form ‖Ax + b‖∞. More...
 
class  PerspectiveQuadraticCost
 If \( z = Ax + b,\) implements a cost of the form:

\[ (z_1^2 + z_2^2 + ... + z_{n-1}^2) / z_0. \]

Note that this cost is convex when we additionally constrain z_0 > 0. More...

 
class  EvaluatorCost< EvaluatorType >
 A cost that may be specified using another (potentially nonlinear) evaluator. More...
 
class  PolynomialCost
 Implements a cost of the form P(x, y...) where P is a multivariate polynomial in x, y, ... More...
 
class  ExpressionCost
 Impose a generic (potentially nonlinear) cost represented as a symbolic Expression. More...
 

Namespaces

 drake
 
 drake::solvers
 

Functions

std::shared_ptr< QuadraticCost > MakeQuadraticErrorCost (const Eigen::Ref< const Eigen::MatrixXd > &Q, const Eigen::Ref< const Eigen::VectorXd > &x_desired)
 Creates a cost term of the form (x-x_desired)'Q(x-x_desired). More...
 
std::shared_ptr< QuadraticCost > Make2NormSquaredCost (const Eigen::Ref< const Eigen::MatrixXd > &A, const Eigen::Ref< const Eigen::VectorXd > &b)
 Creates a quadratic cost of the form |Ax-b|²=(Ax-b)ᵀ(Ax-b) More...
 
template<typename FF >
std::shared_ptr< Cost > MakeFunctionCost (FF &&f)
 Converts an input of type F to a nonlinear cost. More...