Parasol Planning Library (PPL)
Extenders_UseCase.cpp

This is an example of how to use the extender methods.

void ExtendersUseCase() {
// The entender generates a new configuration to grow a path from startCfg in
// the direction of goalCfg. If the entender is successful, newCfg will store
// the newly generated configuration.
CfgType startCfg, goalCfg, newCfg;
// Not all expansion methods go in straight lines through the configuration
// space. For non-straight-line extension operations, lp will store the
// polygonal chain configurations generated by the extension operation.
// The extender label is a string that corresponds to the XML node label for
// the extension algorithm you would like to use.
std::string exLabel = "KinodynamicExtender";
// The extender object corresponding to a specific extension algorithm is used
// to run the extension algorithm.
auto extender = this->GetExtender(exLabel);
// The Extend method of an extender object runs the extension algorithm to
// generate a new configuration along the path from the start to the goal
// configuration. If the Extend operation is successful, it returns true,
// otherwise it returns false.
bool pass = extender->Extend(startCfg, goalCfg, newCfg, lp);
}
Definition: LPOutput.h:24