Simox  2.3.74.0
VirtualRobot::ConstrainedIK Class Referenceabstract
Inheritance diagram for VirtualRobot::ConstrainedIK:
VirtualRobot::ConstrainedHierarchicalIK VirtualRobot::ConstrainedOptimizationIK VirtualRobot::ConstrainedStackedIK

Public Types

enum  SeedType { eSeedZero, eSeedInitial, eSeedOther }
 

Public Member Functions

 ConstrainedIK (RobotPtr &robot, const RobotNodeSetPtr &nodeSet, int maxIterations=1000, float stall_epsilon=0.0001, float raise_epsilon=0.8, bool reduceRobot=false)
 
void addConstraint (const ConstraintPtr &constraint, int priority=0, bool hard_constraint=true)
 
void removeConstraint (const ConstraintPtr &constraint)
 
std::vector< ConstraintPtrgetConstraints ()
 
void addSeed (SeedType type, const Eigen::VectorXf seed=Eigen::VectorXf())
 
void clearSeeds ()
 
virtual bool initialize ()
 
virtual bool solveStep ()=0
 
virtual bool solve (bool stepwise=false)
 
void setMaxIterations (int maxIterations)
 
int getMaxIterations ()
 
bool getRunning ()
 
int getCurrentIteration ()
 

Protected Member Functions

void getUnitableNodes (const RobotNodePtr &robotNode, const RobotNodeSetPtr &nodeSet, std::vector< std::string > &unitable)
 
RobotPtr buildReducedRobot (const RobotPtr &original)
 

Protected Attributes

std::vector< ConstraintPtrconstraints
 
std::map< ConstraintPtr, int > priorities
 
std::map< ConstraintPtr, bool > hardConstraints
 
RobotPtr originalRobot
 
RobotPtr robot
 
RobotNodeSetPtr nodeSet
 
Eigen::VectorXf initialConfig
 
std::vector< std::pair< SeedType, Eigen::VectorXf > > seeds
 
int maxIterations
 
int currentIteration
 
bool running
 
float stallEpsilon
 
float raiseEpsilon
 

Member Enumeration Documentation

◆ SeedType

Enumerator
eSeedZero 
eSeedInitial 
eSeedOther 

Constructor & Destructor Documentation

◆ ConstrainedIK()

ConstrainedIK::ConstrainedIK ( RobotPtr robot,
const RobotNodeSetPtr nodeSet,
int  maxIterations = 1000,
float  stall_epsilon = 0.0001,
float  raise_epsilon = 0.8,
bool  reduceRobot = false 
)

Member Function Documentation

◆ addConstraint()

void ConstrainedIK::addConstraint ( const ConstraintPtr constraint,
int  priority = 0,
bool  hard_constraint = true 
)

◆ addSeed()

void ConstrainedIK::addSeed ( ConstrainedIK::SeedType  type,
const Eigen::VectorXf  seed = Eigen::VectorXf() 
)

◆ buildReducedRobot()

RobotPtr ConstrainedIK::buildReducedRobot ( const RobotPtr original)
protected

◆ clearSeeds()

void ConstrainedIK::clearSeeds ( )

◆ getConstraints()

std::vector< ConstraintPtr > ConstrainedIK::getConstraints ( )

◆ getCurrentIteration()

int ConstrainedIK::getCurrentIteration ( )

◆ getMaxIterations()

int ConstrainedIK::getMaxIterations ( )

◆ getRunning()

bool ConstrainedIK::getRunning ( )

◆ getUnitableNodes()

void ConstrainedIK::getUnitableNodes ( const RobotNodePtr robotNode,
const RobotNodeSetPtr nodeSet,
std::vector< std::string > &  unitable 
)
protected

◆ initialize()

◆ removeConstraint()

void ConstrainedIK::removeConstraint ( const ConstraintPtr constraint)

◆ setMaxIterations()

void ConstrainedIK::setMaxIterations ( int  maxIterations)

◆ solve()

bool ConstrainedIK::solve ( bool  stepwise = false)
virtual

◆ solveStep()

virtual bool VirtualRobot::ConstrainedIK::solveStep ( )
pure virtual

Field Documentation

◆ constraints

std::vector<ConstraintPtr> VirtualRobot::ConstrainedIK::constraints
protected

◆ currentIteration

int VirtualRobot::ConstrainedIK::currentIteration
protected

◆ hardConstraints

std::map<ConstraintPtr, bool> VirtualRobot::ConstrainedIK::hardConstraints
protected

◆ initialConfig

Eigen::VectorXf VirtualRobot::ConstrainedIK::initialConfig
protected

◆ maxIterations

int VirtualRobot::ConstrainedIK::maxIterations
protected

◆ nodeSet

RobotNodeSetPtr VirtualRobot::ConstrainedIK::nodeSet
protected

◆ originalRobot

RobotPtr VirtualRobot::ConstrainedIK::originalRobot
protected

◆ priorities

std::map<ConstraintPtr, int> VirtualRobot::ConstrainedIK::priorities
protected

◆ raiseEpsilon

float VirtualRobot::ConstrainedIK::raiseEpsilon
protected

◆ robot

RobotPtr VirtualRobot::ConstrainedIK::robot
protected

◆ running

bool VirtualRobot::ConstrainedIK::running
protected

◆ seeds

std::vector<std::pair<SeedType, Eigen::VectorXf> > VirtualRobot::ConstrainedIK::seeds
protected

◆ stallEpsilon

float VirtualRobot::ConstrainedIK::stallEpsilon
protected