Public Types | Public Member Functions | Public Attributes | Private Member Functions | List of all members
towr::NlpFormulation Class Reference

A sample combination of variables, cost and constraints. More...

#include <nlp_formulation.h>

Public Types

using ContraintPtrVec = std::vector< ifopt::ConstraintSet::Ptr >
 
using CostPtrVec = std::vector< ifopt::CostTerm::Ptr >
 
using EEPos = std::vector< Eigen::Vector3d >
 
using VariablePtrVec = std::vector< ifopt::VariableSet::Ptr >
 
using Vector3d = Eigen::Vector3d
 

Public Member Functions

ContraintPtrVec GetConstraints (const SplineHolder &spline_holder) const
 The ifopt constraints that enforce feasible motions. More...
 
ContraintPtrVec GetCosts () const
 The ifopt costs to tune the motion. More...
 
VariablePtrVec GetVariableSets (SplineHolder &spline_holder)
 The ifopt variable sets that will be optimized over. More...
 
 NlpFormulation ()
 
virtual ~NlpFormulation ()=default
 

Public Attributes

BaseState final_base_
 
BaseState initial_base_
 
EEPos initial_ee_W_
 
RobotModel model_
 
Parameters params_
 
HeightMap::Ptr terrain_
 

Private Member Functions

ContraintPtrVec GetConstraint (Parameters::ConstraintName name, const SplineHolder &splines) const
 
CostPtrVec GetCost (const Parameters::CostName &id, double weight) const
 
ContraintPtrVec MakeBaseAccConstraint (const SplineHolder &s) const
 
ContraintPtrVec MakeBaseRangeOfMotionConstraint (const SplineHolder &s) const
 
std::vector< NodesVariables::PtrMakeBaseVariables () const
 
std::vector< PhaseDurations::PtrMakeContactScheduleVariables () const
 
ContraintPtrVec MakeDynamicConstraint (const SplineHolder &s) const
 
CostPtrVec MakeEEMotionCost (double weight) const
 
std::vector< NodesVariablesPhaseBased::PtrMakeEndeffectorVariables () const
 
ContraintPtrVec MakeForceConstraint () const
 
CostPtrVec MakeForcesCost (double weight) const
 
std::vector< NodesVariablesPhaseBased::PtrMakeForceVariables () const
 
ContraintPtrVec MakeRangeOfMotionBoxConstraint (const SplineHolder &s) const
 
ContraintPtrVec MakeSwingConstraint () const
 
ContraintPtrVec MakeTerrainConstraint () const
 
ContraintPtrVec MakeTotalTimeConstraint () const
 

Detailed Description

A sample combination of variables, cost and constraints.

This is one example of how to combine the variables, constraints and costs provided by this library. Additional variables or constraints can be added to the NLP, or existing elements replaced to find a more powerful/general formulation. This formulation was used to generate the motions described in this paper: https://ieeexplore.ieee.org/document/8283570/

Definition at line 73 of file nlp_formulation.h.

Member Typedef Documentation

◆ ContraintPtrVec

Definition at line 76 of file nlp_formulation.h.

◆ CostPtrVec

Definition at line 77 of file nlp_formulation.h.

◆ EEPos

using towr::NlpFormulation::EEPos = std::vector<Eigen::Vector3d>

Definition at line 78 of file nlp_formulation.h.

◆ VariablePtrVec

Definition at line 75 of file nlp_formulation.h.

◆ Vector3d

using towr::NlpFormulation::Vector3d = Eigen::Vector3d

Definition at line 79 of file nlp_formulation.h.

Constructor & Destructor Documentation

◆ NlpFormulation()

towr::NlpFormulation::NlpFormulation ( )

Definition at line 51 of file nlp_formulation.cc.

◆ ~NlpFormulation()

virtual towr::NlpFormulation::~NlpFormulation ( )
virtualdefault

Member Function Documentation

◆ GetConstraint()

NlpFormulation::ContraintPtrVec towr::NlpFormulation::GetConstraint ( Parameters::ConstraintName  name,
const SplineHolder splines 
) const
private

Definition at line 212 of file nlp_formulation.cc.

◆ GetConstraints()

NlpFormulation::ContraintPtrVec towr::NlpFormulation::GetConstraints ( const SplineHolder spline_holder) const

The ifopt constraints that enforce feasible motions.

Parameters
[in]usesthe fully-constructed splines for initialization of constraints.

Definition at line 201 of file nlp_formulation.cc.

◆ GetCost()

NlpFormulation::CostPtrVec towr::NlpFormulation::GetCost ( const Parameters::CostName id,
double  weight 
) const
private

Definition at line 345 of file nlp_formulation.cc.

◆ GetCosts()

NlpFormulation::ContraintPtrVec towr::NlpFormulation::GetCosts ( ) const

The ifopt costs to tune the motion.

Definition at line 334 of file nlp_formulation.cc.

◆ GetVariableSets()

NlpFormulation::VariablePtrVec towr::NlpFormulation::GetVariableSets ( SplineHolder spline_holder)

The ifopt variable sets that will be optimized over.

Parameters

Definition at line 64 of file nlp_formulation.cc.

◆ MakeBaseAccConstraint()

NlpFormulation::ContraintPtrVec towr::NlpFormulation::MakeBaseAccConstraint ( const SplineHolder s) const
private

Definition at line 320 of file nlp_formulation.cc.

◆ MakeBaseRangeOfMotionConstraint()

NlpFormulation::ContraintPtrVec towr::NlpFormulation::MakeBaseRangeOfMotionConstraint ( const SplineHolder s) const
private

Definition at line 230 of file nlp_formulation.cc.

◆ MakeBaseVariables()

std::vector< NodesVariables::Ptr > towr::NlpFormulation::MakeBaseVariables ( ) const
private

Definition at line 96 of file nlp_formulation.cc.

◆ MakeContactScheduleVariables()

std::vector< PhaseDurations::Ptr > towr::NlpFormulation::MakeContactScheduleVariables ( ) const
private

Definition at line 184 of file nlp_formulation.cc.

◆ MakeDynamicConstraint()

NlpFormulation::ContraintPtrVec towr::NlpFormulation::MakeDynamicConstraint ( const SplineHolder s) const
private

Definition at line 238 of file nlp_formulation.cc.

◆ MakeEEMotionCost()

NlpFormulation::CostPtrVec towr::NlpFormulation::MakeEEMotionCost ( double  weight) const
private

Definition at line 366 of file nlp_formulation.cc.

◆ MakeEndeffectorVariables()

std::vector< NodesVariablesPhaseBased::Ptr > towr::NlpFormulation::MakeEndeffectorVariables ( ) const
private

Definition at line 128 of file nlp_formulation.cc.

◆ MakeForceConstraint()

NlpFormulation::ContraintPtrVec towr::NlpFormulation::MakeForceConstraint ( ) const
private

Definition at line 292 of file nlp_formulation.cc.

◆ MakeForcesCost()

NlpFormulation::CostPtrVec towr::NlpFormulation::MakeForcesCost ( double  weight) const
private

Definition at line 355 of file nlp_formulation.cc.

◆ MakeForceVariables()

std::vector< NodesVariablesPhaseBased::Ptr > towr::NlpFormulation::MakeForceVariables ( ) const
private

Definition at line 159 of file nlp_formulation.cc.

◆ MakeRangeOfMotionBoxConstraint()

NlpFormulation::ContraintPtrVec towr::NlpFormulation::MakeRangeOfMotionBoxConstraint ( const SplineHolder s) const
private

Definition at line 248 of file nlp_formulation.cc.

◆ MakeSwingConstraint()

NlpFormulation::ContraintPtrVec towr::NlpFormulation::MakeSwingConstraint ( ) const
private

Definition at line 307 of file nlp_formulation.cc.

◆ MakeTerrainConstraint()

NlpFormulation::ContraintPtrVec towr::NlpFormulation::MakeTerrainConstraint ( ) const
private

Definition at line 279 of file nlp_formulation.cc.

◆ MakeTotalTimeConstraint()

NlpFormulation::ContraintPtrVec towr::NlpFormulation::MakeTotalTimeConstraint ( ) const
private

Definition at line 265 of file nlp_formulation.cc.

Member Data Documentation

◆ final_base_

BaseState towr::NlpFormulation::final_base_

Definition at line 101 of file nlp_formulation.h.

◆ initial_base_

BaseState towr::NlpFormulation::initial_base_

Definition at line 100 of file nlp_formulation.h.

◆ initial_ee_W_

EEPos towr::NlpFormulation::initial_ee_W_

Definition at line 102 of file nlp_formulation.h.

◆ model_

RobotModel towr::NlpFormulation::model_

Definition at line 103 of file nlp_formulation.h.

◆ params_

Parameters towr::NlpFormulation::params_

Definition at line 105 of file nlp_formulation.h.

◆ terrain_

HeightMap::Ptr towr::NlpFormulation::terrain_

Definition at line 104 of file nlp_formulation.h.


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


towr
Author(s): Alexander W. Winkler
autogenerated on Mon Feb 28 2022 23:54:22