hpp-rbprm  4.10.0
Implementation of RB-PRM planner using hpp.
rbprm-validation.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2014 CNRS
3 // Authors: Steve Tonneau
4 //
5 // 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-core 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-core If not, see
17 // <http://www.gnu.org/licenses/>.
18 
19 #ifndef HPP_RBPRM_VALIDATION_HH
20 # define HPP_RBPRM_VALIDATION_HH
21 
22 # include <hpp/core/collision-validation-report.hh>
23 # include <hpp/core/config-validation.hh>
24 # include <hpp/core/collision-validation.hh>
25 # include <hpp/core/problem-solver.hh>
27 # include <hpp/rbprm/rbprm-device.hh>
29 # include <hpp/rbprm/config.hh>
30 
31 namespace hpp {
32  namespace rbprm {
33 
35  typedef boost::shared_ptr <RbPrmValidation> RbPrmValidationPtr_t;
36  typedef std::map<std::string, RbPrmRomValidationPtr_t> T_RomValidation;
37  typedef hpp::core::Container <hpp::core::AffordanceObjects_t> affMap_t;
38 
41 
46  class HPP_RBPRM_DLLAPI RbPrmValidation : public core::CollisionValidation
47  {
48  public:
49  static RbPrmValidationPtr_t create (const pinocchio::RbPrmDevicePtr_t& robot,
50  const std::vector<std::string>& filter = std::vector<std::string>(),
51  const std::map<std::string, std::vector<std::string> >& affFilters =
52  std::map<std::string, std::vector<std::string> >(),
53  const affMap_t & affordances =affMap_t(),
54  const core::ObjectStdVector_t& geometries =
55  core::ObjectStdVector_t());
56 
62  virtual bool validate (const core::Configuration_t& config);
63 
70  virtual bool validate (const core::Configuration_t& config,
71  core::ValidationReportPtr_t& validationReport);
72 
79  virtual bool validate (const core::Configuration_t& config,
80  const std::vector<std::string>& filter);
81 
90  virtual bool validate (const core::Configuration_t& config,
91  core::ValidationReportPtr_t& validationReport,
92  const std::vector<std::string>& filter);
93 
94 
100  virtual void addObstacle (const core::CollisionObjectConstPtr_t& object);
101 
107  virtual void removeObstacleFromJoint
108  (const core::JointPtr_t& joint, const core::CollisionObjectPtr_t& obstacle);
109 
110 
114  virtual void randomnizeCollisionPairs();
115 
120  void computeAllContacts(bool computeAllContacts);
121 
122  private:
129  virtual bool validateTrunk(const core::Configuration_t& config,
130  hpp::core::ValidationReportPtr_t &validationReport);
131 
135  bool validateRoms(const core::Configuration_t& config);
136 
141  bool validateRoms(const core::Configuration_t& config,
142  core::RbprmValidationReportPtr_t &validationReport);
143 
149  bool validateRoms(const core::Configuration_t& config,
150  const std::vector<std::string>& filter);
151 
156  bool validateRoms(const core::Configuration_t& config,
157  const std::vector<std::string>& filter,
158  core::RbprmValidationReportPtr_t &validationReport);
159 
160  public:
162  const core::CollisionValidationPtr_t trunkValidation_;
163  const core::JointBoundValidationPtr_t boundValidation_;
166  std::vector<std::string> defaultFilter_;
167 
168  protected:
170  const std::vector<std::string>& filter,
171  const std::map<std::string,
172  std::vector<std::string> >& affFilters,
173  const affMap_t& affordances,
174  const core::ObjectStdVector_t& geometries);
175 
176 
177  private:
178  core::ValidationReportPtr_t unusedReport_;
179 
180  }; // class RbPrmValidation
182  } // namespace rbprm
183 } // namespace hpp
184 
185 #endif // HPP_RBPRM_VALIDATION_HH
hpp::rbprm::RbPrmValidation::boundValidation_
const core::JointBoundValidationPtr_t boundValidation_
Definition: rbprm-validation.hh:163
hpp::rbprm::RbPrmValidation::defaultFilter_
std::vector< std::string > defaultFilter_
Definition: rbprm-validation.hh:166
rbprm-rom-validation.hh
hpp::rbprm::RbPrmValidation
Definition: rbprm-validation.hh:46
hpp::rbprm::RbPrmValidationPtr_t
boost::shared_ptr< RbPrmValidation > RbPrmValidationPtr_t
Definition: rbprm-validation.hh:34
hpp::rbprm::RbPrmValidation::romValidations_
const T_RomValidation romValidations_
CollisionValidation for the range of motion of the limbs.
Definition: rbprm-validation.hh:165
rbprm-device.hh
hpp
Definition: algorithm.hh:27
hpp::rbprm::RbPrmValidation::trunkValidation_
const core::CollisionValidationPtr_t trunkValidation_
CollisionValidation for the trunk.
Definition: rbprm-validation.hh:162
rbprm-validation-report.hh
hpp::pinocchio::RbPrmDevicePtr_t
boost::shared_ptr< RbPrmDevice > RbPrmDevicePtr_t
Definition: dynamic-validation.hh:27
hpp::rbprm::T_RomValidation
std::map< std::string, RbPrmRomValidationPtr_t > T_RomValidation
Definition: rbprm-validation.hh:36
hpp::core::RbprmValidationReportPtr_t
boost::shared_ptr< RbprmValidationReport > RbprmValidationReportPtr_t
Definition: rbprm-validation-report.hh:29
hpp::rbprm::affMap_t
hpp::core::Container< hpp::core::AffordanceObjects_t > affMap_t
Definition: rbprm-fullbody.hh:47
config.hh
HPP_RBPRM_DLLAPI
#define HPP_RBPRM_DLLAPI
Definition: config.hh:64