pinocchio 4.1.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
Loading...
Searching...
No Matches
PGSSolverResultTpl< _Scalar, _Options > Struct Template Reference

Struct describing the solution of the PGS constraint solver after calling the solve method. Also contains the warmstart of the solution to the constraint problem. More...

#include <pinocchio/algorithm/solvers/pgs-solver.hpp>

Inheritance diagram for PGSSolverResultTpl< _Scalar, _Options >:
Collaboration diagram for PGSSolverResultTpl< _Scalar, _Options >:

Public Types

typedef ConstraintSolverResultBase< Self > Base
typedef Eigen::Ref< const VectorXs > RefConstVectorXs
typedef _Scalar Scalar
typedef PGSSolverResultTpl Self
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, 1, Options > VectorXs
typedef internal::EigenStorageTpl< VectorXs > VectorXsStorage

Public Member Functions

 PGSSolverResultTpl ()
 Default constructor.
 PGSSolverResultTpl (const PGSSolverResultTpl &other)
 Copy constructor.
void clearConstraintImpulseGuessImpl ()
void clearConstraintVelocityGuessImpl ()
int constraintSizeImpl () const
PGSSolverResultTpl & operator= (const PGSSolverResultTpl &other)
 Assignment operator.
void resetImpl ()
void resize (std::size_t problem_size_)
 Resize the primal/dual vectors of the solution.
template<typename VectorLike>
void retrieveConstraintImpulsesImpl (const Eigen::MatrixBase< VectorLike > &constraint_impulses_) const
template<typename VectorLike>
void retrieveConstraintVelocitiesImpl (const Eigen::MatrixBase< VectorLike > &constraint_velocities_) const
template<typename VectorLike>
void retrieveDualSolution (const Eigen::MatrixBase< VectorLike > &dual_solution_) const
 Retrieve dual solution.
template<typename VectorLike>
void retrievePrimalSolution (const Eigen::MatrixBase< VectorLike > &primal_solution_) const
 Retrieve primal solution.
template<typename VectorLike>
void setConstraintImpulseGuessImpl (const Eigen::MatrixBase< VectorLike > &impulse_guess_in)
template<typename VectorLike>
void setConstraintVelocityGuessImpl (const Eigen::MatrixBase< VectorLike > &)

Public Attributes

std::optional< RefConstVectorXs > impulse_guess
 Optional guess for the primal variable (impulses).
VectorXsStorage::RefMapType m_impulse_guess = m_impulse_guess_storage.map()
VectorXsStorage m_impulse_guess_storage
 Storage for the optional impulse guess.
std::size_t problem_size
 Size of primal/dual variables.
VectorXsStorage::RefMapType x = x_storage.map()
VectorXsStorage x_storage
 Primal solution.
VectorXsStorage::RefMapType y = y_storage.map()
VectorXsStorage y_storage
 Dual solution.

Static Public Attributes

static constexpr int Options = _Options

Detailed Description

template<typename _Scalar, int _Options>
struct pinocchio::PGSSolverResultTpl< _Scalar, _Options >

Struct describing the solution of the PGS constraint solver after calling the solve method. Also contains the warmstart of the solution to the constraint problem.

Definition at line 232 of file pgs-solver.hpp.

Member Typedef Documentation

◆ Base

template<typename _Scalar, int _Options>
typedef ConstraintSolverResultBase<Self> Base

Definition at line 237 of file pgs-solver.hpp.

◆ RefConstVectorXs

template<typename _Scalar, int _Options>
typedef Eigen::Ref<const VectorXs> RefConstVectorXs

Definition at line 240 of file pgs-solver.hpp.

◆ Scalar

template<typename _Scalar, int _Options>
typedef _Scalar Scalar

Definition at line 234 of file pgs-solver.hpp.

◆ Self

template<typename _Scalar, int _Options>
typedef PGSSolverResultTpl Self

Definition at line 236 of file pgs-solver.hpp.

◆ VectorXs

template<typename _Scalar, int _Options>
typedef Eigen::Matrix<Scalar, Eigen::Dynamic, 1, Options> VectorXs

Definition at line 239 of file pgs-solver.hpp.

◆ VectorXsStorage

template<typename _Scalar, int _Options>
typedef internal::EigenStorageTpl<VectorXs> VectorXsStorage

Definition at line 241 of file pgs-solver.hpp.

Constructor & Destructor Documentation

◆ PGSSolverResultTpl() [1/2]

template<typename _Scalar, int _Options>
PGSSolverResultTpl()
inline

Default constructor.

Definition at line 248 of file pgs-solver.hpp.

◆ PGSSolverResultTpl() [2/2]

template<typename _Scalar, int _Options>
PGSSolverResultTpl(const PGSSolverResultTpl< _Scalar, _Options > &other)
inline

Copy constructor.

Definition at line 256 of file pgs-solver.hpp.

Member Function Documentation

◆ clearConstraintImpulseGuessImpl()

template<typename _Scalar, int _Options>
void clearConstraintImpulseGuessImpl()
inline

Definition at line 336 of file pgs-solver.hpp.

◆ clearConstraintVelocityGuessImpl()

template<typename _Scalar, int _Options>
void clearConstraintVelocityGuessImpl()
inline

Definition at line 348 of file pgs-solver.hpp.

◆ constraintSizeImpl()

template<typename _Scalar, int _Options>
int constraintSizeImpl()const
inline

Definition at line 288 of file pgs-solver.hpp.

◆ operator=()

template<typename _Scalar, int _Options>
PGSSolverResultTpl & operator=(const PGSSolverResultTpl< _Scalar, _Options > &other)
inline

Assignment operator.

Definition at line 262 of file pgs-solver.hpp.

◆ resetImpl()

template<typename _Scalar, int _Options>
void resetImpl()
inline

Definition at line 293 of file pgs-solver.hpp.

◆ resize()

template<typename _Scalar, int _Options>
void resize(std::size_tproblem_size_)
inline

Resize the primal/dual vectors of the solution.

Definition at line 303 of file pgs-solver.hpp.

◆ retrieveConstraintImpulsesImpl()

template<typename _Scalar, int _Options>
template<typename VectorLike>
void retrieveConstraintImpulsesImpl(const Eigen::MatrixBase< VectorLike > &constraint_impulses_)const
inline

Definition at line 355 of file pgs-solver.hpp.

◆ retrieveConstraintVelocitiesImpl()

template<typename _Scalar, int _Options>
template<typename VectorLike>
void retrieveConstraintVelocitiesImpl(const Eigen::MatrixBase< VectorLike > &constraint_velocities_)const
inline

At the optimum we have y = Gx + g. WARNING: the PGS solver does not take into account desaxce terms for now. It only solves the CCP (not the NCP).

Definition at line 365 of file pgs-solver.hpp.

◆ retrieveDualSolution()

template<typename _Scalar, int _Options>
template<typename VectorLike>
void retrieveDualSolution(const Eigen::MatrixBase< VectorLike > &dual_solution_)const
inline

Retrieve dual solution.

Definition at line 322 of file pgs-solver.hpp.

◆ retrievePrimalSolution()

template<typename _Scalar, int _Options>
template<typename VectorLike>
void retrievePrimalSolution(const Eigen::MatrixBase< VectorLike > &primal_solution_)const
inline

Retrieve primal solution.

Definition at line 314 of file pgs-solver.hpp.

◆ setConstraintImpulseGuessImpl()

template<typename _Scalar, int _Options>
template<typename VectorLike>
void setConstraintImpulseGuessImpl(const Eigen::MatrixBase< VectorLike > &impulse_guess_in)
inline

Definition at line 329 of file pgs-solver.hpp.

◆ setConstraintVelocityGuessImpl()

template<typename _Scalar, int _Options>
template<typename VectorLike>
void setConstraintVelocityGuessImpl(const Eigen::MatrixBase< VectorLike > &)
inline

Definition at line 343 of file pgs-solver.hpp.

Member Data Documentation

◆ impulse_guess

template<typename _Scalar, int _Options>
std::optional<RefConstVectorXs> impulse_guess

Optional guess for the primal variable (impulses).

Definition at line 394 of file pgs-solver.hpp.

◆ m_impulse_guess

template<typename _Scalar, int _Options>
VectorXsStorage::RefMapType m_impulse_guess = m_impulse_guess_storage.map()

Definition at line 411 of file pgs-solver.hpp.

◆ m_impulse_guess_storage

template<typename _Scalar, int _Options>
VectorXsStorage m_impulse_guess_storage

Storage for the optional impulse guess.

Definition at line 410 of file pgs-solver.hpp.

◆ Options

template<typename _Scalar, int _Options>
int Options = _Options
staticconstexpr

Definition at line 235 of file pgs-solver.hpp.

◆ problem_size

template<typename _Scalar, int _Options>
std::size_t problem_size

Size of primal/dual variables.

Definition at line 388 of file pgs-solver.hpp.

◆ x

template<typename _Scalar, int _Options>
VectorXsStorage::RefMapType x = x_storage.map()

Definition at line 403 of file pgs-solver.hpp.

◆ x_storage

template<typename _Scalar, int _Options>
VectorXsStorage x_storage

Primal solution.

Note
Order of storage/map declaration is important! First declare the storage, then the map, otherwise map will point to nothing.

Definition at line 402 of file pgs-solver.hpp.

◆ y

template<typename _Scalar, int _Options>
VectorXsStorage::RefMapType y = y_storage.map()

Definition at line 407 of file pgs-solver.hpp.

◆ y_storage

template<typename _Scalar, int _Options>
VectorXsStorage y_storage

Dual solution.

Definition at line 406 of file pgs-solver.hpp.


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