odometry_display.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008, Willow Garage, Inc.
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 
31 #ifndef RVIZ_ODOMETRY_DISPLAY_H_
32 #define RVIZ_ODOMETRY_DISPLAY_H_
33 
34 #include <deque>
35 
36 #include <boost/shared_ptr.hpp>
37 #include <boost/thread/mutex.hpp>
38 
39 #ifndef Q_MOC_RUN
41 #include <tf/message_filter.h>
42 #endif
43 
45 #include <nav_msgs/Odometry.h>
46 
47 namespace rviz
48 {
49 class Arrow;
50 class Axes;
51 class ColorProperty;
52 class FloatProperty;
53 class IntProperty;
54 class EnumProperty;
55 
56 class CovarianceProperty;
57 
62 class OdometryDisplay: public rviz::MessageFilterDisplay<nav_msgs::Odometry>
63 {
64 Q_OBJECT
65 public:
66  enum Shape
67  {
70  };
71 
73  virtual ~OdometryDisplay();
74 
75  // Overides of MessageFilterDisplay
76  virtual void onInitialize();
77  virtual void reset();
78  // Overides of Display
79  virtual void update( float wall_dt, float ros_dt );
80 
81 protected:
83  virtual void onEnable();
84 
85 private Q_SLOTS:
86  void updateShapeChoice();
87  void updateShapeVisibility();
88  void updateColorAndAlpha();
89  void updateArrowsGeometry();
90  void updateAxisGeometry();
91 
92 private:
93  void updateGeometry( rviz::Arrow* arrow );
94  void updateGeometry( rviz::Axes* axes );
95  void clear();
96 
97  virtual void processMessage( const nav_msgs::Odometry::ConstPtr& message );
98 
99  typedef std::deque<rviz::Arrow*> D_Arrow;
100  typedef std::deque<rviz::Axes*> D_Axes;
101 
102  D_Arrow arrows_;
103  D_Axes axes_;
104 
105  nav_msgs::Odometry::ConstPtr last_used_message_;
106 
108 
114 
119 
122 
124 };
125 
126 } // namespace rviz
127 
128 #endif /* RVIZ_ODOMETRY_DISPLAY_H_ */
std::deque< rviz::Axes * > D_Axes
virtual void onInitialize()
Override this function to do subclass-specific initialization.
nav_msgs::Odometry::ConstPtr last_used_message_
virtual void processMessage(const nav_msgs::Odometry::ConstPtr &message)
rviz::FloatProperty * head_length_property_
rviz::FloatProperty * axes_radius_property_
Property specialized to enforce floating point max/min.
Property specialized to provide max/min enforcement for integers.
Definition: int_property.h:38
rviz::FloatProperty * position_tolerance_property_
rviz::FloatProperty * shaft_length_property_
rviz::EnumProperty * shape_property_
Display subclass using a tf::MessageFilter, templated on the ROS message type.
Accumulates and displays the pose from a nav_msgs::Odometry message.
rviz::FloatProperty * angle_tolerance_property_
void updateGeometry(rviz::Arrow *arrow)
CovarianceProperty * covariance_property_
An object that displays a set of X/Y/Z axes, with X=Red, Y=Green, Z=Blue.
Definition: axes.h:58
virtual void reset()
Called to tell the display to clear its state.
std::deque< rviz::Arrow * > D_Arrow
rviz::IntProperty * keep_property_
Property specialized to provide getter for booleans.
rviz::FloatProperty * alpha_property_
An arrow consisting of a cylinder and a cone.
Definition: arrow.h:59
virtual void update(float wall_dt, float ros_dt)
Called periodically by the visualization manager.
virtual void onEnable()
Overridden from MessageFilterDisplay to get Arrow/Axes visibility correct.
rviz::FloatProperty * axes_length_property_
rviz::ColorProperty * color_property_
Enum property.
Definition: enum_property.h:47
rviz::FloatProperty * head_radius_property_
rviz::FloatProperty * shaft_radius_property_


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust
autogenerated on Sat Apr 27 2019 02:33:41