pinocchio  2.7.1
A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
FactorGraph Class Reference
Inheritance diagram for FactorGraph:
Collaboration diagram for FactorGraph:

Public Member Functions

def __init__ (self, variableSize, nbVariables)
 
def add_factor (self, factors, reference)
 
def add_factor_constraint (self, factors, reference)
 
def matrix_form_factor (self, factors)
 
def 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 37 of file factor.py.

Constructor & Destructor Documentation

◆ __init__()

def __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 44 of file factor.py.

Member Function Documentation

◆ add_factor()

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

Definition at line 74 of file factor.py.

◆ add_factor_constraint()

def 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 83 of file factor.py.

◆ matrix_form_factor()

def 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 57 of file factor.py.

◆ solve()

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

Definition at line 92 of file factor.py.


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