- 3.0.2 rigid body dynamics module.
ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM > Class Template Reference

NLOC for fixed base systems without an explicit contact model. More...

#include <FixBaseNLOC.h>

Public Types

using FBSystem = FIX_BASE_FD_SYSTEM
 
using SCALAR = typename FBSystem::SCALAR
 
using LinearizedSystem = ct::core::LinearSystem< STATE_DIM, CONTROL_DIM, SCALAR >
 
using NLOptConSolver = ct::optcon::NLOptConSolver< STATE_DIM, CONTROL_DIM, STATE_DIM/2, STATE_DIM/2, SCALAR >
 @ todo: introduce templates for P_DIM and V_DIM More...
 
using RobotState_t = FixBaseRobotState< NJOINTS, ACTUATOR_STATE_DIM, SCALAR >
 
using StateVector = typename core::StateVector< STATE_DIM, SCALAR >
 
using ControlVector = typename core::ControlVector< CONTROL_DIM, SCALAR >
 
using FeedbackMatrix = typename core::FeedbackMatrix< STATE_DIM, CONTROL_DIM, SCALAR >
 
using StateVectorArray = typename core::StateVectorArray< STATE_DIM, SCALAR >
 
using ControlVectorArray = typename core::ControlVectorArray< CONTROL_DIM, SCALAR >
 
using FeedbackArray = typename core::FeedbackArray< STATE_DIM, CONTROL_DIM, SCALAR >
 
using StateFeedbackController = typename core::StateFeedbackController< STATE_DIM, CONTROL_DIM, SCALAR >
 
using CostFunction = ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >
 
using JointAcceleration_t = JointAcceleration< NJOINTS, SCALAR >
 

Public Member Functions

 FixBaseNLOC ()=default
 default constructor More...
 
 FixBaseNLOC (std::shared_ptr< ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >> costFun, const typename NLOptConSolver::Settings_t &nlocSettings, std::shared_ptr< FBSystem > system=std::shared_ptr< FBSystem >(new FBSystem), bool verbose=false, std::shared_ptr< LinearizedSystem > linearizedSystem=nullptr)
 constructor which directly takes a cost function More...
 
 FixBaseNLOC (std::shared_ptr< ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >> costFun, std::shared_ptr< ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >> inputBoxConstraints, std::shared_ptr< ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >> stateBoxConstraints, std::shared_ptr< ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >> generalConstraints, const typename NLOptConSolver::Settings_t &nlocSettings, std::shared_ptr< FBSystem > system=std::shared_ptr< FBSystem >(new FBSystem), bool verbose=false, std::shared_ptr< LinearizedSystem > linearizedSystem=nullptr)
 constructor which directly takes a cost function and constraints, mind the order of the constraints More...
 
void initialize (const RobotState_t &x0, const core::Time &tf, StateVectorArray x_ref=StateVectorArray(), FeedbackArray u0_fb=FeedbackArray(), ControlVectorArray u0_ff=ControlVectorArray())
 
void initializeSteadyPose (const RobotState_t &x0, const core::Time &tf, const int N, ControlVector &u_ref, FeedbackMatrix K=FeedbackMatrix::Zero())
 initialize fixed-base robot with a steady pose using inverse dynamics torques as feedforward More...
 
void initializeDirectInterpolation (const RobotState_t &x0, const RobotState_t &xf, const core::Time &tf, const int N, FeedbackMatrix K=FeedbackMatrix::Zero())
 initialize fixed-base robot with a directly interpolated state trajectory and corresponding ID torques More...
 
void initializeDirectInterpolation (const RobotState_t &x0, const RobotState_t &xf, const core::Time &tf, const int N, ct::core::ControlVectorArray< NJOINTS, SCALAR > &u_array, ct::core::StateVectorArray< STATE_DIM, SCALAR > &x_array, FeedbackMatrix K=FeedbackMatrix::Zero())
 initialize fixed-base robot with a directly interpolated state trajectory and corresponding ID torques More...
 
bool runIteration ()
 
bool solve ()
 
const StateFeedbackControllergetSolution ()
 
const core::TimeArraygetTimeArray ()
 
const FeedbackArraygetFeedbackArray ()
 
const ControlVectorArraygetControlVectorArray ()
 
const StateVectorArraygetStateVectorArray ()
 
const NLOptConSolver::Settings_tgetSettings () const
 
void changeCostFunction (std::shared_ptr< CostFunction > costFunction)
 
std::shared_ptr< NLOptConSolvergetSolver ()
 

Static Public Attributes

static EIGEN_MAKE_ALIGNED_OPERATOR_NEW const bool eeForcesAreControlInputs = false
 
static const size_t CONTROL_DIM = FBSystem::CONTROL_DIM
 
static const size_t NJOINTS = FBSystem::NJOINTS
 
static const size_t STATE_DIM = FBSystem::STATE_DIM
 
static const size_t ACTUATOR_STATE_DIM = FBSystem::ACTUATOR_STATE_DIM
 

Detailed Description

template<class FIX_BASE_FD_SYSTEM>
class ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >

NLOC for fixed base systems without an explicit contact model.

Member Typedef Documentation

◆ FBSystem

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::FBSystem = FIX_BASE_FD_SYSTEM

◆ SCALAR

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::SCALAR = typename FBSystem::SCALAR

◆ LinearizedSystem

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::LinearizedSystem = ct::core::LinearSystem<STATE_DIM, CONTROL_DIM, SCALAR>

◆ NLOptConSolver

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::NLOptConSolver = ct::optcon::NLOptConSolver<STATE_DIM, CONTROL_DIM, STATE_DIM / 2, STATE_DIM / 2, SCALAR>

@ todo: introduce templates for P_DIM and V_DIM

◆ RobotState_t

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::RobotState_t = FixBaseRobotState<NJOINTS, ACTUATOR_STATE_DIM, SCALAR>

◆ StateVector

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::StateVector = typename core::StateVector<STATE_DIM, SCALAR>

◆ ControlVector

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::ControlVector = typename core::ControlVector<CONTROL_DIM, SCALAR>

◆ FeedbackMatrix

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::FeedbackMatrix = typename core::FeedbackMatrix<STATE_DIM, CONTROL_DIM, SCALAR>

◆ StateVectorArray

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::StateVectorArray = typename core::StateVectorArray<STATE_DIM, SCALAR>

◆ ControlVectorArray

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::ControlVectorArray = typename core::ControlVectorArray<CONTROL_DIM, SCALAR>

◆ FeedbackArray

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::FeedbackArray = typename core::FeedbackArray<STATE_DIM, CONTROL_DIM, SCALAR>

◆ StateFeedbackController

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::StateFeedbackController = typename core::StateFeedbackController<STATE_DIM, CONTROL_DIM, SCALAR>

◆ CostFunction

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::CostFunction = ct::optcon::CostFunctionQuadratic<STATE_DIM, CONTROL_DIM, SCALAR>

◆ JointAcceleration_t

template<class FIX_BASE_FD_SYSTEM>
using ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::JointAcceleration_t = JointAcceleration<NJOINTS, SCALAR>

Constructor & Destructor Documentation

◆ FixBaseNLOC() [1/3]

template<class FIX_BASE_FD_SYSTEM>
ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::FixBaseNLOC ( )
default

default constructor

◆ FixBaseNLOC() [2/3]

template<class FIX_BASE_FD_SYSTEM >
ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::FixBaseNLOC ( std::shared_ptr< ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >>  costFun,
const typename NLOptConSolver::Settings_t nlocSettings,
std::shared_ptr< FBSystem system = std::shared_ptr<FBSystem>(new FBSystem),
bool  verbose = false,
std::shared_ptr< LinearizedSystem linearizedSystem = nullptr 
)

constructor which directly takes a cost function

◆ FixBaseNLOC() [3/3]

template<class FIX_BASE_FD_SYSTEM >
ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::FixBaseNLOC ( std::shared_ptr< ct::optcon::CostFunctionQuadratic< STATE_DIM, CONTROL_DIM, SCALAR >>  costFun,
std::shared_ptr< ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >>  inputBoxConstraints,
std::shared_ptr< ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >>  stateBoxConstraints,
std::shared_ptr< ct::optcon::LinearConstraintContainer< STATE_DIM, CONTROL_DIM, SCALAR >>  generalConstraints,
const typename NLOptConSolver::Settings_t nlocSettings,
std::shared_ptr< FBSystem system = std::shared_ptr<FBSystem>(new FBSystem),
bool  verbose = false,
std::shared_ptr< LinearizedSystem linearizedSystem = nullptr 
)

constructor which directly takes a cost function and constraints, mind the order of the constraints

Member Function Documentation

◆ initialize()

template<class FIX_BASE_FD_SYSTEM >
void ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::initialize ( const RobotState_t x0,
const core::Time tf,
StateVectorArray  x_ref = StateVectorArray(),
FeedbackArray  u0_fb = FeedbackArray(),
ControlVectorArray  u0_ff = ControlVectorArray() 
)

◆ initializeSteadyPose()

template<class FIX_BASE_FD_SYSTEM >
void ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::initializeSteadyPose ( const RobotState_t x0,
const core::Time tf,
const int  N,
ControlVector u_ref,
FeedbackMatrix  K = FeedbackMatrix::Zero() 
)

◆ initializeDirectInterpolation() [1/2]

template<class FIX_BASE_FD_SYSTEM >
void ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::initializeDirectInterpolation ( const RobotState_t x0,
const RobotState_t xf,
const core::Time tf,
const int  N,
FeedbackMatrix  K = FeedbackMatrix::Zero() 
)

initialize fixed-base robot with a directly interpolated state trajectory and corresponding ID torques

◆ initializeDirectInterpolation() [2/2]

◆ runIteration()

template<class FIX_BASE_FD_SYSTEM >
bool ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::runIteration ( )

◆ solve()

template<class FIX_BASE_FD_SYSTEM >
bool ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::solve ( )

◆ getSolution()

template<class FIX_BASE_FD_SYSTEM >
const FixBaseNLOC< FIX_BASE_FD_SYSTEM >::StateFeedbackController & ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::getSolution ( )

◆ getTimeArray()

template<class FIX_BASE_FD_SYSTEM >
const core::TimeArray & ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::getTimeArray ( )

◆ getFeedbackArray()

template<class FIX_BASE_FD_SYSTEM >
const FixBaseNLOC< FIX_BASE_FD_SYSTEM >::FeedbackArray & ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::getFeedbackArray ( )

◆ getControlVectorArray()

template<class FIX_BASE_FD_SYSTEM >
const FixBaseNLOC< FIX_BASE_FD_SYSTEM >::ControlVectorArray & ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::getControlVectorArray ( )

◆ getStateVectorArray()

template<class FIX_BASE_FD_SYSTEM >
const FixBaseNLOC< FIX_BASE_FD_SYSTEM >::StateVectorArray & ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::getStateVectorArray ( )

◆ getSettings()

◆ changeCostFunction()

template<class FIX_BASE_FD_SYSTEM >
void ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::changeCostFunction ( std::shared_ptr< CostFunction costFunction)

◆ getSolver()

template<class FIX_BASE_FD_SYSTEM >
std::shared_ptr< typename FixBaseNLOC< FIX_BASE_FD_SYSTEM >::NLOptConSolver > ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::getSolver ( )

Member Data Documentation

◆ eeForcesAreControlInputs

template<class FIX_BASE_FD_SYSTEM>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW const bool ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::eeForcesAreControlInputs = false
static

◆ CONTROL_DIM

template<class FIX_BASE_FD_SYSTEM>
const size_t ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::CONTROL_DIM = FBSystem::CONTROL_DIM
static

◆ NJOINTS

template<class FIX_BASE_FD_SYSTEM>
const size_t ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::NJOINTS = FBSystem::NJOINTS
static

◆ STATE_DIM

template<class FIX_BASE_FD_SYSTEM>
const size_t ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::STATE_DIM = FBSystem::STATE_DIM
static

◆ ACTUATOR_STATE_DIM

template<class FIX_BASE_FD_SYSTEM>
const size_t ct::rbd::FixBaseNLOC< FIX_BASE_FD_SYSTEM >::ACTUATOR_STATE_DIM = FBSystem::ACTUATOR_STATE_DIM
static

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