Skip to content

ssqp::model::stagewise::predefined

predefined

Namespaces: constraints, costs

ReferenceFrame

#include <types.hpp>

Reference frame of a predefined cost or constraint Selects the axes that a cost's error, weights and desired value, or a constraint's bounds, are expressed along.

Only the axes change: positions keep the world origin, unless a bound's center moves it Options:

  • World: The world axes
  • Local: The axes of the frame the cost or constraint acts on, moving with it
  • Fixed: Constant axes given by a rotation matrix \(R\), whose columns are the axes in world coordinates. A vector \(\boldsymbol{v}\) in world coordinates is then expressed as \(R^\top \boldsymbol{v}\)
  • Base: The axes of the model's floating base, moving with it. On floating base costs and constraints, this is the same as Local Each cost or constraint documents the options it supports, and throws std::invalid_argument when given another

Type enum

enum Type
Value Description
World = 0
Local = 1
Fixed = 2
Base = 3

ReferenceFrame

ReferenceFrame(const Type type = World)

ReferenceFrame

ReferenceFrame(const Mat3 &rotation)

yaw static

static ReferenceFrame yaw(const double angle)

normal static

static ReferenceFrame normal(const Vec3 &normal, const double yaw = 0.0)

type

Type type() const

rotation

const Mat3 & rotation() const

axes

Mat3 axes(ConstVecXRef x) const

require

void require(
    std::initializer_list<Type> supported,
    const std::string &user,
    const bool floating_base = true
) const