NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
pose_display.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, United States Government, as represented by the
2  * Administrator of the National Aeronautics and Space Administration.
3  *
4  * All rights reserved.
5  *
6  * The Astrobee platform is licensed under the Apache License, Version 2.0
7  * (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15  * License for the specific language governing permissions and limitations
16  * under the License.
17  */
18 
19 // Header file must go in src directory for Qt/Rviz plugin
20 #ifndef LOCALIZATION_RVIZ_PLUGINS_POSE_DISPLAY_H_ // NOLINT
21 #define LOCALIZATION_RVIZ_PLUGINS_POSE_DISPLAY_H_ // NOLINT
22 
23 // Required for Qt
24 #ifndef Q_MOC_RUN
25 #include <geometry_msgs/PoseStamped.h>
26 #include <rviz/message_filter_display.h>
27 #include <rviz/ogre_helpers/axes.h>
28 #include <rviz/properties/float_property.h>
29 #include <rviz/properties/int_property.h>
30 #include <boost/circular_buffer.hpp>
31 #endif
32 
33 #include <vector>
34 
35 // Forward declarations for ogre and rviz
36 namespace Ogre {
37 class SceneNode;
38 }
39 
40 namespace localization_rviz_plugins {
41 
42 class PoseDisplay : public rviz::MessageFilterDisplay<geometry_msgs::PoseStamped> {
43  Q_OBJECT // NOLINT
44  public : // NOLINT
45  PoseDisplay();
46  ~PoseDisplay() = default;
47 
48  protected:
49  void onInitialize() final;
50  void reset() final;
51 
52  private Q_SLOTS: // NOLINT
53 
54  private:
55  void processMessage(const geometry_msgs::PoseStamped::ConstPtr& msg);
56  void clearDisplay();
57 
58  boost::circular_buffer<std::unique_ptr<rviz::Axes>> pose_axes_;
59  std::unique_ptr<rviz::FloatProperty> pose_axes_size_;
60  std::unique_ptr<rviz::IntProperty> number_of_poses_;
61 };
62 } // namespace localization_rviz_plugins
63 #endif // LOCALIZATION_RVIZ_PLUGINS_POSE_DISPLAY_H_ NOLINT
localization_rviz_plugins::PoseDisplay::reset
void reset() final
Definition: pose_display.cc:45
localization_rviz_plugins::PoseDisplay::~PoseDisplay
~PoseDisplay()=default
Ogre
Definition: trajectory_display.h:28
localization_rviz_plugins::PoseDisplay::onInitialize
void onInitialize() final
Definition: pose_display.cc:43
localization_rviz_plugins::PoseDisplay::PoseDisplay
PoseDisplay()
Definition: pose_display.cc:38
localization_rviz_plugins::PoseDisplay
Definition: pose_display.h:42
localization_rviz_plugins
Definition: depth_odometry_display.cc:42