filter_minimum_number_of_deleted_normals.hpp
Go to the documentation of this file.
1 
18 #pragma once
19 
20 #include "filter/filter_basic.hpp"
21 
22 namespace directSearchWS {
23 
25 
26 private:
29 
30 public:
31  FilterMinimumNumberOfDeletedNormals(const RobotStatePtrVecPtr &posesToExplorePtr, int filterMinimumNumberOfDeletedNormalsParam) :
32  FilterBasic(posesToExplorePtr), deleteCount(0), filterMinimumNumberOfDeletedNormalsParam(filterMinimumNumberOfDeletedNormalsParam) { }
34 
35  bool needIteration() {
36  if (filterMinimumNumberOfDeletedNormalsParam <= 0) {
37  ROS_INFO_STREAM("filterMinimumNumberOfDeletedNormals is <= 0 -> nothing to do");
38  return false;
39  }
40  deleteCount = 0;
41  return true;
42  }
43 
45  ROS_INFO_STREAM("Number of deleted ptuTuple by FilterMinimumNumberOfDeletedNormals: " << deleteCount);
46  return true;
47  }
48 
49  bool shouldPtuTupleBeDeleted(const RobotStatePtrVec::iterator &posesToExploreIter, const PtuTuplePtrVec::iterator &ptuTuplePtrIter) {
50  bool shouldDelete = ptuTuplePtrIter->get()->getDeactivatedObjectNormalsCount() < filterMinimumNumberOfDeletedNormalsParam;
51  if (shouldDelete) {
52  ++deleteCount;
53  }
54  return shouldDelete;
55  }
56 
57 };
58 
60 
61 }
62 
63 
64 
boost::shared_ptr< FilterMinimumNumberOfDeletedNormals > FilterMinimumNumberOfDeletedNormalsPtr
const RobotStatePtrVecPtr & posesToExplorePtr
FilterMinimumNumberOfDeletedNormals(const RobotStatePtrVecPtr &posesToExplorePtr, int filterMinimumNumberOfDeletedNormalsParam)
#define ROS_INFO_STREAM(args)
bool shouldPtuTupleBeDeleted(const RobotStatePtrVec::iterator &posesToExploreIter, const PtuTuplePtrVec::iterator &ptuTuplePtrIter)


asr_direct_search_manager
Author(s): Borella Jocelyn, Karrenbauer Oliver, Mei├čner Pascal
autogenerated on Wed Jan 8 2020 03:15:41