pinocchio  3.7.0
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
 
Loading...
Searching...
No Matches
FactorGraph Class Reference

Public Member Functions

 __init__ (self, variableSize, nbVariables)
 
 add_factor (self, factors, reference)
 
 add_factor_constraint (self, factors, reference)
 
 matrix_form_factor (self, factors)
 
 solve (self, eps=1e-8)
 

Public Attributes

 A
 
 b
 
 C
 
 d
 
 N
 
 nx
 

Detailed Description

The class FactorGraph stores a block-sparse linear-constrained quadratic program
(LCQP) of variable x=(x1...xn). The size of the problem is set up at construction of
the object.
Methods add_factor() and add_factor_constraint() are used to set up the problem.
Method solve() is used to compute the solution to the problem.

Definition at line 40 of file factor.py.

Constructor & Destructor Documentation

◆ __init__()

__init__ (   self,
  variableSize,
  nbVariables 
)
Initialize a QP sparse problem as min || A x - b || so that C x = d
where  x = (x1, .., xn), and dim(xi) = variableSize and n = nbVariables
After construction, A, b, C and d are allocated and set to 0.

Definition at line 49 of file factor.py.

Member Function Documentation

◆ add_factor()

add_factor (   self,
  factors,
  reference 
)
Add a factor || sum_{i} factor[i].matrix * x_{factor[i].index} - reference ||
to the cost.

Definition at line 79 of file factor.py.

◆ add_factor_constraint()

add_factor_constraint (   self,
  factors,
  reference 
)
Add a factor sum_{i} factor[i].matrix * x_{factor[i].index} =  reference
to the constraints.

Definition at line 88 of file factor.py.

◆ matrix_form_factor()

matrix_form_factor (   self,
  factors 
)
Internal function: not designed to be called by the user.
Create a factor matrix [ A1 0 A2 0 A3 ... ] where the Ai's are placed at
the indexes of the factors.

Definition at line 62 of file factor.py.

◆ solve()

solve (   self,
  eps = 1e-8 
)
Implement a LCQP solver, with numerical threshold eps.

Definition at line 97 of file factor.py.

Member Data Documentation

◆ A

A

Definition at line 57 of file factor.py.

◆ b

b

Definition at line 58 of file factor.py.

◆ C

C

Definition at line 59 of file factor.py.

◆ d

d

Definition at line 60 of file factor.py.

◆ N

N

Definition at line 56 of file factor.py.

◆ nx

nx

Definition at line 55 of file factor.py.


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