Simox  2.3.74.0
Saba::ElasticBandProcessor Class Reference

The ElasticBandProcessor uses Cartesian distance vectors to move c-space points in order to produce smooth trajectories. More...

Inheritance diagram for Saba::ElasticBandProcessor:
Saba::PathProcessor

Public Member Functions

 ElasticBandProcessor (CSpacePathPtr path, CSpaceSampledPtr cspace, VirtualRobot::RobotNodePtr node, VirtualRobot::SceneObjectSetPtr obstacles, bool verbose=false)
 
 ~ElasticBandProcessor () override
 
CSpacePathPtr optimize (int optimizeSteps) override
 A wrapper to the standard interface. More...
 
void setWeights (Eigen::VectorXf w)
 could also be used to disable specific dimensions More...
 
void getForces (unsigned int i, Eigen::Vector3f &internalForce, Eigen::Vector3f &externalForce)
 
Eigen::Vector3f getWSpacePoint (const Eigen::VectorXf &fc)
 
- Public Member Functions inherited from Saba::PathProcessor
 PathProcessor (CSpacePathPtr p, bool verbose=false)
 
virtual ~PathProcessor ()
 
virtual void stopExecution ()
 Stop the execution from outside. More...
 
CSpacePathPtr getOptimizedPath ()
 

Protected Member Functions

bool getCSpaceForce (const Eigen::Vector3f &f, Eigen::VectorXf &fc, float factor, float maxForce)
 
bool getWSpaceForce (const Eigen::VectorXf &fc, Eigen::Vector3f &f)
 
bool getObstacleForce (Eigen::Vector3f &f)
 
bool initSolution ()
 
bool elasticBandLoop ()
 
bool checkRemoveNodes ()
 
bool checkNewNodes ()
 
bool getNeighborCForce (const Eigen::VectorXf &before, const Eigen::VectorXf &act, const Eigen::VectorXf &next, Eigen::VectorXf &fc)
 

Protected Attributes

Eigen::VectorXf weights
 
CSpaceSampledPtr cspace
 
VirtualRobot::RobotNodePtr node
 
VirtualRobot::SceneObjectSetPtr obstacles
 
VirtualRobot::RobotNodeSetPtr rns
 
VirtualRobot::CollisionCheckerPtr colChecker
 
VirtualRobot::GenericIKSolverPtr ik
 
float factorCSpaceNeighborForce
 
float factorCSpaceObstacleForce
 
float maxCSpaceNeighborForce
 
float maxCSpaceObstacleForce
 
float minObstacleDistance
 
- Protected Attributes inherited from Saba::PathProcessor
CSpacePathPtr optimizedPath
 
CSpacePathPtr path
 
unsigned int dim
 
bool verbose
 
bool stopOptimization
 

Detailed Description

The ElasticBandProcessor uses Cartesian distance vectors to move c-space points in order to produce smooth trajectories.

Constructor & Destructor Documentation

◆ ElasticBandProcessor()

Saba::ElasticBandProcessor::ElasticBandProcessor ( CSpacePathPtr  path,
CSpaceSampledPtr  cspace,
VirtualRobot::RobotNodePtr  node,
VirtualRobot::SceneObjectSetPtr  obstacles,
bool  verbose = false 
)

◆ ~ElasticBandProcessor()

Saba::ElasticBandProcessor::~ElasticBandProcessor ( )
overridedefault

Member Function Documentation

◆ checkNewNodes()

bool Saba::ElasticBandProcessor::checkNewNodes ( )
protected

◆ checkRemoveNodes()

bool Saba::ElasticBandProcessor::checkRemoveNodes ( )
protected

◆ elasticBandLoop()

bool Saba::ElasticBandProcessor::elasticBandLoop ( )
protected

◆ getCSpaceForce()

bool Saba::ElasticBandProcessor::getCSpaceForce ( const Eigen::Vector3f &  f,
Eigen::VectorXf &  fc,
float  factor,
float  maxForce 
)
protected

◆ getForces()

void Saba::ElasticBandProcessor::getForces ( unsigned int  i,
Eigen::Vector3f &  internalForce,
Eigen::Vector3f &  externalForce 
)

Writes ext and int forces of point i to given variables.

◆ getNeighborCForce()

bool Saba::ElasticBandProcessor::getNeighborCForce ( const Eigen::VectorXf &  before,
const Eigen::VectorXf &  act,
const Eigen::VectorXf &  next,
Eigen::VectorXf &  fc 
)
protected

◆ getObstacleForce()

bool Saba::ElasticBandProcessor::getObstacleForce ( Eigen::Vector3f &  f)
protected

◆ getWSpaceForce()

bool Saba::ElasticBandProcessor::getWSpaceForce ( const Eigen::VectorXf &  fc,
Eigen::Vector3f &  f 
)
protected

◆ getWSpacePoint()

Eigen::Vector3f Saba::ElasticBandProcessor::getWSpacePoint ( const Eigen::VectorXf &  fc)

◆ initSolution()

bool Saba::ElasticBandProcessor::initSolution ( )
protected

◆ optimize()

CSpacePathPtr Saba::ElasticBandProcessor::optimize ( int  optimizeSteps)
overridevirtual

A wrapper to the standard interface.

Implements Saba::PathProcessor.

◆ setWeights()

void Saba::ElasticBandProcessor::setWeights ( Eigen::VectorXf  w)

could also be used to disable specific dimensions

Field Documentation

◆ colChecker

VirtualRobot::CollisionCheckerPtr Saba::ElasticBandProcessor::colChecker
protected

◆ cspace

CSpaceSampledPtr Saba::ElasticBandProcessor::cspace
protected

◆ factorCSpaceNeighborForce

float Saba::ElasticBandProcessor::factorCSpaceNeighborForce
protected

◆ factorCSpaceObstacleForce

float Saba::ElasticBandProcessor::factorCSpaceObstacleForce
protected

◆ ik

VirtualRobot::GenericIKSolverPtr Saba::ElasticBandProcessor::ik
protected

◆ maxCSpaceNeighborForce

float Saba::ElasticBandProcessor::maxCSpaceNeighborForce
protected

◆ maxCSpaceObstacleForce

float Saba::ElasticBandProcessor::maxCSpaceObstacleForce
protected

◆ minObstacleDistance

float Saba::ElasticBandProcessor::minObstacleDistance
protected

◆ node

VirtualRobot::RobotNodePtr Saba::ElasticBandProcessor::node
protected

◆ obstacles

VirtualRobot::SceneObjectSetPtr Saba::ElasticBandProcessor::obstacles
protected

◆ rns

VirtualRobot::RobotNodeSetPtr Saba::ElasticBandProcessor::rns
protected

◆ weights

Eigen::VectorXf Saba::ElasticBandProcessor::weights
protected