filter_poses_depending_on_already_found_object_types.hpp
Go to the documentation of this file.
1 
18 #pragma once
19 
20 #include "filter/filter_basic.hpp"
22 
23 namespace directSearchWS {
24 
26 
27 private:
31 
32 public:
34  FilterBasic(posesToExplorePtr), deleteCount(0), searchedObjectTypes(), isNeedReorder(false) { }
36 
37  bool needIteration() {
38  deleteCount = 0;
39  isNeedReorder = false;
40  return true;
41  }
42 
44  ROS_INFO_STREAM("Number of deleted ptuTuple by FilterPosesDependingOnAlreadyFoundObjectTypes: " << deleteCount);
45  return true;
46  }
47 
48  bool shouldPtuTupleBeDeleted(const RobotStatePtrVec::iterator &posesToExploreIter, const PtuTuplePtrVec::iterator &ptuTuplePtrIter) {
49  SearchedObjectTypes copySearchedObjectTypes(searchedObjectTypes);
50  filterSearchedObjectTypes(copySearchedObjectTypes, ptuTuplePtrIter->get()->getAlreadySearchedObjectTypes());
51  // Check if every searchedObjectTypes is present in alreadySearchedObjectTypes
52  bool shouldDelete = copySearchedObjectTypes.empty();
53  if (shouldDelete) {
54  ++deleteCount;
55  isNeedReorder = true;
56  }
57  return shouldDelete;
58  }
59 
60  void updateSearchedObjectTypes(const SearchedObjectTypes &newSearchedObjectTypes) {
61  searchedObjectTypes = newSearchedObjectTypes;
62  }
63 
64  bool needReorder() const {
65  return isNeedReorder;
66  }
67 
68 };
69 
71 
72 }
73 
74 
75 
76 
void filterSearchedObjectTypes(SearchedObjectTypes &searched_object_types_to_filter, const SearchedObjectTypes &filter_searched_object_types)
std::vector< std::string > SearchedObjectTypes
Definition: ptu_tuple.hpp:27
const RobotStatePtrVecPtr & posesToExplorePtr
#define ROS_INFO_STREAM(args)
boost::shared_ptr< FilterPosesDependingOnAlreadyFoundObjectTypes > FilterPosesDependingOnAlreadyFoundObjectTypesPtr
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