hpp-rbprm  4.10.0
Implementation of RB-PRM planner using hpp.
contact_generation.hh
Go to the documentation of this file.
1 // This file is part of hpp-rbprm.
6 // hpp-rbprm is free software: you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation, either version
9 // 3 of the License, or (at your option) any later version.
10 //
11 // hpp-wholebody-step-planner is distributed in the hope that it will be
12 // useful, but WITHOUT ANY WARRANTY; without even the implied warranty
13 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // General Lesser Public License for more details. You should have
15 // received a copy of the GNU Lesser General Public License along with
16 // hpp-wholebody-step-planner. If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef HPP_RBPRM_CONTACT_GENERATION_HH
20 # define HPP_RBPRM_CONTACT_GENERATION_HH
21 
22 # include <hpp/rbprm/rbprm-state.hh>
25 # include <queue>
26 
27 namespace hpp {
28 namespace rbprm {
29 namespace contact{
30 
31 typedef std::queue<hpp::rbprm::State> Q_State;
32 typedef std::pair <hpp::rbprm::State, std::vector<std::string> > ContactState;
33 typedef std::queue<ContactState> T_ContactState;
34 
36 {
38  pinocchio::ConfigurationIn_t configuration,
39  const affMap_t& affordances,
40  const std::map<std::string, std::vector<std::string> >& affFilters,
41  const double robustnessTreshold = 0,
42  const std::size_t maxContactBreaks = 1,
43  const std::size_t maxContactCreations = 1,
44  const bool checkStabilityMaintain = false,
45  const bool checkStabilityGenerate = true,
46  const fcl::Vec3f& direction = fcl::Vec3f(0,0,1),
47  const fcl::Vec3f& acceleration = fcl::Vec3f(0,0,0),
48  const bool contactIfFails = false,
49  const bool stableForOneContact = false,
50  const core::PathConstPtr_t& comPath=core::PathConstPtr_t(),
51  const double currentPathId=0);
58  const fcl::Vec3f acceleration_;
59  const fcl::Vec3f direction_;
60  const double robustnessTreshold_;
61  const std::size_t maxContactBreaks_;
62  const std::size_t maxContactCreations_;
64  const std::map<std::string, std::vector<std::string> >& affFilters_;
68  const core::PathConstPtr_t comPath_;
69  const double currentPathId_;
72  const bool maximiseContacts_;
73  const bool accept_unreachable_;
74  const bool tryQuasiStatic_;
76 
77 };
78 
79 
80 std::vector<hpp::pinocchio::CollisionObjectPtr_t> HPP_RBPRM_DLLAPI getAffObjectsForLimb(const std::string& limb,
81  const affMap_t& affordances, const std::map<std::string, std::vector<std::string> >& affFilters);
82 
91 Q_State maintain_contacts_combinatorial(const hpp::rbprm::State& currentState, const std::size_t maxBrokenContacts=1);
92 
100 T_ContactState gen_contacts_combinatorial(const std::vector<std::string>& freeEffectors, const State& previous, const std::size_t maxCreatedContacts, const bool maximiseContacts=false);
101 
109 
114 projection::ProjectionReport generate_contact(const ContactGenHelper& contactGenHelper, const std::string& limb, sampling::HeuristicParam &params,
115  const sampling::heuristic evaluate = 0);
116 
123 
129  } // namespace projection
130  } // namespace rbprm
131 } // namespace hpp
132 #endif // HPP_RBPRM_CONTACT_GENERATION_HH
hpp::rbprm::contact::ContactGenHelper::affordances_
const affMap_t & affordances_
Definition: contact_generation.hh:63
hpp::rbprm::contact::ContactGenHelper::tryQuasiStatic_
const bool tryQuasiStatic_
Definition: contact_generation.hh:74
hpp::rbprm::contact::ContactGenHelper::comPath_
const core::PathConstPtr_t comPath_
Definition: contact_generation.hh:68
hpp::rbprm::contact::generate_contact
projection::ProjectionReport generate_contact(const ContactGenHelper &contactGenHelper, const std::string &limb, sampling::HeuristicParam &params, const sampling::heuristic evaluate=0)
hpp::rbprm::contact::ContactGenHelper::fullBody_
hpp::rbprm::RbPrmFullBodyPtr_t fullBody_
Definition: contact_generation.hh:53
hpp::rbprm::contact::ContactGenHelper::previousState_
const hpp::rbprm::State previousState_
Definition: contact_generation.hh:54
rbprm-fullbody.hh
hpp::rbprm::contact::ContactGenHelper::stableForOneContact_
const bool stableForOneContact_
Definition: contact_generation.hh:57
hpp::rbprm::contact::ContactState
std::pair< hpp::rbprm::State, std::vector< std::string > > ContactState
Definition: contact_generation.hh:32
hpp::rbprm::contact::ContactGenHelper::~ContactGenHelper
~ContactGenHelper()
Definition: contact_generation.hh:52
hpp::rbprm::contact::ContactGenHelper
Definition: contact_generation.hh:35
hpp::rbprm::contact::ContactGenHelper::candidates_
Q_State candidates_
Definition: contact_generation.hh:67
hpp::rbprm::contact::ContactGenHelper::checkStabilityMaintain_
const bool checkStabilityMaintain_
Definition: contact_generation.hh:55
rbprm-state.hh
hpp::rbprm::sampling::HeuristicParam
Defines a parameters set for the ZMP-based heuristic.
Definition: heuristic-tools.hh:13
hpp::rbprm::contact::ContactGenHelper::direction_
const fcl::Vec3f direction_
Definition: contact_generation.hh:59
hpp::rbprm::contact::ContactGenHelper::currentPathId_
const double currentPathId_
Definition: contact_generation.hh:69
hpp::rbprm::contact::ContactGenHelper::ContactGenHelper
ContactGenHelper(RbPrmFullBodyPtr_t fb, const State &ps, pinocchio::ConfigurationIn_t configuration, const affMap_t &affordances, const std::map< std::string, std::vector< std::string > > &affFilters, const double robustnessTreshold=0, const std::size_t maxContactBreaks=1, const std::size_t maxContactCreations=1, const bool checkStabilityMaintain=false, const bool checkStabilityGenerate=true, const fcl::Vec3f &direction=fcl::Vec3f(0, 0, 1), const fcl::Vec3f &acceleration=fcl::Vec3f(0, 0, 0), const bool contactIfFails=false, const bool stableForOneContact=false, const core::PathConstPtr_t &comPath=core::PathConstPtr_t(), const double currentPathId=0)
hpp::rbprm::contact::ContactGenHelper::acceleration_
const fcl::Vec3f acceleration_
Definition: contact_generation.hh:58
hpp::rbprm::sampling::evaluate
boost::function< double(const SampleDB &sampleDB, const sampling::Sample &sample) > evaluate
Definition: sample-db.hh:75
hpp::rbprm::contact::gen_contacts
projection::ProjectionReport gen_contacts(ContactGenHelper &contactGenHelper)
hpp::rbprm::contact::Q_State
std::queue< hpp::rbprm::State > Q_State
Definition: contact_generation.hh:31
hpp::rbprm::contact::getAffObjectsForLimb
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)
hpp::rbprm::contact::ContactGenHelper::workingState_
hpp::rbprm::State workingState_
Definition: contact_generation.hh:65
hpp::rbprm::contact::ContactGenHelper::quasiStatic_
bool quasiStatic_
Definition: contact_generation.hh:70
hpp::rbprm::contact::maintain_contacts
projection::ProjectionReport maintain_contacts(ContactGenHelper &contactGenHelper)
hpp::rbprm::contact::T_ContactState
std::queue< ContactState > T_ContactState
Definition: contact_generation.hh:33
hpp::rbprm::contact::ContactGenHelper::reachabilityPointPerPhases_
const int reachabilityPointPerPhases_
Definition: contact_generation.hh:75
projection.hh
hpp::rbprm::contact::ContactGenHelper::maxContactCreations_
const std::size_t maxContactCreations_
Definition: contact_generation.hh:62
hpp
Definition: algorithm.hh:27
hpp::rbprm::contact::ContactGenHelper::contactIfFails_
bool contactIfFails_
Definition: contact_generation.hh:56
hpp::rbprm::contact::ContactGenHelper::accept_unreachable_
const bool accept_unreachable_
Definition: contact_generation.hh:73
hpp::rbprm::sampling::heuristic
double(* heuristic)(const sampling::Sample &sample, const Eigen::Vector3d &direction, const Eigen::Vector3d &normal, const HeuristicParam &params)
Definition: heuristic.hh:41
hpp::rbprm::contact::gen_contacts_combinatorial
T_ContactState gen_contacts_combinatorial(const std::vector< std::string > &freeEffectors, const State &previous, const std::size_t maxCreatedContacts, const bool maximiseContacts=false)
hpp::rbprm::contact::ContactGenHelper::robustnessTreshold_
const double robustnessTreshold_
Definition: contact_generation.hh:60
hpp::rbprm::State
Definition: rbprm-state.hh:40
hpp::rbprm::RbPrmFullBodyPtr_t
boost::shared_ptr< RbPrmFullBody > RbPrmFullBodyPtr_t
Definition: kinematics_constraints.hh:12
hpp::rbprm::contact::ContactGenHelper::testReachability_
bool testReachability_
Definition: contact_generation.hh:71
hpp::rbprm::freeEffectors
HPP_RBPRM_DLLAPI std::vector< std::string > freeEffectors(const State &state, Iter start, Iter end)
Definition: rbprm-state.hh:129
hpp::rbprm::contact::ContactGenHelper::maximiseContacts_
const bool maximiseContacts_
Definition: contact_generation.hh:72
hpp::rbprm::contact::ContactGenHelper::maxContactBreaks_
const std::size_t maxContactBreaks_
Definition: contact_generation.hh:61
hpp::rbprm::contact::ContactGenHelper::checkStabilityGenerate_
bool checkStabilityGenerate_
Definition: contact_generation.hh:66
hpp::rbprm::contact::repositionContacts
projection::ProjectionReport repositionContacts(ContactGenHelper &contactGenHelper)
hpp::rbprm::affMap_t
hpp::core::Container< hpp::core::AffordanceObjects_t > affMap_t
Definition: rbprm-fullbody.hh:47
hpp::rbprm::contact::maintain_contacts_combinatorial
Q_State maintain_contacts_combinatorial(const hpp::rbprm::State &currentState, const std::size_t maxBrokenContacts=1)
hpp::rbprm::projection::ProjectionReport
Definition: reports.hh:38
hpp::rbprm::contact::ContactGenHelper::affFilters_
const std::map< std::string, std::vector< std::string > > & affFilters_
Definition: contact_generation.hh:64
HPP_RBPRM_DLLAPI
#define HPP_RBPRM_DLLAPI
Definition: config.hh:64