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 class ColorProperty;
48 class FloatProperty;
49 class IntProperty;
50 class EnumProperty;
51 class BillboardLine;
52 class VectorProperty;
53 
54 
59 class PathDisplay : public MessageFilterDisplay<nav_msgs::Path>
60 {
61  Q_OBJECT
62 public:
63  PathDisplay();
64  ~PathDisplay() override;
65 
67  void reset() override;
68 
69 protected:
71  void onInitialize() override;
72 
74  void processMessage(const nav_msgs::Path::ConstPtr& msg) override;
75 
76 private Q_SLOTS:
77  void updateBufferLength();
78  void updateStyle();
79  void updateLineWidth();
80  void updateOffset();
81  void updatePoseStyle();
82  void updatePoseAxisGeometry();
83  void updatePoseArrowColor();
84  void updatePoseArrowGeometry();
85 
86 private:
87  void destroyObjects();
88  void allocateArrowVector(std::vector<rviz::Arrow*>& arrow_vect, int num);
89  void allocateAxesVector(std::vector<rviz::Axes*>& axes_vect, int num);
90  void destroyPoseAxesChain();
91  void destroyPoseArrowChain();
92 
93  std::vector<Ogre::ManualObject*> manual_objects_;
94  std::vector<rviz::BillboardLine*> billboard_lines_;
95  std::vector<std::vector<rviz::Axes*> > axes_chain_;
96  std::vector<std::vector<rviz::Arrow*> > arrow_chain_;
97 
104 
106  {
108  BILLBOARDS
109  };
110 
111  // pose marker property
120 
122  {
126  };
127 };
128 
129 } // namespace rviz
130 
131 #endif /* RVIZ_PATH_DISPLAY_H */
std::vector< Ogre::ManualObject * > manual_objects_
Definition: path_display.h:93
std::vector< rviz::BillboardLine * > billboard_lines_
Definition: path_display.h:94
FloatProperty * line_width_property_
Definition: path_display.h:101
ColorProperty * pose_arrow_color_property_
Definition: path_display.h:115
EnumProperty * style_property_
Definition: path_display.h:98
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:103
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:99
Property specialized to provide max/min enforcement for integers.
Definition: int_property.h:37
Displays a nav_msgs::Path message.
Definition: path_display.h:59
Display subclass using a tf2_ros::MessageFilter, templated on the ROS message type.
std::vector< std::vector< rviz::Arrow * > > arrow_chain_
Definition: path_display.h:96
FloatProperty * alpha_property_
Definition: path_display.h:100
IntProperty * buffer_length_property_
Definition: path_display.h:102
std::vector< std::vector< rviz::Axes * > > axes_chain_
Definition: path_display.h:95
EnumProperty * pose_style_property_
Definition: path_display.h:112
Enum property.
Definition: enum_property.h:46
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 Mon Aug 15 2022 02:05:17