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 } // namespace Ogre
44 
45 namespace rviz
46 {
47 class Property;
48 class ColorProperty;
49 class FloatProperty;
50 class EnumProperty;
51 class CovarianceVisual;
52 
55 {
56  Q_OBJECT
57 public:
59 
60  enum Frame
61  {
64  };
65 
67  {
69  RGB,
70  };
71 
72  CovarianceProperty(const QString& name = "Covariance",
73  bool default_value = false,
74  const QString& description = QString(),
75  rviz::Property* parent = nullptr,
76  const char* changed_slot = nullptr,
77  QObject* receiver = nullptr);
78 
79  ~CovarianceProperty() override;
80 
81  bool getPositionBool();
82  bool getOrientationBool();
83 
84  // Methods to manage the deque of Covariance Visuals
85  CovarianceVisualPtr createAndPushBackVisual(Ogre::SceneManager* scene_manager,
86  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:46
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 Mon Jan 9 2023 03:07:19