path_with_velocity_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 #ifndef TRAJECTORY_TRACKER_RVIZ_PLUGINS_PATH_WITH_VELOCITY_DISPLAY_H
31 #define TRAJECTORY_TRACKER_RVIZ_PLUGINS_PATH_WITH_VELOCITY_DISPLAY_H
32 
33 #include <vector>
34 
37 #include <rviz/ogre_helpers/axes.h>
39 
40 #include <trajectory_tracker_msgs/PathWithVelocity.h>
41 #include <trajectory_tracker_msgs/PoseStampedWithVelocity.h>
42 
43 namespace Ogre
44 {
45 class ManualObject;
46 } // namespace Ogre
47 
48 namespace rviz
49 {
50 class ColorProperty;
51 class FloatProperty;
52 class IntProperty;
53 class EnumProperty;
54 class BillboardLine;
55 class VectorProperty;
56 } // namespace rviz
57 
59 {
64 class PathWithVelocityDisplay : public rviz::MessageFilterDisplay<trajectory_tracker_msgs::PathWithVelocity>
65 {
66  Q_OBJECT
67 public:
69  virtual ~PathWithVelocityDisplay();
70 
72  virtual void reset();
73 
74 protected:
76  virtual void onInitialize();
77 
79  void processMessage(const trajectory_tracker_msgs::PathWithVelocity::ConstPtr& msg);
80 
81 private Q_SLOTS:
82  void updateBufferLength();
83  void updateStyle();
84  void updateLineWidth();
85  void updateOffset();
86  void updatePoseStyle();
87  void updatePoseAxisGeometry();
88  void updatePoseArrowColor();
89  void updatePoseArrowGeometry();
90 
91 private:
92  void destroyObjects();
93  void allocateArrowVector(std::vector<rviz::Arrow*>& arrow_vect, size_t num);
94  void allocateAxesVector(std::vector<rviz::Axes*>& axes_vect, size_t num);
95  void destroyPoseAxesChain();
96  void destroyPoseArrowChain();
97 
98  typedef std::vector<rviz::Axes*> AxesPtrArray;
99  typedef std::vector<rviz::Arrow*> ArrowPtrArray;
100 
101  std::vector<Ogre::ManualObject*> manual_objects_;
102  std::vector<rviz::BillboardLine*> billboard_lines_;
103  std::vector<AxesPtrArray> axes_chain_;
104  std::vector<ArrowPtrArray> arrow_chain_;
105 
112 
114  {
116  BILLBOARDS
117  };
118 
119  // pose marker property
128 
130  {
134  };
135 };
136 
137 } // namespace trajectory_tracker_rviz_plugins
138 
139 #endif // TRAJECTORY_TRACKER_RVIZ_PLUGINS_PATH_WITH_VELOCITY_DISPLAY_H
Displays a trajectory_tracker_msgs::PathWithVelocity message.


trajectory_tracker_rviz_plugins
Author(s): Atsushi Watanabe
autogenerated on Sat Jun 8 2019 19:23:54