hpp-rbprm 4.15.1
Implementation of RB-PRM planner using hpp.
Loading...
Searching...
No Matches
hpp::rbprm::contact Namespace Reference

Classes

struct  ContactGenHelper
 
struct  ContactReport
 

Typedefs

typedef std::queue< hpp::rbprm::StateQ_State
 
typedef std::pair< hpp::rbprm::State, std::vector< std::string > > ContactState
 
typedef std::queue< ContactStateT_ContactState
 

Functions

ContactReport HPP_RBPRM_DLLAPI oneStep (ContactGenHelper &helper)
 
hpp::rbprm::State HPP_RBPRM_DLLAPI ComputeContacts (const hpp::rbprm::RbPrmFullBodyPtr_t &body, pinocchio::ConfigurationIn_t configuration, const affMap_t &affordances, const std::map< std::string, std::vector< std::string > > &affFilters, const fcl::Vec3f &direction, const double robustnessTreshold=0, const fcl::Vec3f &acceleration=fcl::Vec3f(0, 0, 0))
 
hpp::rbprm::contact::ContactReport HPP_RBPRM_DLLAPI ComputeContacts (const hpp::rbprm::State &previous, const hpp::rbprm::RbPrmFullBodyPtr_t &body, pinocchio::ConfigurationIn_t configuration, const affMap_t &affordances, const std::map< std::string, std::vector< std::string > > &affFilters, const fcl::Vec3f &direction, const double robustnessTreshold=0, const fcl::Vec3f &acceleration=fcl::Vec3f(0, 0, 0), const core::PathConstPtr_t &comPath=core::PathPtr_t(), const double currentPathId=0, const bool testReachability=true, const bool quasiStatic=false)
 
std::vector< hpp::pinocchio::CollisionObjectPtr_t > HPP_RBPRM_DLLAPI getAffObjectsForLimb (const std::string &limb, const affMap_t &affordances, const std::map< std::string, std::vector< std::string > > &affFilters)
 
Q_State maintain_contacts_combinatorial (const hpp::rbprm::State &currentState, const std::size_t maxBrokenContacts=1)
 
T_ContactState gen_contacts_combinatorial (const std::vector< std::string > &freeEffectors, const State &previous, const std::size_t maxCreatedContacts, const bool maximiseContacts=false)
 
projection::ProjectionReport maintain_contacts (ContactGenHelper &contactGenHelper)
 
projection::ProjectionReport generate_contact (const ContactGenHelper &contactGenHelper, const std::string &limb, sampling::HeuristicParam &params, const sampling::heuristic evaluate=0)
 
projection::ProjectionReport gen_contacts (ContactGenHelper &contactGenHelper)
 
projection::ProjectionReport repositionContacts (ContactGenHelper &contactGenHelper)
 

Typedef Documentation

◆ ContactState

typedef std::pair<hpp::rbprm::State, std::vector<std::string> > hpp::rbprm::contact::ContactState

◆ Q_State

◆ T_ContactState

Function Documentation

◆ ComputeContacts() [1/2]

hpp::rbprm::State HPP_RBPRM_DLLAPI hpp::rbprm::contact::ComputeContacts ( const hpp::rbprm::RbPrmFullBodyPtr_t body,
pinocchio::ConfigurationIn_t  configuration,
const affMap_t affordances,
const std::map< std::string, std::vector< std::string > > &  affFilters,
const fcl::Vec3f &  direction,
const double  robustnessTreshold = 0,
const fcl::Vec3f &  acceleration = fcl::Vec3f(0, 0, 0) 
)

Generates a balanced contact configuration, considering the given current configuration of the robot, and a direction of motion. Typically used to generate a start and / or goal configuration automatically for a planning problem.

Parameters
bodyThe considered FullBody robot for which to generate contacts
configurationCurrent full body configuration.
affordancesthe set of 3D objects to consider for contact creation.
affFiltersa vector of strings determining which affordance types are to be used in generating contacts for each limb.
directionAn estimation of the direction of motion of the character.
robustnessTresholdminimum value of the static equilibrium robustness criterion required to accept the configuration (0 by default).
Returns
a State describing the computed contact configuration, with relevant contact information and balance information.

◆ ComputeContacts() [2/2]

hpp::rbprm::contact::ContactReport HPP_RBPRM_DLLAPI hpp::rbprm::contact::ComputeContacts ( const hpp::rbprm::State previous,
const hpp::rbprm::RbPrmFullBodyPtr_t body,
pinocchio::ConfigurationIn_t  configuration,
const affMap_t affordances,
const std::map< std::string, std::vector< std::string > > &  affFilters,
const fcl::Vec3f &  direction,
const double  robustnessTreshold = 0,
const fcl::Vec3f &  acceleration = fcl::Vec3f(0, 0, 0),
const core::PathConstPtr_t &  comPath = core::PathPtr_t(),
const double  currentPathId = 0,
const bool  testReachability = true,
const bool  quasiStatic = false 
)

Generates a balanced contact configuration, considering the given current configuration of the robot, and a previous, balanced configuration. Existing contacts are maintained provided joint limits and balance remains respected. Otherwise a contact generation strategy is employed.

Parameters
previousThe previously computed State of the robot
bodyThe considered FullBody robot for which to generate contacts
configurationCurrent full body configuration.
affordancesthe set of 3D objects to consider for contact creation.
affFiltersa vector of strings determining which affordance types are to be used in generating contacts for each limb.
directionAn estimation of the direction of motion of the character.
robustnessTresholdminimum value of the static equilibrium robustness criterion required to accept the configuration (0 by default).
accelerationacceleration on the CoM estimated by the planning
comPath: path found by the planning
currentPathId: timing inside comPath such that comPath(currentPathId) == configuration (for the freeflyer DOFs)
Returns
a State describing the computed contact configuration, with relevant contact information and balance information.

◆ gen_contacts()

projection::ProjectionReport hpp::rbprm::contact::gen_contacts ( ContactGenHelper contactGenHelper)

Given a combinatorial of possible contacts, generate the first "valid" contact configuration, that is the first contact configuration is contact and equilibrium.

Parameters
ContactGenHelperparametrization of the planner
Returns
the best candidate wrt the priority in the list and the contact order

◆ gen_contacts_combinatorial()

T_ContactState hpp::rbprm::contact::gen_contacts_combinatorial ( const std::vector< std::string > &  freeEffectors,
const State previous,
const std::size_t  maxCreatedContacts,
const bool  maximiseContacts = false 
)

Generates all potentially valid cases of valid contact creation by removing the top state of the priority stack

Parameters
freeEffectorslist of free candidates
previouscurrent state of the robot
maxCreatedContactsmax number of contacts that can be created in the process
Returns
a QUEUE of contact states candidates for maintenance, ordered by number of contacts broken and priority in the list wrt the contact order

◆ generate_contact()

projection::ProjectionReport hpp::rbprm::contact::generate_contact ( const ContactGenHelper contactGenHelper,
const std::string &  limb,
sampling::HeuristicParam params,
const sampling::heuristic  evaluate = 0 
)

Given a current state and an effector, tries to generate a contact configuration.

Parameters
ContactGenHelperparametrization of the planner
limbthe limb to create a contact with
Returns
the best candidate wrt the priority in the list and the contact order

◆ getAffObjectsForLimb()

std::vector< hpp::pinocchio::CollisionObjectPtr_t > HPP_RBPRM_DLLAPI hpp::rbprm::contact::getAffObjectsForLimb ( const std::string &  limb,
const affMap_t affordances,
const std::map< std::string, std::vector< std::string > > &  affFilters 
)

◆ maintain_contacts()

projection::ProjectionReport hpp::rbprm::contact::maintain_contacts ( ContactGenHelper contactGenHelper)

Given a combinatorial of possible contacts, generate the first "valid" configuration, that is the first kinematic configuration that removes the minimum number of contacts and is collision free.

Parameters
ContactGenHelperparametrization of the planner
Returns
the best candidate wrt the priority in the list and the contact order

◆ maintain_contacts_combinatorial()

Q_State hpp::rbprm::contact::maintain_contacts_combinatorial ( const hpp::rbprm::State currentState,
const std::size_t  maxBrokenContacts = 1 
)

Generates all potentially valid cases of valid contact maintenance given a previous configuration.

Parameters
fullBodytarget Robot
target,desiredroot position
currentStatecurrent state of the robot (configuration and contacts)
maxBrokenContactsmax number of contacts that can be broken in the process
Returns
a queue of contact states candidates for maintenance, ordered by number of contacts broken and priority in the list wrt the contact order

◆ oneStep()

ContactReport HPP_RBPRM_DLLAPI hpp::rbprm::contact::oneStep ( ContactGenHelper helper)

Generates one step of the contact planner. First, generates all possible cases of contact maintenance (feasible). Starting with the preferred case, generates all admissible contact combinatorial. Again starting with the preferred one, tries to generate a feasible contact. iterates like this until either all solution failed or a feasible contact is found.

Parameters
ContactGenHelperparametrization of the planner
Returns
whether a step was successfully generated

◆ repositionContacts()

projection::ProjectionReport hpp::rbprm::contact::repositionContacts ( ContactGenHelper contactGenHelper)

Tries to reposition one contact of a given state into a new one, more balanced

Parameters
ContactGenHelperparametrization of the planner
Returns
the best candidate wrt the priority in the list and the contact order