hpp-core: hpp::core::ProblemSolver Class Reference

hpp-core 9.0.2 Implement basic classes for canonical path planning for kinematic chains.

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
hpp::core::ProblemSolver Class Reference

`#include <hpp/core/problem-solver.hh>`

Collaboration diagram for hpp::core::ProblemSolver:
[legend]

## Public Types
typedef std::vector< PathOptimizerPtr_t > | PathOptimizers_t
typedef std::vector< std::string > | PathOptimizerTypes_t
typedef std::vector< std::string > | ConfigValidationTypes_t

## Public Member Functions
virtual | ~ProblemSolver ()
| Destructor.
void | robotType (const std::string &type)
const std::string & | robotType () const
| Get robot type.
DevicePtr_t | createRobot (const std::string &name)
virtual void | robot (const DevicePtr_t &robot)
| Set robot.
const DevicePtr_t & | robot () const
| Get robot.
ProblemPtr_t | problem ()
| Get pointer to problem.
const Configuration_t & | initConfig () const
| Get shared pointer to initial configuration.
virtual void | initConfig (ConfigurationIn_t config)
| Set initial configuration.
const Configurations_t & | goalConfigs () const
| Get number of goal configuration.
virtual void | addGoalConfig (ConfigurationIn_t config)
| Add goal configuration.
void | resetGoalConfigs ()
| Reset the set of goal configurations.
void | setGoalConstraints (const NumericalConstraints_t &constraints)
| Set goal of path planning as a set of constraints.
void | resetGoalConstraints ()
| Stop defining the goal of path planning as a set of constraints.
virtual void | pathPlannerType (const std::string &type)
| Set path planner type.
const std::string & | pathPlannerType () const
void | distanceType (const std::string &type)
| Set distance type.
const std::string & | distanceType () const
void | steeringMethodType (const std::string &type)
| Set steering method type.
const std::string & | steeringMethodType () const
void | configurationShooterType (const std::string &type)
| Set configuration shooter type.
const std::string & | configurationShooterType () const
const PathPlannerPtr_t & | pathPlanner () const
| Get path planner.
void | addPathOptimizer (const std::string &type)
const PathOptimizerTypes_t & | pathOptimizerTypes () const
void | clearPathOptimizers ()
| Clear the vector of path optimizers.
const PathOptimizerPtr_t & | pathOptimizer (std::size_t rank) const
| Get path optimizer at given rank.
void | optimizePath (PathVectorPtr_t path)
virtual void | pathValidationType (const std::string &type, const value_type &tolerance)
const std::string & | pathValidationType (value_type &tolerance) const
void | pathProjectorType (const std::string &type, const value_type &step)
const std::string & | pathProjectorType (value_type &tolerance) const
| Get path projector current type and get tolerance.
virtual void | addConfigValidation (const std::string &type)
const ConfigValidationTypes_t | configValidationTypes ()
| Get config validation current types.
void | clearConfigValidations ()
void | addConfigValidationBuilder (const std::string &type, const ConfigValidationBuilder_t &builder)
| Add a new available config validation method.
const RoadmapPtr_t & | roadmap () const
virtual void | resetProblem ()
| Create new problem.
virtual void | resetRoadmap ()
const ObjectStdVector_t & | collisionObstacles () const
| Local vector of objects considered for collision detection.
const ObjectStdVector_t & | distanceObstacles () const
| Local vector of objects considered for distance computation.
void | roadmap (const RoadmapPtr_t &roadmap)
| Set the roadmap.
void | initDistance ()
void | initSteeringMethod ()
void | initPathProjector ()
void | initPathValidation ()
| Set path validation by calling path validation factory.
void | initConfigValidation ()
| Set config validation by calling config validation factories.
void | initValidations ()
| Initialize the config and path validations and add the obstacles.
virtual void | initProblemTarget ()
| Initialize the problem target by calling the path validation factory.
Constraints
void | addConstraint (const ConstraintPtr_t &constraint)
| Add a constraint.
const ConstraintSetPtr_t & | constraints () const
| Get constraint set.
virtual void | resetConstraints ()
| Reset constraint set.
virtual void | addNumericalConstraintToConfigProjector (const std::string &configProjName, const std::string &constraintName, const std::size_t priority=0)
void | addNumericalConstraint (const std::string &name, const constraints::ImplicitPtr_t &constraint)
void | comparisonType (const std::string &name, const ComparisonTypes_t types)
void | comparisonType (const std::string &name, const ComparisonType &type)
ComparisonTypes_t | comparisonType (const std::string &name) const
constraints::ImplicitPtr_t | numericalConstraint (const std::string &name)
| Get constraint with given name.
void | computeValueAndJacobian (const Configuration_t &configuration, vector_t &value, matrix_t &jacobian) const
void | maxIterProjection (size_type iterations)
| Set maximal number of iterations in config projector.
size_type | maxIterProjection () const
| Get maximal number of iterations in config projector.
void | maxIterPathPlanning (size_type iterations)
| Set maximal number of iterations in config projector.
size_type | maxIterPathPlanning () const
| Get maximal number of iterations in config projector.
void | setTimeOutPathPlanning (double timeOut)
| set time out for the path planning ( in seconds)
double | getTimeOutPathPlanning ()
| set time out for the path planning ( in seconds)
void | errorThreshold (const value_type &threshold)
| Set error threshold in config projector.
value_type | errorThreshold () const
| Get errorimal number of threshold in config projector.
Solve problem and get paths
void | createPathOptimizers ()
virtual bool | prepareSolveStepByStep ()
virtual bool | executeOneStep ()
virtual void | finishSolveStepByStep ()
virtual void | solve ()
| Set and solve the problem.
bool | directPath (ConfigurationIn_t start, ConfigurationIn_t end, bool validate, std::size_t &pathId, std::string &report)
void | addConfigToRoadmap (ConfigurationIn_t config)
| Add random configuration into roadmap as new node.
void | addEdgeToRoadmap (ConfigurationIn_t config1, ConfigurationIn_t config2, const PathPtr_t &path)
void | interrupt ()
| Interrupt path planning and path optimization.
std::size_t | addPath (const PathVectorPtr_t &path)
| Add a path.
void | erasePath (std::size_t pathId)
| Erase a path.
const PathVectors_t & | paths () const
| Return vector of paths.
Obstacles
virtual void | addObstacle (const DevicePtr_t &device, bool collision, bool distance)
virtual void | addObstacle (const CollisionObjectPtr_t &inObject, bool collision, bool distance)
virtual void | removeObstacle (const std::string &name)
virtual void | addObstacle (const std::string &name, const CollisionGeometryPtr_t &inObject, const Transform3s &pose, bool collision, bool distance)
virtual void | addObstacle (const std::string &name, FclCollisionObject &inObject, bool collision, bool distance)
void | removeObstacleFromJoint (const std::string &jointName, const std::string &obstacleName)
void | cutObstacle (const std::string &name, const coal::AABB &aabb)
void | filterCollisionPairs ()
CollisionObjectPtr_t | obstacle (const std::string &name) const
const Transform3s & | obstacleFramePosition (const std::string &name) const
std::list< std::string > | obstacleNames (bool collision, bool distance) const
const DistanceBetweenObjectsPtr_t & | distanceBetweenObjects () const
| Return list of pair of distance computations.
pinocchio::GeomModelPtr_t | obstacleGeomModel () const
pinocchio::GeomDataPtr_t | obstacleGeomData () const

## Static Public Member Functions
static ProblemSolverPtr_t | create ()
| Create instance and return pointer.

## Public Attributes
Container< RobotBuilder_t > | robots
Container< ConfigurationShooterBuilder_t > | configurationShooters
Container< SteeringMethodBuilder_t > | steeringMethods
Container< DistanceBuilder_t > | distances
Container< PathValidationBuilder_t > | pathValidations
Container< ConfigValidationBuilder_t > | configValidations
Container< PathProjectorBuilder_t > | pathProjectors
Container< PathPlannerBuilder_t > | pathPlanners
Container< PathOptimizerBuilder_t > | pathOptimizers
Container< constraints::ImplicitPtr_t > | numericalConstraints
| Container of constraints::Implicit.
Member_lockedJoints_in_class_ProblemSolver_has_been_removed_use_member_numericalConstraints_instead | lockedJoints
Container< CenterOfMassComputationPtr_t > | centerOfMassComputations
| Container of CenterOfMassComputation.
Container< segments_t > | passiveDofs
| Container of passive DoFs (as segments_t)
Container< JointAndShapes_t > | jointAndShapes
| Container of JointAndShapes_t.
Container< AffordanceObjects_t > | affordanceObjects
| Container of AffordanceObjects_t.
Container< AffordanceConfig_t > | affordanceConfigs
| Container of AffordanceConfig_t.

## Protected Member Functions
| ProblemSolver ()
void | problem (ProblemPtr_t problem)
| Set pointer to problem.
virtual void | initializeProblem (ProblemPtr_t problem)

## Protected Attributes
ConstraintSetPtr_t | constraints_
| Store constraints until call to solve.
DevicePtr_t | robot_
| Robot.
ProblemPtr_t | problem_
| Problem.
PathPlannerPtr_t | pathPlanner_
RoadmapPtr_t | roadmap_
| Store roadmap.
PathVectors_t | paths_
| Paths.
std::string | pathProjectorType_
| Path projector method.
value_type | pathProjectorTolerance_
| Tolerance of path projector.
std::string | pathPlannerType_
| Path planner.
ProblemTargetPtr_t | target_
| Shared pointer to the problem target.

## Detailed Description

Set and solve a path planning problem

This class is a container that does the interface between hpp-core library and component to be running in a middleware like CORBA or ROS.

## Member Typedef Documentation

## ◆ ConfigValidationTypes_t

typedef std::vector<std::string> hpp::core::ProblemSolver::ConfigValidationTypes_t

## ◆ PathOptimizers_t

typedef std::vector<PathOptimizerPtr_t> hpp::core::ProblemSolver::PathOptimizers_t

## ◆ PathOptimizerTypes_t

typedef std::vector<std::string> hpp::core::ProblemSolver::PathOptimizerTypes_t

## Constructor & Destructor Documentation

## ◆ ~ProblemSolver()

virtual hpp::core::ProblemSolver::~ProblemSolver | ( |  | ) |
| virtual

Destructor.

## ◆ ProblemSolver()

hpp::core::ProblemSolver::ProblemSolver | ( |  | ) |
| protected

Constructor

Call create to create an instance.

## Member Function Documentation

## ◆ addConfigToRoadmap()

void hpp::core::ProblemSolver::addConfigToRoadmap | ( | ConfigurationIn_t | config | ) |

Add random configuration into roadmap as new node.

## ◆ addConfigValidation()

virtual void hpp::core::ProblemSolver::addConfigValidation | ( | const std::string & | type | ) |
| virtual

Add a config validation method

Parameters

  type | name of new config validation method Config validation methods are used to validate individual configurations of the robot.

## ◆ addConfigValidationBuilder()

void hpp::core::ProblemSolver::addConfigValidationBuilder | ( | const std::string & | type,
|  | const ConfigValidationBuilder_t & | builder
| ) |  |

Add a new available config validation method.

## ◆ addConstraint()

void hpp::core::ProblemSolver::addConstraint | ( | const ConstraintPtr_t & | constraint | ) |

Add a constraint.

## ◆ addEdgeToRoadmap()

void hpp::core::ProblemSolver::addEdgeToRoadmap | ( | ConfigurationIn_t | config1,
|  | ConfigurationIn_t | config2,
|  | const PathPtr_t & | path
| ) |  |

Add an edge between two roadmap nodes.

Parameters

  config1 | configuration of start node,
  config2 | configuration of destination node,
  path | path to store in the edge.

Check that nodes containing config1 and config2 exist in the roadmap.

## ◆ addGoalConfig()

virtual void hpp::core::ProblemSolver::addGoalConfig | ( | ConfigurationIn_t | config | ) |
| virtual

Add goal configuration.

## ◆ addNumericalConstraint()

void hpp::core::ProblemSolver::addNumericalConstraint | ( | const std::string & | name,
|  | const constraints::ImplicitPtr_t & | constraint
| ) |  |
| inline

Add a a numerical constraint in local map.

Parameters

  name | name of the numerical constraint as stored in local map,
  constraint | numerical constraint

Numerical constraints are to be inserted in the ConfigProjector of the constraint set.

## ◆ addNumericalConstraintToConfigProjector()

virtual void hpp::core::ProblemSolver::addNumericalConstraintToConfigProjector | ( | const std::string & | configProjName,
|  | const std::string & | constraintName,
|  | const std::size_t | priority = `0`
| ) |  |
| virtual

Add numerical constraint to the config projector

Parameters

  configProjName | Name given to config projector if created by this method.
  constraintName | name of the function as stored in internal map. Build the config projector if not yet constructed.

## ◆ addObstacle() [1/4]

virtual void hpp::core::ProblemSolver::addObstacle | ( | const CollisionObjectPtr_t & | inObject,
|  | bool | collision,
|  | bool | distance
| ) |  |
| virtual

Add obstacle to the list.

Parameters

  inObject | a new object.
  collision | whether collision checking should be performed for this object.
  distance | whether distance computation should be performed for this object.

## ◆ addObstacle() [2/4]

virtual void hpp::core::ProblemSolver::addObstacle | ( | const DevicePtr_t & | device,
|  | bool | collision,
|  | bool | distance
| ) |  |
| virtual

Add collision objects of a device as obstacles to the list.

Parameters

  device | the Device to be added.
  collision | whether collision checking should be performed for this object.
  distance | whether distance computation should be performed for this object.

## ◆ addObstacle() [3/4]

virtual void hpp::core::ProblemSolver::addObstacle | ( | const std::string & | name,
|  | const CollisionGeometryPtr_t & | inObject,
|  | const Transform3s & | pose,
|  | bool | collision,
|  | bool | distance
| ) |  |
| virtual

Add obstacle to the list.

Parameters

  inObject | a new object.
  pose | the object pose.
  collision | whether collision checking should be performed for this object.
  distance | whether distance computation should be performed for this object.

## ◆ addObstacle() [4/4]

virtual void hpp::core::ProblemSolver::addObstacle | ( | const std::string & | name,
|  | FclCollisionObject & | inObject,
|  | bool | collision,
|  | bool | distance
| ) |  |
| virtual

Add obstacle to the list.

Parameters

  inObject | a new object.
  collision | whether collision checking should be performed for this object.
  distance | whether distance computation should be performed for this object.

## ◆ addPath()

std::size_t hpp::core::ProblemSolver::addPath | ( | const PathVectorPtr_t & | path | ) |
| inline

Add a path.

## ◆ addPathOptimizer()

void hpp::core::ProblemSolver::addPathOptimizer | ( | const std::string & | type | ) |

Add a path optimizer in the vector

Parameters

  name | of the type of path optimizer that should be added

## ◆ clearConfigValidations()

void hpp::core::ProblemSolver::clearConfigValidations | ( |  | ) |

## ◆ clearPathOptimizers()

void hpp::core::ProblemSolver::clearPathOptimizers | ( |  | ) |

Clear the vector of path optimizers.

## ◆ collisionObstacles()

const ObjectStdVector_t & hpp::core::ProblemSolver::collisionObstacles | ( |  | ) | const

Local vector of objects considered for collision detection.

## ◆ comparisonType() [1/3]

ComparisonTypes_t hpp::core::ProblemSolver::comparisonType | ( | const std::string & | name | ) | const

## ◆ comparisonType() [2/3]

void hpp::core::ProblemSolver::comparisonType | ( | const std::string & | name,
|  | const ComparisonType & | type
| ) |  |

## ◆ comparisonType() [3/3]

void hpp::core::ProblemSolver::comparisonType | ( | const std::string & | name,
|  | const ComparisonTypes_t | types
| ) |  |

Set the comparison types of a constraint.

Parameters

  name | name of the differentiable function.

## ◆ computeValueAndJacobian()

void hpp::core::ProblemSolver::computeValueAndJacobian | ( | const Configuration_t & | configuration,
|  | vector_t & | value,
|  | matrix_t & | jacobian
| ) |  | const

Compute value and Jacobian of numerical constraints

Parameters

  configuration | input configuration

Return values

  value | values of the numerical constraints stacked in a unique vector,
  jacobian | Jacobian of the numerical constraints stacked in a unique matrix.

Columns of the Jacobian corresponding to locked joints are omitted, columns corresponding to passive dofs are set to 0.

## ◆ configurationShooterType() [1/2]

const std::string & hpp::core::ProblemSolver::configurationShooterType | ( |  | ) | const
| inline

## ◆ configurationShooterType() [2/2]

void hpp::core::ProblemSolver::configurationShooterType | ( | const std::string & | type | ) |

Set configuration shooter type.

## ◆ configValidationTypes()

const ConfigValidationTypes_t hpp::core::ProblemSolver::configValidationTypes | ( |  | ) |
| inline

Get config validation current types.

## ◆ constraints()

const ConstraintSetPtr_t & hpp::core::ProblemSolver::constraints | ( |  | ) | const
| inline

Get constraint set.

## ◆ create()

static ProblemSolverPtr_t hpp::core::ProblemSolver::create | ( |  | ) |
| static

Create instance and return pointer.

## ◆ createPathOptimizers()

void hpp::core::ProblemSolver::createPathOptimizers | ( |  | ) |

Create Path optimizer if needed

If a path optimizer is already set, do nothing. Type of optimizer is determined by method selectPathOptimizer.

## ◆ createRobot()

DevicePtr_t hpp::core::ProblemSolver::createRobot | ( | const std::string & | name | ) |

Create a robot of a type defined by method setRobotType

Parameters

  name | name of the robot

Robot is stored in problemSolver.

## ◆ cutObstacle()

void hpp::core::ProblemSolver::cutObstacle | ( | const std::string & | name,
|  | const coal::AABB & | aabb
| ) |  |

Extract from the obstacle the part that can collide with aabb

Warning
  the obstacle is removed if there are not possible collision.

## ◆ directPath()

bool hpp::core::ProblemSolver::directPath | ( | ConfigurationIn_t | start,
|  | ConfigurationIn_t | end,
|  | bool | validate,
|  | std::size_t & | pathId,
|  | std::string & | report
| ) |  |

Make direct connection between two configurations

Parameters

  start,end | the configurations to link.
  validate | whether path should be validated. If true, path validation is called and only valid part of path is inserted in the path vector.

Return values

  pathId | Id of the path that is inserted in the path vector,
  report | Reason for non validation if relevant. return false if direct path is not fully valid

Note
  If path is only partly valid, valid part starting at start configuration is inserted in path vector.

## ◆ distanceBetweenObjects()

const DistanceBetweenObjectsPtr_t & hpp::core::ProblemSolver::distanceBetweenObjects | ( |  | ) | const
| inline

Return list of pair of distance computations.

## ◆ distanceObstacles()

const ObjectStdVector_t & hpp::core::ProblemSolver::distanceObstacles | ( |  | ) | const

Local vector of objects considered for distance computation.

## ◆ distanceType() [1/2]

const std::string & hpp::core::ProblemSolver::distanceType | ( |  | ) | const
| inline

## ◆ distanceType() [2/2]

void hpp::core::ProblemSolver::distanceType | ( | const std::string & | type | ) |

Set distance type.

## ◆ erasePath()

void hpp::core::ProblemSolver::erasePath | ( | std::size_t | pathId | ) |
| inline

Erase a path.

## ◆ errorThreshold() [1/2]

value_type hpp::core::ProblemSolver::errorThreshold | ( |  | ) | const
| inline

Get errorimal number of threshold in config projector.

## ◆ errorThreshold() [2/2]

void hpp::core::ProblemSolver::errorThreshold | ( | const value_type & | threshold | ) |

Set error threshold in config projector.

## ◆ executeOneStep()

virtual bool hpp::core::ProblemSolver::executeOneStep | ( |  | ) |
| virtual

Execute one step of the planner.

Returns
  the return value of PathPlanner::pathExists of the selected planner.

Note
  This won't check if a solution has been found before doing one step. The decision to stop planning is let to the user.

## ◆ filterCollisionPairs()

void hpp::core::ProblemSolver::filterCollisionPairs | ( |  | ) |

Build matrix of relative motions between joints

Call Problem::filterCollisionPairs.

## ◆ finishSolveStepByStep()

virtual void hpp::core::ProblemSolver::finishSolveStepByStep | ( |  | ) |
| virtual

Finish the solving procedure The path optimizer is not called

## ◆ getTimeOutPathPlanning()

double hpp::core::ProblemSolver::getTimeOutPathPlanning | ( |  | ) |
| inline

set time out for the path planning ( in seconds)

## ◆ goalConfigs()

const Configurations_t & hpp::core::ProblemSolver::goalConfigs | ( |  | ) | const

Get number of goal configuration.

## ◆ initConfig() [1/2]

const Configuration_t & hpp::core::ProblemSolver::initConfig | ( |  | ) | const
| inline

Get shared pointer to initial configuration.

## ◆ initConfig() [2/2]

virtual void hpp::core::ProblemSolver::initConfig | ( | ConfigurationIn_t | config | ) |
| virtual

Set initial configuration.

## ◆ initConfigValidation()

void hpp::core::ProblemSolver::initConfigValidation | ( |  | ) |

Set config validation by calling config validation factories.

## ◆ initDistance()

void hpp::core::ProblemSolver::initDistance | ( |  | ) |

Initialize distance

Set distance by calling the distance factory

## ◆ initializeProblem()

virtual void hpp::core::ProblemSolver::initializeProblem | ( | ProblemPtr_t | problem | ) |
| protectedvirtual

Initialize the new problem

Parameters

  problem | is inserted in the ProblemSolver and initialized.

Note
  The previous Problem, if any, is not deleted. The function should be called when creating Problem object, in resetProblem() and all reimplementation in inherited class.

## ◆ initPathProjector()

void hpp::core::ProblemSolver::initPathProjector | ( |  | ) |

Initialize path projector

Set path projector by calling path projector factory

## ◆ initPathValidation()

void hpp::core::ProblemSolver::initPathValidation | ( |  | ) |

Set path validation by calling path validation factory.

## ◆ initProblemTarget()

virtual void hpp::core::ProblemSolver::initProblemTarget | ( |  | ) |
| virtual

Initialize the problem target by calling the path validation factory.

## ◆ initSteeringMethod()

void hpp::core::ProblemSolver::initSteeringMethod | ( |  | ) |

Initialize steering method

Set steering method by calling the steering method factory

## ◆ initValidations()

void hpp::core::ProblemSolver::initValidations | ( |  | ) |

Initialize the config and path validations and add the obstacles.

## ◆ interrupt()

void hpp::core::ProblemSolver::interrupt | ( |  | ) |

Interrupt path planning and path optimization.

## ◆ maxIterPathPlanning() [1/2]

size_type hpp::core::ProblemSolver::maxIterPathPlanning | ( |  | ) | const
| inline

Get maximal number of iterations in config projector.

## ◆ maxIterPathPlanning() [2/2]

void hpp::core::ProblemSolver::maxIterPathPlanning | ( | size_type | iterations | ) |

Set maximal number of iterations in config projector.

## ◆ maxIterProjection() [1/2]

size_type hpp::core::ProblemSolver::maxIterProjection | ( |  | ) | const
| inline

Get maximal number of iterations in config projector.

## ◆ maxIterProjection() [2/2]

void hpp::core::ProblemSolver::maxIterProjection | ( | size_type | iterations | ) |

Set maximal number of iterations in config projector.

## ◆ numericalConstraint()

constraints::ImplicitPtr_t hpp::core::ProblemSolver::numericalConstraint | ( | const std::string & | name | ) |
| inline

Get constraint with given name.

## ◆ obstacle()

CollisionObjectPtr_t hpp::core::ProblemSolver::obstacle | ( | const std::string & | name | ) | const

Get obstacle by name Throws if obstacle does not exists.

## ◆ obstacleFramePosition()

const Transform3s & hpp::core::ProblemSolver::obstacleFramePosition | ( | const std::string & | name | ) | const

Get obstacle frame position by name Throws if obstacle frame does not exists.

## ◆ obstacleGeomData()

pinocchio::GeomDataPtr_t hpp::core::ProblemSolver::obstacleGeomData | ( |  | ) | const
| inline

## ◆ obstacleGeomModel()

pinocchio::GeomModelPtr_t hpp::core::ProblemSolver::obstacleGeomModel | ( |  | ) | const
| inline

## ◆ obstacleNames()

std::list< std::string > hpp::core::ProblemSolver::obstacleNames | ( | bool | collision,
|  | bool | distance
| ) |  | const

Get list of obstacle names

Parameters

  collision | whether to return collision obstacle names
  distance | whether to return distance obstacle names

Returns
  list of obstacle names

## ◆ optimizePath()

void hpp::core::ProblemSolver::optimizePath | ( | PathVectorPtr_t | path | ) |

Optimize path

Parameters

  path | path to optimize Build vector of path optimizers if needed

Note
  each intermediate optimization output is stored in this object.

## ◆ pathOptimizer()

const PathOptimizerPtr_t & hpp::core::ProblemSolver::pathOptimizer | ( | std::size_t | rank | ) | const
| inline

Get path optimizer at given rank.

## ◆ pathOptimizerTypes()

const PathOptimizerTypes_t & hpp::core::ProblemSolver::pathOptimizerTypes | ( |  | ) | const
| inline

## ◆ pathPlanner()

const PathPlannerPtr_t & hpp::core::ProblemSolver::pathPlanner | ( |  | ) | const
| inline

Get path planner.

## ◆ pathPlannerType() [1/2]

const std::string & hpp::core::ProblemSolver::pathPlannerType | ( |  | ) | const
| inline

## ◆ pathPlannerType() [2/2]

virtual void hpp::core::ProblemSolver::pathPlannerType | ( | const std::string & | type | ) |
| virtual

Set path planner type.

## ◆ pathProjectorType() [1/2]

void hpp::core::ProblemSolver::pathProjectorType | ( | const std::string & | type,
|  | const value_type & | step
| ) |  |

Set path projector method

Parameters

  type | name of new path validation method
  step | discontinuity tolerance

## ◆ pathProjectorType() [2/2]

const std::string & hpp::core::ProblemSolver::pathProjectorType | ( | value_type & | tolerance | ) | const
| inline

Get path projector current type and get tolerance.

## ◆ paths()

const PathVectors_t & hpp::core::ProblemSolver::paths | ( |  | ) | const
| inline

Return vector of paths.

## ◆ pathValidationType() [1/2]

virtual void hpp::core::ProblemSolver::pathValidationType | ( | const std::string & | type,
|  | const value_type & | tolerance
| ) |  |
| virtual

Set path validation method

Parameters

  type | name of new path validation method
  tolerance | acceptable penetration for path validation Path validation methods are used to validate edges in path planning path optimization methods.

## ◆ pathValidationType() [2/2]

const std::string & hpp::core::ProblemSolver::pathValidationType | ( | value_type & | tolerance | ) | const
| inline

## ◆ prepareSolveStepByStep()

virtual bool hpp::core::ProblemSolver::prepareSolveStepByStep | ( |  | ) |
| virtual

Prepare the solver for a step by step planning. and try to make direct connections (call PathPlanner::tryDirectPath)

Returns
  the return value of PathPlanner::pathExists

## ◆ problem() [1/2]

ProblemPtr_t hpp::core::ProblemSolver::problem | ( |  | ) |
| inline

Get pointer to problem.

## ◆ problem() [2/2]

void hpp::core::ProblemSolver::problem | ( | ProblemPtr_t | problem | ) |
| protected

Set pointer to problem.

## ◆ removeObstacle()

virtual void hpp::core::ProblemSolver::removeObstacle | ( | const std::string & | name | ) |
| virtual

Remove obstacle from the list.

Parameters

  name | name of the obstacle

## ◆ removeObstacleFromJoint()

void hpp::core::ProblemSolver::removeObstacleFromJoint | ( | const std::string & | jointName,
|  | const std::string & | obstacleName
| ) |  |

Remove collision pair between a joint and an obstacle

Parameters

  jointName | name of the joint,
  obstacleName | name of the obstacle

## ◆ resetConstraints()

virtual void hpp::core::ProblemSolver::resetConstraints | ( |  | ) |
| virtual

Reset constraint set.

## ◆ resetGoalConfigs()

void hpp::core::ProblemSolver::resetGoalConfigs | ( |  | ) |

Reset the set of goal configurations.

## ◆ resetGoalConstraints()

void hpp::core::ProblemSolver::resetGoalConstraints | ( |  | ) |

Stop defining the goal of path planning as a set of constraints.

## ◆ resetProblem()

virtual void hpp::core::ProblemSolver::resetProblem | ( |  | ) |
| virtual

Create new problem.

## ◆ resetRoadmap()

virtual void hpp::core::ProblemSolver::resetRoadmap | ( |  | ) |
| virtual

Reset the roadmap.

Note
  When joints bounds are changed, the roadmap must be reset because the kd tree must be resized.

## ◆ roadmap() [1/2]

const RoadmapPtr_t & hpp::core::ProblemSolver::roadmap | ( |  | ) | const
| inline

## ◆ roadmap() [2/2]

void hpp::core::ProblemSolver::roadmap | ( | const RoadmapPtr_t & | roadmap | ) |
| inline

Set the roadmap.

## ◆ robot() [1/2]

const DevicePtr_t & hpp::core::ProblemSolver::robot | ( |  | ) | const

Get robot.

## ◆ robot() [2/2]

virtual void hpp::core::ProblemSolver::robot | ( | const DevicePtr_t & | robot | ) |
| virtual

Set robot.

## ◆ robotType() [1/2]

const std::string & hpp::core::ProblemSolver::robotType | ( |  | ) | const

Get robot type.

## ◆ robotType() [2/2]

void hpp::core::ProblemSolver::robotType | ( | const std::string & | type | ) |

Set robot type

Parameters

  type | type of the robots that will be created later

## ◆ setGoalConstraints()

void hpp::core::ProblemSolver::setGoalConstraints | ( | const NumericalConstraints_t & | constraints | ) |

Set goal of path planning as a set of constraints.

## ◆ setTimeOutPathPlanning()

void hpp::core::ProblemSolver::setTimeOutPathPlanning | ( | double | timeOut | ) |
| inline

set time out for the path planning ( in seconds)

## ◆ solve()

virtual void hpp::core::ProblemSolver::solve | ( |  | ) |
| virtual

Set and solve the problem.

## ◆ steeringMethodType() [1/2]

const std::string & hpp::core::ProblemSolver::steeringMethodType | ( |  | ) | const
| inline

## ◆ steeringMethodType() [2/2]

void hpp::core::ProblemSolver::steeringMethodType | ( | const std::string & | type | ) |

Set steering method type.

## Member Data Documentation

## ◆ affordanceConfigs

Container<AffordanceConfig_t> hpp::core::ProblemSolver::affordanceConfigs

Container of AffordanceConfig_t.

## ◆ affordanceObjects

Container<AffordanceObjects_t> hpp::core::ProblemSolver::affordanceObjects

Container of AffordanceObjects_t.

## ◆ centerOfMassComputations

Container<CenterOfMassComputationPtr_t> hpp::core::ProblemSolver::centerOfMassComputations

Container of CenterOfMassComputation.

## ◆ configurationShooters

Container<ConfigurationShooterBuilder_t> hpp::core::ProblemSolver::configurationShooters

Container of static method that creates a ConfigurationShooter with a robot as input

## ◆ configValidations

Container<ConfigValidationBuilder_t> hpp::core::ProblemSolver::configValidations

Container of static method that creates a ConfigValidation with a robot as input.

## ◆ constraints_

ConstraintSetPtr_t hpp::core::ProblemSolver::constraints_
| protected

Store constraints until call to solve.

## ◆ distances

Container<DistanceBuilder_t> hpp::core::ProblemSolver::distances

Container of static method that creates a Distance with problem as input

## ◆ jointAndShapes

Container<JointAndShapes_t> hpp::core::ProblemSolver::jointAndShapes

Container of JointAndShapes_t.

## ◆ lockedJoints

Member_lockedJoints_in_class_ProblemSolver_has_been_removed_use_member_numericalConstraints_instead hpp::core::ProblemSolver::lockedJoints

member lockedJoints has been removed. LockedJointPtr_t instances are now stored with constraints::ImplicitPtr_t in member numericalConstraints.

## ◆ numericalConstraints

Container<constraints::ImplicitPtr_t> hpp::core::ProblemSolver::numericalConstraints

Container of constraints::Implicit.

## ◆ passiveDofs

Container<segments_t> hpp::core::ProblemSolver::passiveDofs

Container of passive DoFs (as segments_t)

## ◆ pathOptimizers

Container<PathOptimizerBuilder_t> hpp::core::ProblemSolver::pathOptimizers

Container of static method that creates a PathOptimizer with a problem as input

## ◆ pathPlanner_

PathPlannerPtr_t hpp::core::ProblemSolver::pathPlanner_
| protected

## ◆ pathPlanners

Container<PathPlannerBuilder_t> hpp::core::ProblemSolver::pathPlanners

Container of static method that creates a PathPlanner with a problem and a roadmap as input

## ◆ pathPlannerType_

std::string hpp::core::ProblemSolver::pathPlannerType_
| protected

Path planner.

## ◆ pathProjectors

Container<PathProjectorBuilder_t> hpp::core::ProblemSolver::pathProjectors

Container of static method that creates a PathProjection with a problem and a tolerance as input.

## ◆ pathProjectorTolerance_

value_type hpp::core::ProblemSolver::pathProjectorTolerance_
| protected

Tolerance of path projector.

## ◆ pathProjectorType_

std::string hpp::core::ProblemSolver::pathProjectorType_
| protected

Path projector method.

## ◆ paths_

PathVectors_t hpp::core::ProblemSolver::paths_
| protected

Paths.

## ◆ pathValidations

Container<PathValidationBuilder_t> hpp::core::ProblemSolver::pathValidations

Container of static method that creates a PathValidation with a robot and a tolerance as input.

## ◆ problem_

ProblemPtr_t hpp::core::ProblemSolver::problem_
| protected

Problem.

## ◆ roadmap_

RoadmapPtr_t hpp::core::ProblemSolver::roadmap_
| protected

Store roadmap.

## ◆ robot_

DevicePtr_t hpp::core::ProblemSolver::robot_
| protected

Robot.

## ◆ robots

Container<RobotBuilder_t> hpp::core::ProblemSolver::robots

Container of static method that creates a Robot with string as input

## ◆ steeringMethods

Container<SteeringMethodBuilder_t> hpp::core::ProblemSolver::steeringMethods

Container of static method that creates a SteeringMethod with a problem as input

## ◆ target_

ProblemTargetPtr_t hpp::core::ProblemSolver::target_
| protected

Shared pointer to the problem target.

The documentation for this class was generated from the following file:

- include/hpp/core/problem-solver.hh