hpp-rbprm  4.15.1
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/collision-validation-report.hh>
23 #include <hpp/core/validation-report.hh>
24 
25 namespace hpp {
26 namespace core {
27 
28 HPP_PREDEF_CLASS(RbprmValidationReport);
29 typedef shared_ptr<RbprmValidationReport> RbprmValidationReportPtr_t;
30 
33 
36 struct HPP_CORE_DLLAPI RbprmValidationReport
37  : public CollisionValidationReport {
39  std::map<std::string, CollisionValidationReportPtr_t>
40  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  if (trunkInCollision) {
49  os << "Collision between object " << object1->name() << " and "
50  << 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();
55  it != ROMFilters.end(); ++it) {
56  if (!it->second) os << " " << it->first << std::endl;
57  }
58  }
59  return os;
60  }
61 
62 }; // class RbprmValidationReport
64 } // namespace core
65 } // namespace hpp
66 
67 #endif // HPP_RBPRM__VALIDATION_REPORT_HH
virtual std::ostream & print(std::ostream &os) const
Write report in a stream.
Definition: rbprm-validation-report.hh:47
Definition: algorithm.hh:26
HPP_PREDEF_CLASS(RbprmNode)
bool romsValid
Definition: rbprm-validation-report.hh:44
std::map< std::string, CollisionValidationReportPtr_t > ROMReports
Directing vector between collision point of geometries.
Definition: rbprm-validation-report.hh:40
Definition: rbprm-validation-report.hh:36
bool trunkInCollision
Definition: rbprm-validation-report.hh:43
shared_ptr< RbprmValidationReport > RbprmValidationReportPtr_t
Definition: rbprm-validation-report.hh:29
std::map< std::string, bool > ROMFilters
Definition: rbprm-validation-report.hh:41