hpp-core
4.9.0
Implement basic classes for canonical path planning for kinematic chains.
|
#include <hpp/core/problem.hh>
Public Member Functions | |
Problem () | |
virtual | ~Problem () |
virtual void | checkProblem () const |
Check that problem is well formulated. More... | |
const Parameter & | getParameter (const std::string &name) const |
void | setParameter (const std::string &name, const Parameter &value) |
Problem definition | |
const DevicePtr_t & | robot () const |
return shared pointer to robot. More... | |
const ConfigurationPtr_t & | initConfig () const |
Get shared pointer to initial configuration. More... | |
void | initConfig (const ConfigurationPtr_t &inConfig) |
Set initial configuration. More... | |
void | target (const ProblemTargetPtr_t &target) |
Set the target. More... | |
const ProblemTargetPtr_t & | target () const |
Get the target. More... | |
const Configurations_t & | goalConfigs () const |
Get number of goal configuration. More... | |
void | addGoalConfig (const ConfigurationPtr_t &config) |
Add goal configuration. More... | |
void | resetGoalConfigs () |
Reset the set of goal configurations. More... | |
Steering method and distance function | |
void | steeringMethod (const SteeringMethodPtr_t &sm) |
SteeringMethodPtr_t | steeringMethod () const |
Get steering method. More... | |
void | distance (const DistancePtr_t &distance) |
Set distance between configurations. More... | |
const DistancePtr_t & | distance () const |
Get distance between configuration. More... | |
Configuration validation | |
void | configValidation (const ConfigValidationsPtr_t &configValidations) |
const ConfigValidationsPtr_t & | configValidations () const |
Get configuration validation methods. More... | |
void | resetConfigValidations () |
void | clearConfigValidations () |
void | addConfigValidation (const ConfigValidationPtr_t &configValidation) |
Add a config validation method. More... | |
Path validation | |
Set path validation method | |
virtual void | pathValidation (const PathValidationPtr_t &pathValidation) |
PathValidationPtr_t | pathValidation () const |
Get path validation method. More... | |
Configuration shooter | |
Set configuration shooter method | |
void | configurationShooter (const ConfigurationShooterPtr_t &configurationShooter) |
ConfigurationShooterPtr_t | configurationShooter () const |
Get path validation method. More... | |
Path projector | |
Set path projector method | |
void | pathProjector (const PathProjectorPtr_t &pathProjector) |
PathProjectorPtr_t | pathProjector () const |
Get path projector method. More... | |
Constraints applicable to the robot | |
void | constraints (const ConstraintSetPtr_t &constraints) |
const ConstraintSetPtr_t & | constraints () const |
Get constraint set. More... | |
Obstacles | |
void | addObstacle (const CollisionObjectPtr_t &object) |
void | removeObstacleFromJoint (const JointPtr_t &joint, const CollisionObjectConstPtr_t &obstacle) |
void | filterCollisionPairs () |
const ObjectStdVector_t & | collisionObstacles () const |
Vector of objects considered for collision detection. More... | |
void | collisionObstacles (const ObjectStdVector_t &collisionObstacles) |
Set the vector of objects considered for collision detection. More... | |
Static Public Member Functions | |
static ProblemPtr_t | create (DevicePtr_t robot) |
static void | declareParameter (const ParameterDescription &desc) |
static const Container< ParameterDescription > & | parameterDescriptions () |
Get all the parameter descriptions. More... | |
static const ParameterDescription & | parameterDescription (const std::string &name) |
Access one parameter description. More... | |
Public Attributes | |
Container< Parameter > | parameters |
Protected Member Functions | |
Problem (DevicePtr_t robot) | |
void | init (ProblemWkPtr_t wkPtr) |
Defines a path planning problem for one robot. A path planning problem is defined by
hpp::core::Problem::Problem | ( | ) |
Constructor without argument
|
virtual |
|
protected |
Create a path planning problem.
robot | robot associated to the path planning problem. |
void hpp::core::Problem::addConfigValidation | ( | const ConfigValidationPtr_t & | configValidation | ) |
Add a config validation method.
void hpp::core::Problem::addGoalConfig | ( | const ConfigurationPtr_t & | config | ) |
Add goal configuration.
void hpp::core::Problem::addObstacle | ( | const CollisionObjectPtr_t & | object | ) |
Add obstacle to the list.
object | a new object. |
|
virtual |
Check that problem is well formulated.
void hpp::core::Problem::clearConfigValidations | ( | ) |
Clear the ConfigValidations by calling ConfigValidations::clear
const ObjectStdVector_t& hpp::core::Problem::collisionObstacles | ( | ) | const |
Vector of objects considered for collision detection.
void hpp::core::Problem::collisionObstacles | ( | const ObjectStdVector_t & | collisionObstacles | ) |
Set the vector of objects considered for collision detection.
void hpp::core::Problem::configurationShooter | ( | const ConfigurationShooterPtr_t & | configurationShooter | ) |
|
inline |
Get path validation method.
|
inline |
Set configuration validation methods Before starting tos solve a path planning problem, the initial and goal configurations are checked for validity.
|
inline |
Get configuration validation methods.
|
inline |
Set constraint set
constraints | a set of constraints If problem contains a steering method, constraints are passed to the steering method. |
|
inline |
Get constraint set.
|
static |
Create a path planning problem.
robot | robot associated to the path planning problem. |
|
static |
Declare a parameter In shared library, use the following snippet in your cc file:
|
inline |
Set distance between configurations.
|
inline |
Get distance between configuration.
void hpp::core::Problem::filterCollisionPairs | ( | ) |
Build matrix of relative motions between joints
Loop over constraints in the current constraint set (see Problem::constraints) and for each LockedJoint and each constraints::RelativeTransformation, fill a matrix the column and rows represent joints and the values are the following
|
inline |
Get a parameter named name.
name | of the parameter. |
const Configurations_t& hpp::core::Problem::goalConfigs | ( | ) | const |
Get number of goal configuration.
|
protected |
|
inline |
Get shared pointer to initial configuration.
void hpp::core::Problem::initConfig | ( | const ConfigurationPtr_t & | inConfig | ) |
Set initial configuration.
|
static |
Access one parameter description.
|
static |
Get all the parameter descriptions.
|
inline |
|
inline |
Get path projector method.
|
virtual |
|
inline |
Get path validation method.
void hpp::core::Problem::removeObstacleFromJoint | ( | const JointPtr_t & | joint, |
const CollisionObjectConstPtr_t & | obstacle | ||
) |
Remove a collision pair between a joint and an obstacle
joint | that holds the inner objects, |
obstacle | to remove. |
void hpp::core::Problem::resetConfigValidations | ( | ) |
Reset the ConfigValidations by creating a new ConfigValidations using ConfigValidations::create
void hpp::core::Problem::resetGoalConfigs | ( | ) |
Reset the set of goal configurations.
|
inline |
return shared pointer to robot.
void hpp::core::Problem::setParameter | ( | const std::string & | name, |
const Parameter & | value | ||
) |
Set a parameter named name.
name | of the parameter. |
value | value of the parameter |
std::invalid_argument | if a parameter exists but has a different type. |
|
inline |
Set steering method
sm | steering method. If problem contains constraints they are passed to the steering method. |
|
inline |
Get steering method.
|
inline |
Set the target.
|
inline |
Get the target.