covariance_property.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017, Ellon Paiva Mendes @ LAAS-CNRS
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  *
8  * * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * * Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  * * Neither the name of the Willow Garage, Inc. nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 
30 #ifndef COVARIANCE_PROPERTY_H
31 #define COVARIANCE_PROPERTY_H
32 
33 #include <QColor>
34 
35 #include <OgreColourValue.h>
36 
38 
39 namespace Ogre
40 {
41  class SceneManager;
42  class SceneNode;
43 }
44 
45 namespace rviz
46 {
47 
48 class Property;
49 class ColorProperty;
50 class FloatProperty;
51 class EnumProperty;
52 class CovarianceVisual;
53 
56 {
57 Q_OBJECT
58 public:
60 
61  enum Frame
62  {
65  };
66 
68  {
70  RGB,
71  };
72 
73  CovarianceProperty( const QString& name = "Covariance",
74  bool default_value = false,
75  const QString& description = QString(),
76  rviz::Property* parent = 0,
77  const char *changed_slot = 0,
78  QObject* receiver = 0 );
79 
80  virtual ~CovarianceProperty();
81 
82  bool getPositionBool();
83  bool getOrientationBool();
84 
85  // Methods to manage the deque of Covariance Visuals
86  CovarianceVisualPtr createAndPushBackVisual(Ogre::SceneManager* scene_manager, Ogre::SceneNode* parent_node);
87  void popFrontVisual();
88  void clearVisual();
89  size_t sizeVisual();
90 
91 public Q_SLOTS:
92  void updateVisibility();
93 
94 private Q_SLOTS:
95  void updateColorAndAlphaAndScaleAndOffset();
96  void updateOrientationFrame();
97  void updateColorStyleChoice();
98 
99 private:
100  void updateColorAndAlphaAndScaleAndOffset( const CovarianceVisualPtr& visual );
101  void updateOrientationFrame( const CovarianceVisualPtr& visual );
102  void updateVisibility( const CovarianceVisualPtr& visual );
103 
104  typedef std::deque<CovarianceVisualPtr> D_Covariance;
105  D_Covariance covariances_;
106 
118 };
119 
120 } // end namespace rviz
121 
122 #endif // COVARIANCE_PROPERTY_H
rviz::EnumProperty * orientation_colorstyle_property_
A single element of a property tree, with a name, value, description, and possibly children...
Definition: property.h:100
Property specialized to enforce floating point max/min.
rviz::FloatProperty * position_scale_property_
rviz::FloatProperty * orientation_scale_property_
rviz::FloatProperty * orientation_alpha_property_
std::deque< CovarianceVisualPtr > D_Covariance
rviz::ColorProperty * orientation_color_property_
rviz::EnumProperty * orientation_frame_property_
rviz::FloatProperty * orientation_offset_property_
boost::shared_ptr< CovarianceVisual > CovarianceVisualPtr
Property specialized to provide getter for booleans.
Definition: bool_property.h:38
Property specialized to provide getter for booleans.
rviz::BoolProperty * orientation_property_
Enum property.
Definition: enum_property.h:47
rviz::ColorProperty * position_color_property_
rviz::FloatProperty * position_alpha_property_
rviz::BoolProperty * position_property_


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Wed Aug 28 2019 04:01:50