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

Projected Gauss Siedel solver. More...

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

Inheritance diagram for PGSContactSolverTpl< _Scalar >:
Collaboration diagram for PGSContactSolverTpl< _Scalar >:

Public Types

typedef ContactSolverBaseTpl< ScalarBase
 
typedef _Scalar Scalar
 
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > VectorXs
 
- Public Types inherited from ContactSolverBaseTpl< _Scalar >
typedef hpp::fcl::CPUTimes CPUTimes
 
typedef _Scalar Scalar
 
typedef hpp::fcl::Timer Timer
 

Public Member Functions

 PGSContactSolverTpl (const int problem_size)
 
template<typename MatrixLike , typename VectorLike , typename ConstraintAllocator , typename VectorLikeOut >
bool solve (const MatrixLike &G, const Eigen::MatrixBase< VectorLike > &g, const std::vector< CoulombFrictionConeTpl< Scalar >, ConstraintAllocator > &cones, const Eigen::DenseBase< VectorLikeOut > &x, const Scalar over_relax=Scalar(1))
 Solve the constrained conic problem composed of problem data (G,g,cones) and starting from the initial guess.
 
- Public Member Functions inherited from ContactSolverBaseTpl< _Scalar >
 ContactSolverBaseTpl (const int problem_size)
 
Scalar getAbsoluteConvergenceResidual () const
 Returns the value of the absolute residual value corresponding to the contact complementary conditions.
 
Scalar getAbsolutePrecision () const
 Get the absolute precision requested.
 
CPUTimes getCPUTimes () const
 
int getIterationCount () const
 Get the number of iterations achieved by the solver.
 
int getMaxIterations () const
 Get the maximum number of iterations allowed.
 
int getProblemSize () const
 Returns the size of the problem.
 
Scalar getRelativeConvergenceResidual () const
 Returns the value of the relative residual value corresponding to the difference between two successive iterates (infinity norms).
 
Scalar getRelativePrecision () const
 Get the relative precision requested.
 
void setAbsolutePrecision (const Scalar absolute_precision)
 Set the absolute precision for the problem.
 
void setMaxIterations (const int max_it)
 Set the maximum number of iterations.
 
void setRelativePrecision (const Scalar relative_precision)
 Set the relative precision for the problem.
 

Protected Attributes

Timer timer
 
VectorXs x
 Previous temporary value of the optimum.
 
VectorXs x_previous
 
- Protected Attributes inherited from ContactSolverBaseTpl< _Scalar >
Scalar absolute_precision
 Desired absolute precision.
 
Scalar absolute_residual
 Absolule convergence residual value.
 
int it
 Number of iterations needed to achieve convergence.
 
int max_it
  
 
int problem_size
 Size of the problem.
 
Scalar relative_precision
 Desired relative precision.
 
Scalar relative_residual
 Relative convergence residual value.
 
Timer timer
 

Detailed Description

template<typename _Scalar>
struct pinocchio::PGSContactSolverTpl< _Scalar >

Projected Gauss Siedel solver.

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

Member Typedef Documentation

◆ Base

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

◆ Scalar

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

◆ VectorXs

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

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

Constructor & Destructor Documentation

◆ PGSContactSolverTpl()

template<typename _Scalar >
PGSContactSolverTpl ( const int  problem_size)
inlineexplicit

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

Member Function Documentation

◆ solve()

template<typename _Scalar >
bool solve ( const MatrixLike G,
const Eigen::MatrixBase< VectorLike > &  g,
const std::vector< CoulombFrictionConeTpl< Scalar >, ConstraintAllocator > &  cones,
const Eigen::DenseBase< VectorLikeOut > &  x,
const Scalar  over_relax = Scalar(1) 
)

Solve the constrained conic problem composed of problem data (G,g,cones) and starting from the initial guess.

Parameters
[in]GSymmetric PSD matrix representing the Delassus of the contact problem.
[in]gFree contact acceleration or velicity associted with the contact problem.
[in]conesVector of conic constraints.
[in,out]xInitial guess and output solution of the problem
[in]over_relaxOver relaxation value
Returns
True if the problem has converged.

Member Data Documentation

◆ timer

template<typename _Scalar >
Timer timer
protected

Definition at line 129 of file contact-solver-base.hpp.

◆ x

template<typename _Scalar >
VectorXs x
protected

Previous temporary value of the optimum.

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

◆ x_previous

template<typename _Scalar >
VectorXs x_previous
protected

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


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