view_port_handler.hpp
Go to the documentation of this file.
1 
18 #pragma once
19 
20 // Global Inclusion
21 #include <boost/shared_ptr.hpp>
22 #include <vector>
23 #include <map>
24 
25 
26 // ROS Main Inclusion
27 #include <ros/ros.h>
28 
29 
30 // ROS-wide Inclusion
31 #include <asr_msgs/AsrViewport.h>
32 
33 
34 // Local Inclusion
35 #include "asr_world_model/EmptyViewportList.h"
36 #include "asr_world_model/GetViewportList.h"
37 #include "asr_world_model/PushViewport.h"
38 #include "asr_world_model/FilterViewportDependingOnAlreadyVisitedViewports.h"
39 
41 
44 
45 namespace world_model
46 {
47 
48 typedef std::vector<asr_msgs::AsrViewport> ViewportList;
50 
51 std::ostream& operator<<(std::ostream &strm, const ViewportList &viewport_list);
52 std::ostream& operator<<(std::ostream &strm, const ViewportListPtr &viewport_list_ptr);
53 
58 {
59 public:
60  /* ----------------- Public members ------------------ */
61  // Wrapped Constants
62 
63  // PushViewport
64  static const inline std::string GetPushViewportServiceName ()
65  { return "push_viewport"; }
66 
67  // EmptyViewportList
68  static const inline std::string GetEmptyViewportListServiceName()
69  { return "empty_viewport_list"; }
70 
71  // GetViewportList
72  static const inline std::string GetGetViewportListServiceName()
73  { return "get_viewport_list"; }
74 
75  // FilterViewportDependingOnAlreadyVisitedViewports
77  { return "filter_viewport_depending_on_already_visited_viewports"; }
78 
79 private:
80  /* ----------------- Private members ------------------ */
81 
82  // Vars
84  ViewportListPtr viewport_list_ptr_;
85 
89 
90  void filterObjectTypesOfViewport(asr_msgs::AsrViewport &viewport_to_filter, const asr_msgs::AsrViewport &filter_viewport);
91 
92 public:
93  /* ----------------- Public functions ------------------ */
97  ViewPortHandler(SettingsPtr settings_ptr);
98 
106  bool processEmptyViewportListServiceCall(asr_world_model::EmptyViewportList::Request &request,
107  asr_world_model::EmptyViewportList::Response &response);
108 
116  bool processGetViewportListServiceCall(asr_world_model::GetViewportList::Request &request,
117  asr_world_model::GetViewportList::Response &response);
118 
125  bool processPushViewportServiceCall(asr_world_model::PushViewport::Request &request,
126  asr_world_model::PushViewport::Response &response);
127 
134  bool processFilterViewportDependingOnAlreadyVisitedViewportsVisited(asr_world_model::FilterViewportDependingOnAlreadyVisitedViewports::Request &request,
135  asr_world_model::FilterViewportDependingOnAlreadyVisitedViewports::Response &response);
136 
137 };
138 
139 }
static const std::string GetGetViewportListServiceName()
bool processEmptyViewportListServiceCall(asr_world_model::EmptyViewportList::Request &request, asr_world_model::EmptyViewportList::Response &response)
Removes the whole next best view viewports from list if request.object_type is set to "all" in the ot...
bool processPushViewportServiceCall(asr_world_model::PushViewport::Request &request, asr_world_model::PushViewport::Response &response)
Pushes a next best view viewport to a list.
std::vector< asr_msgs::AsrViewport > ViewportList
void filterObjectTypesOfViewport(asr_msgs::AsrViewport &viewport_to_filter, const asr_msgs::AsrViewport &filter_viewport)
bool processGetViewportListServiceCall(asr_world_model::GetViewportList::Request &request, asr_world_model::GetViewportList::Response &response)
Returns the whole list of next best view viewports if request.object_type is set to "all" else just t...
ViewPortHandler(SettingsPtr settings_ptr)
Creates a new instance of the ViewPortHandler.
static const std::string GetFilterViewportDependingOnAlreadyVisitedViewportsName()
std::ostream & operator<<(std::ostream &strm, const CompletePatterns &complete_patterns)
static const std::string GetPushViewportServiceName()
bool processFilterViewportDependingOnAlreadyVisitedViewportsVisited(asr_world_model::FilterViewportDependingOnAlreadyVisitedViewports::Request &request, asr_world_model::FilterViewportDependingOnAlreadyVisitedViewports::Response &response)
Filter the objects of the viewport depending on already visited viewports.
static const std::string GetEmptyViewportListServiceName()
WorldModel class provides services for adding the viewports of the next best views to a list and retr...
boost::shared_ptr< ViewportList > ViewportListPtr


asr_world_model
Author(s): Aumann Florian, Borella Jocelyn, Hutmacher Robin, Karrenbauer Oliver, Meißner Pascal, Schleicher Ralf, Stöckle Patrick, Trautmann Jeremias
autogenerated on Thu Jan 9 2020 07:20:01