Simox  2.3.50
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

Enumerator
eSeedZero 
eSeedInitial 
eSeedOther 

Constructor & Destructor Documentation

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

void ConstrainedIK::addConstraint ( const ConstraintPtr constraint,
int  priority = 0,
bool  hard_constraint = true 
)
void ConstrainedIK::addSeed ( ConstrainedIK::SeedType  type,
const Eigen::VectorXf  seed = Eigen::VectorXf() 
)
RobotPtr ConstrainedIK::buildReducedRobot ( const RobotPtr original)
protected
void ConstrainedIK::clearSeeds ( )
std::vector< ConstraintPtr > ConstrainedIK::getConstraints ( )
int ConstrainedIK::getCurrentIteration ( )
int ConstrainedIK::getMaxIterations ( )
bool ConstrainedIK::getRunning ( )
void ConstrainedIK::getUnitableNodes ( const RobotNodePtr robotNode,
const RobotNodeSetPtr nodeSet,
std::vector< std::string > &  unitable 
)
protected
void ConstrainedIK::removeConstraint ( const ConstraintPtr constraint)
void ConstrainedIK::setMaxIterations ( int  maxIterations)
bool ConstrainedIK::solve ( bool  stepwise = false)
virtual
virtual bool VirtualRobot::ConstrainedIK::solveStep ( )
pure virtual

Field Documentation

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