path_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_PATH_DISPLAY_H
32 #define RVIZ_PATH_DISPLAY_H
33 
34 #include <nav_msgs/Path.h>
35 
38 #include <rviz/ogre_helpers/axes.h>
39 
40 namespace Ogre
41 {
42 class ManualObject;
43 }
44 
45 namespace rviz
46 {
47 
48 class ColorProperty;
49 class FloatProperty;
50 class IntProperty;
51 class EnumProperty;
52 class BillboardLine;
53 class VectorProperty;
54 
55 
60 class PathDisplay: public MessageFilterDisplay<nav_msgs::Path>
61 {
62 Q_OBJECT
63 public:
64  PathDisplay();
65  virtual ~PathDisplay();
66 
68  virtual void reset();
69 
70 protected:
72  virtual void onInitialize();
73 
75  void processMessage( const nav_msgs::Path::ConstPtr& msg );
76 
77 private Q_SLOTS:
78  void updateBufferLength();
79  void updateStyle();
80  void updateLineWidth();
81  void updateOffset();
82  void updatePoseStyle();
83  void updatePoseAxisGeometry();
84  void updatePoseArrowColor();
85  void updatePoseArrowGeometry();
86 
87 private:
88  void destroyObjects();
89  void allocateArrowVector(std::vector<rviz::Arrow*>& arrow_vect, int num);
90  void allocateAxesVector(std::vector<rviz::Axes*>& axes_vect, int num);
91  void destroyPoseAxesChain();
92  void destroyPoseArrowChain();
93 
94  std::vector<Ogre::ManualObject*> manual_objects_;
95  std::vector<rviz::BillboardLine*> billboard_lines_;
96  std::vector<std::vector<rviz::Axes*> >axes_chain_;
97  std::vector<std::vector<rviz::Arrow*> >arrow_chain_;
98 
105 
106  enum LineStyle {
108  BILLBOARDS
109  };
110 
111  // pose marker property
120 
122  {
126  };
127 
128 };
129 
130 } // namespace rviz
131 
132 #endif /* RVIZ_PATH_DISPLAY_H */
133 
std::vector< Ogre::ManualObject * > manual_objects_
Definition: path_display.h:94
std::vector< rviz::BillboardLine * > billboard_lines_
Definition: path_display.h:95
FloatProperty * line_width_property_
Definition: path_display.h:102
ColorProperty * pose_arrow_color_property_
Definition: path_display.h:115
EnumProperty * style_property_
Definition: path_display.h:99
FloatProperty * pose_arrow_shaft_diameter_property_
Definition: path_display.h:118
FloatProperty * pose_arrow_head_diameter_property_
Definition: path_display.h:119
FloatProperty * pose_arrow_shaft_length_property_
Definition: path_display.h:116
VectorProperty * offset_property_
Definition: path_display.h:104
FloatProperty * pose_axes_radius_property_
Definition: path_display.h:114
Property specialized to enforce floating point max/min.
ColorProperty * color_property_
Definition: path_display.h:100
Property specialized to provide max/min enforcement for integers.
Definition: int_property.h:38
Displays a nav_msgs::Path message.
Definition: path_display.h:60
Display subclass using a tf::MessageFilter, templated on the ROS message type.
std::vector< std::vector< rviz::Arrow * > > arrow_chain_
Definition: path_display.h:97
FloatProperty * alpha_property_
Definition: path_display.h:101
IntProperty * buffer_length_property_
Definition: path_display.h:103
std::vector< std::vector< rviz::Axes * > > axes_chain_
Definition: path_display.h:96
EnumProperty * pose_style_property_
Definition: path_display.h:112
Enum property.
Definition: enum_property.h:47
FloatProperty * pose_arrow_head_length_property_
Definition: path_display.h:117
FloatProperty * pose_axes_length_property_
Definition: path_display.h:113


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