memoryx::KBM::Inverse Namespace Reference

Namespace for algorithms related to solving the inverse kinematics. More...

Classes

class  GlobalIKBase
 
class  GlobalIKExtensive
 Finds all solutions to the Global IK. More...
 
class  GlobalIKSemiBreadth
 Expands all nets until a resolution has been reached, then search only for a single solution. More...
 
struct  GraphNode
 
struct  Solution
 

Typedefs

using SolutionSet = std::vector< Solution >
 Return type of the global inverse kinematics solvers. More...
 

Functions

bool operator< (const GraphNode &left, const GraphNode &right)
 
SolutionSet solveGlobalIK (KBM::Models::KBM_ptr kbm, const Vector &lower, const Vector &upper, Real resolution=M_PI/90.0f)
 Algorithm to find the global solution to the inverse kinematics based on the KBM structure. More...
 
SolutionSet solveGlobalIK (Models::KBM_ptr kbm, const Vector &target, Real resolution)
 
void solveGlobalIK (unsigned int recursion, int side, SolutionSet &solutionSet, Models::KBM_ptr kbm, const Vector &lower, const Vector &upper, Real resolution, Vector spreadAngles, Vector center)
 

Detailed Description

Namespace for algorithms related to solving the inverse kinematics.

Typedef Documentation

◆ SolutionSet

using SolutionSet = std::vector<Solution>

Return type of the global inverse kinematics solvers.

Definition at line 378 of file kbm.h.

Function Documentation

◆ operator<()

bool memoryx::KBM::Inverse::operator< ( const GraphNode left,
const GraphNode right 
)

Definition at line 647 of file inverse.cpp.

◆ solveGlobalIK() [1/3]

SolutionSet solveGlobalIK ( KBM::Models::KBM_ptr  kbm,
const Vector lower,
const Vector upper,
Real  resolution = M_PI/90.0f 
)

Algorithm to find the global solution to the inverse kinematics based on the KBM structure.

Work in progress.

Parameters
kbmThe already learned KBM representation of a kinematics.
lowerThe lower bound of the interval in Cartesian space.
upperThe upper bound of the interval in Cartesian space. Lower and upper bounds should be a target destination plus a desired tolerance, but can be chosen with equal values.
resolutionThe granularity of the found solutions (defaults to $2^\circ$).
Returns
The algorithm returns a list of joint angle intervals (the size is specified by the resolution parameters).

This algorithm solves the inverse kinematics globally and numerically by using an interval based version of the forward kinemtatics

\[ f(\alpha_1, \beta_1,\ldots,\alpha_n,\beta_n) = ([a_x, \ldots, b_x],[a_y,\ldots,b_y],[a_z,\ldots,b_z]).\]

which can be subdivided easily because of the linearisation emerging from the KBM model. This means that if there exist more than a single solution, a list of intervals that probably contain a solution. Specifically, this means that the target position lies within the bounding box of the control net of the subdivised kbm. If a sufficient amount of steps has been performed, the solution is garantueed to lie at least close to the desired target. The number of steps can be regulated by the resolution parameter (i.e., $n_{steps}=\log_2\frac{\alpha_{spread}}{\alpha_{resolution}}$). An interval-based version of this algorithm exists to define this distance in Cartesian space.

Subdivision in angular space
Subdivision in angular space
Todo:

Allow for additional constraints and behaviors in the form of a functor parameter.

Transform into class (with solution set embedded). For easier parameter settings. Further, SolutionSet should be a class with more information.

Change the enum type in KBM::Models::KBM::BBCheckType such that they can be combined by binary operators.

Allow depth search, also conditional after a given accuracy to avoid multiple solutions.

Definition at line 424 of file inverse.cpp.

+ Here is the call graph for this function:

◆ solveGlobalIK() [2/3]

SolutionSet memoryx::KBM::Inverse::solveGlobalIK ( Models::KBM_ptr  kbm,
const Vector target,
Real  resolution 
)

Definition at line 431 of file inverse.cpp.

+ Here is the call graph for this function:

◆ solveGlobalIK() [3/3]

void memoryx::KBM::Inverse::solveGlobalIK ( unsigned int  recursion,
int  side,
SolutionSet solutionSet,
Models::KBM_ptr  kbm,
const Vector lower,
const Vector upper,
Real  resolution,
Vector  spreadAngles,
Vector  center 
)

Definition at line 344 of file inverse.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: