ObjectDetectionDisplay.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Software License Agreement (BSD License) *
3  * Copyright (C) 2017 by Florian Beck <florian.beck@tuwien.ac.at> *
4  * *
5  * Redistribution and use in source and binary forms, with or without *
6  * modification, are permitted provided that the following conditions *
7  * are met: *
8  * *
9  * 1. Redistributions of source code must retain the above copyright *
10  * notice, this list of conditions and the following disclaimer. *
11  * 2. Redistributions in binary form must reproduce the above copyright *
12  * notice, this list of conditions and the following disclaimer in *
13  * the documentation and/or other materials provided with the *
14  * distribution. *
15  * 3. Neither the name of the copyright holder nor the names of its *
16  * contributors may be used to endorse or promote products derived *
17  * from this software without specific prior written permission. *
18  * *
19  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
20  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
21  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS *
22  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE *
23  * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, *
24  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, *
25  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
26  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
27  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT *
28  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY *
29  * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
30  * POSSIBILITY OF SUCH DAMAGE. *
31  ***************************************************************************/
32 
33 #ifndef OBJECT_DETECTION_DISPLAY_H
34 #define OBJECT_DETECTION_DISPLAY_H
35 
36 #ifndef Q_MOC_RUN
37 #include <map>
38 #include <boost/circular_buffer.hpp>
39 #include <tuw_object_msgs/ObjectDetection.h>
41 #include "ObjectDetection/common.h"
42 #endif
43 
44 namespace Ogre
45 {
46 class SceneNode;
47 }
48 
49 namespace rviz
50 {
51 class ColorProperty;
52 class FloatProperty;
53 class BoolProperty;
54 class EnumProperty;
55 }
56 
57 // All the source in this plugin is in its own namespace. This is not
58 // required but is good practice.
59 namespace tuw_object_rviz
60 {
61 
62 class ObjectDetectionVisual;
63 
64 // Here we declare our new subclass of rviz::Display. Every display
65 // which can be listed in the "Displays" panel is a subclass of
66 // rviz::Display.
67 class ObjectDetectionDisplay: public rviz::MessageFilterDisplay<tuw_object_msgs::ObjectDetection>
68 {
69 Q_OBJECT
70 public:
71  // Constructor. pluginlib::ClassLoader creates instances by calling
72  // the default constructor, so make sure you have one.
74  virtual ~ObjectDetectionDisplay();
75 
76  // Overrides of protected virtual functions from Display. As much
77  // as possible, when Displays are not enabled, they should not be
78  // subscribed to incoming data and should not show anything in the
79  // 3D view. These functions are where these connections are made
80  // and broken.
81 protected:
82  virtual void onInitialize();
83 
84  // A helper to clear this display back to the initial state.
85  virtual void reset();
86 
87  // These Qt slots get connected to signals indicating changes in the user-editable properties.
88 private Q_SLOTS:
89  virtual void stylesChanged();
90 
91  // Function to handle an incoming ROS message.
92 private:
93  void processMessage( const tuw_object_msgs::ObjectDetection::ConstPtr& msg );
94 
95  // Storage of the visual
96  std::vector<boost::shared_ptr<ObjectDetectionVisual> > visual_;
97 
98  // Properties
105 };
106 
107 } // end namespace tuw_object_rviz
108 
109 #endif // OBJECT_DETECTION_DISPLAY_H
110 // %EndTag(FULL_SOURCE)%
std::vector< boost::shared_ptr< ObjectDetectionVisual > > visual_


tuw_object_rviz
Author(s): Florian Beck
autogenerated on Mon Jun 10 2019 15:40:17