PathVecDisplay.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_VEC_DISPLAY_H
32 #define RVIZ_PATH_VEC_DISPLAY_H
33 
34 #include <nav_msgs/Path.h>
35 #include <tuw_nav_msgs/PathVec.h>
36 
39 #include <rviz/ogre_helpers/axes.h>
40 
41 
42 namespace Ogre
43 {
44 class ManualObject;
45 }
46 
47 
48 
49 namespace rviz
50 {
51 class ColorProperty;
52 class FloatProperty;
53 class IntProperty;
54 class EnumProperty;
55 class BillboardLine;
56 class VectorProperty;
57 }
58 
59 namespace tuw_nav_rviz
60 {
61 
66 class PathVecDisplay: public rviz::MessageFilterDisplay<tuw_nav_msgs::PathVec>
67 {
68 Q_OBJECT
69 public:
71  virtual ~PathVecDisplay();
72 
74  virtual void reset();
75 
76 protected:
78  virtual void onInitialize();
79 
81  void processMessage( const tuw_nav_msgs::PathVec::ConstPtr& msg );
82 
83 private Q_SLOTS:
84  void updateBufferLength();
85  void updateStyle();
86  void updateLineWidth();
87  void updateOffset();
88  void updatePoseStyle();
89  void updatePoseAxisGeometry();
90  void updatePoseArrowColor();
91  void updatePoseArrowGeometry();
92 
93 private:
94  void destroyObjects();
95  void allocateArrowVector(std::vector<rviz::Arrow*>& arrow_vect, int num);
96  void allocateAxesVector(std::vector<rviz::Axes*>& axes_vect, int num);
97  void destroyPoseAxesChain();
98  void destroyPoseArrowChain();
99 
100  std::vector<std::vector<Ogre::ManualObject*> >manual_objects_;
101  std::vector<std::vector<rviz::BillboardLine*> >billboard_lines_;
102  std::vector<std::vector<std::vector<rviz::Axes*> > >axes_chain_;
103  std::vector<std::vector<std::vector<rviz::Arrow*> > >arrow_chain_;
104  std::vector<size_t> pathsSize_;
105 
112 
113  enum LineStyle {
115  BILLBOARDS
116  };
117 
118  // pose marker property
127 
129  {
133  };
134 
135 };
136 
137 } // namespace rviz
138 
139 #endif /* RVIZ_PATH_VEC_DISPLAY_H */
rviz::EnumProperty * pose_style_property_
rviz::EnumProperty * style_property_
rviz::FloatProperty * line_width_property_
rviz::FloatProperty * pose_arrow_shaft_diameter_property_
std::vector< size_t > pathsSize_
rviz::FloatProperty * pose_axes_length_property_
rviz::ColorProperty * pose_arrow_color_property_
rviz::VectorProperty * offset_property_
rviz::FloatProperty * pose_arrow_head_length_property_
std::vector< std::vector< rviz::BillboardLine * > > billboard_lines_
std::vector< std::vector< std::vector< rviz::Axes * > > > axes_chain_
rviz::FloatProperty * pose_arrow_head_diameter_property_
std::vector< std::vector< Ogre::ManualObject * > > manual_objects_
rviz::IntProperty * buffer_length_property_
std::vector< std::vector< std::vector< rviz::Arrow * > > > arrow_chain_
Displays a tuw_nav_msgs::PathVec message.
rviz::FloatProperty * alpha_property_
rviz::ColorProperty * color_property_
rviz::FloatProperty * pose_axes_radius_property_
rviz::FloatProperty * pose_arrow_shaft_length_property_


tuw_nav_rviz
Author(s):
autogenerated on Mon Jun 10 2019 15:40:12