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();
83  void updatePoseArrowColor();
85 
86 private:
87  void destroyObjects();
88  void allocateArrowVector(std::vector<rviz::Arrow*>& arrow_vect, size_t num);
89  void allocateAxesVector(std::vector<rviz::Axes*>& axes_vect, size_t 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  {
109  };
110 
111  // pose marker property
120 
122  {
126  };
127 };
128 
129 } // namespace rviz
130 
131 #endif /* RVIZ_PATH_DISPLAY_H */
axes.h
rviz::MessageFilterDisplay
Display subclass using a tf2_ros::MessageFilter, templated on the ROS message type.
Definition: message_filter_display.h:90
rviz::PathDisplay
Displays a nav_msgs::Path message.
Definition: path_display.h:59
rviz::PathDisplay::alpha_property_
FloatProperty * alpha_property_
Definition: path_display.h:100
Ogre
Definition: axes_display.h:35
rviz::PathDisplay::destroyObjects
void destroyObjects()
Definition: path_display.cpp:315
rviz::PathDisplay::offset_property_
VectorProperty * offset_property_
Definition: path_display.h:103
rviz::PathDisplay::reset
void reset() override
Overridden from Display.
Definition: path_display.cpp:127
message_filter_display.h
rviz::PathDisplay::style_property_
EnumProperty * style_property_
Definition: path_display.h:98
rviz::PathDisplay::pose_style_property_
EnumProperty * pose_style_property_
Definition: path_display.h:112
rviz::PathDisplay::line_width_property_
FloatProperty * line_width_property_
Definition: path_display.h:101
rviz::PathDisplay::destroyPoseArrowChain
void destroyPoseArrowChain()
Definition: path_display.cpp:185
rviz::PathDisplay::PathDisplay
PathDisplay()
Definition: path_display.cpp:52
rviz::PathDisplay::AXES
@ AXES
Definition: path_display.h:124
rviz::PathDisplay::LineStyle
LineStyle
Definition: path_display.h:105
rviz::PathDisplay::NONE
@ NONE
Definition: path_display.h:123
rviz::PathDisplay::destroyPoseAxesChain
void destroyPoseAxesChain()
Definition: path_display.cpp:176
rviz::PathDisplay::updateStyle
void updateStyle()
Definition: path_display.cpp:194
rviz::PathDisplay::BILLBOARDS
@ BILLBOARDS
Definition: path_display.h:108
rviz::PathDisplay::updatePoseArrowGeometry
void updatePoseArrowGeometry()
Definition: path_display.cpp:299
rviz::PathDisplay::~PathDisplay
~PathDisplay() override
Definition: path_display.cpp:114
rviz::ColorProperty
Definition: color_property.h:40
rviz::PathDisplay::pose_arrow_head_length_property_
FloatProperty * pose_arrow_head_length_property_
Definition: path_display.h:117
rviz::EnumProperty
Enum property.
Definition: enum_property.h:46
rviz::FloatProperty
Property specialized to enforce floating point max/min.
Definition: float_property.h:37
rviz::PathDisplay::updatePoseAxisGeometry
void updatePoseAxisGeometry()
Definition: path_display.cpp:271
rviz::PathDisplay::color_property_
ColorProperty * color_property_
Definition: path_display.h:99
rviz::PathDisplay::updatePoseStyle
void updatePoseStyle()
Definition: path_display.cpp:236
rviz::PathDisplay::pose_arrow_color_property_
ColorProperty * pose_arrow_color_property_
Definition: path_display.h:115
rviz
Definition: add_display_dialog.cpp:54
arrow.h
rviz::PathDisplay::allocateArrowVector
void allocateArrowVector(std::vector< rviz::Arrow * > &arrow_vect, size_t num)
Definition: path_display.cpp:156
rviz::PathDisplay::pose_arrow_head_diameter_property_
FloatProperty * pose_arrow_head_diameter_property_
Definition: path_display.h:119
rviz::PathDisplay::LINES
@ LINES
Definition: path_display.h:107
rviz::PathDisplay::updateLineWidth
void updateLineWidth()
Definition: path_display.cpp:213
rviz::PathDisplay::updateOffset
void updateOffset()
Definition: path_display.cpp:230
rviz::PathDisplay::PoseStyle
PoseStyle
Definition: path_display.h:121
rviz::PathDisplay::ARROWS
@ ARROWS
Definition: path_display.h:125
rviz::PathDisplay::processMessage
void processMessage(const nav_msgs::Path::ConstPtr &msg) override
Overridden from MessageFilterDisplay.
Definition: path_display.cpp:389
rviz::PathDisplay::onInitialize
void onInitialize() override
Overridden from Display.
Definition: path_display.cpp:121
rviz::PathDisplay::pose_axes_length_property_
FloatProperty * pose_axes_length_property_
Definition: path_display.h:113
rviz::PathDisplay::billboard_lines_
std::vector< rviz::BillboardLine * > billboard_lines_
Definition: path_display.h:94
rviz::PathDisplay::pose_arrow_shaft_diameter_property_
FloatProperty * pose_arrow_shaft_diameter_property_
Definition: path_display.h:118
rviz::PathDisplay::pose_arrow_shaft_length_property_
FloatProperty * pose_arrow_shaft_length_property_
Definition: path_display.h:116
rviz::PathDisplay::updateBufferLength
void updateBufferLength()
Definition: path_display.cpp:341
rviz::VectorProperty
Definition: vector_property.h:39
rviz::PathDisplay::arrow_chain_
std::vector< std::vector< rviz::Arrow * > > arrow_chain_
Definition: path_display.h:96
rviz::PathDisplay::allocateAxesVector
void allocateAxesVector(std::vector< rviz::Axes * > &axes_vect, size_t num)
Definition: path_display.cpp:134
rviz::PathDisplay::manual_objects_
std::vector< Ogre::ManualObject * > manual_objects_
Definition: path_display.h:93
rviz::PathDisplay::pose_axes_radius_property_
FloatProperty * pose_axes_radius_property_
Definition: path_display.h:114
rviz::PathDisplay::updatePoseArrowColor
void updatePoseArrowColor()
Definition: path_display.cpp:284
rviz::PathDisplay::axes_chain_
std::vector< std::vector< rviz::Axes * > > axes_chain_
Definition: path_display.h:95
rviz::PathDisplay::buffer_length_property_
IntProperty * buffer_length_property_
Definition: path_display.h:102
rviz::IntProperty
Property specialized to provide max/min enforcement for integers.
Definition: int_property.h:37


rviz
Author(s): Dave Hershberger, David Gossow, Josh Faust, William Woodall
autogenerated on Fri Aug 2 2024 08:43:10