hpp-rbprm  4.10.0
Implementation of RB-PRM planner using hpp.
rbprm-validation-report.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016 CNRS
3 // Authors: Pierre Fernbach
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_REPORT_HH
20 # define HPP_RBPRM_VALIDATION_REPORT_HH
21 
22 # include <hpp/core/validation-report.hh>
23 # include <hpp/core/collision-validation-report.hh>
24 
25 namespace hpp {
26  namespace core {
27 
28  HPP_PREDEF_CLASS(RbprmValidationReport);
29  typedef boost::shared_ptr <RbprmValidationReport> RbprmValidationReportPtr_t;
30 
31 
34 
37  struct HPP_CORE_DLLAPI RbprmValidationReport : public CollisionValidationReport
38  {
40  std::map<std::string,CollisionValidationReportPtr_t> ROMReports; // name ; collision report
41  std::map<std::string,bool> ROMFilters; // name ; true if valid
42 
44  bool romsValid;
45 
47  virtual std::ostream& print (std::ostream& os) const
48  {
49  if(trunkInCollision){
50  os << "Collision between object " << object1->name () << " and " << object2->name ();
51  }
52  if (!romsValid){
53  os << "Rom filters not respected : "<<std::endl;
54  for(std::map<std::string,bool>::const_iterator it = ROMFilters.begin() ; it != ROMFilters.end() ; ++it)
55  {
56  if(! it->second)
57  os << " "<<it->first << std::endl;
58  }
59  }
60  return os;
61  }
62 
63 
64  }; // class RbprmValidationReport
66  } // namespace core
67 } // namespace hpp
68 
69 #endif // HPP_RBPRM__VALIDATION_REPORT_HH
hpp::core::RbprmValidationReport::ROMFilters
std::map< std::string, bool > ROMFilters
Definition: rbprm-validation-report.hh:41
hpp::core::RbprmValidationReport::print
virtual std::ostream & print(std::ostream &os) const
Write report in a stream.
Definition: rbprm-validation-report.hh:47
hpp::core::RbprmValidationReport
Definition: rbprm-validation-report.hh:37
hpp::core::RbprmValidationReport::trunkInCollision
bool trunkInCollision
Definition: rbprm-validation-report.hh:43
hpp
Definition: algorithm.hh:27
hpp::core::HPP_PREDEF_CLASS
HPP_PREDEF_CLASS(RbprmNode)
hpp::core::RbprmValidationReport::ROMReports
std::map< std::string, CollisionValidationReportPtr_t > ROMReports
Directing vector between collision point of geometries.
Definition: rbprm-validation-report.hh:40
hpp::core::RbprmValidationReportPtr_t
boost::shared_ptr< RbprmValidationReport > RbprmValidationReportPtr_t
Definition: rbprm-validation-report.hh:29
hpp::core::RbprmValidationReport::romsValid
bool romsValid
Definition: rbprm-validation-report.hh:44