NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
imu_augmentor_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_IMU_AUGMENTOR_DISPLAY_H_ // NOLINT
21 #define LOCALIZATION_RVIZ_PLUGINS_IMU_AUGMENTOR_DISPLAY_H_ // NOLINT
22 
23 // Required for Qt
24 #ifndef Q_MOC_RUN
25 #include <ff_msgs/EkfState.h>
26 #include <gtsam/geometry/Pose3.h>
27 #include <rviz/message_filter_display.h>
28 #include <rviz/ogre_helpers/arrow.h>
29 #include <rviz/ogre_helpers/axes.h>
30 #include <rviz/properties/float_property.h>
31 #include <rviz/properties/int_property.h>
32 #include <boost/circular_buffer.hpp>
33 #include <vector>
34 #endif
35 
36 namespace Ogre {
37 class SceneNode;
38 }
39 
40 namespace localization_rviz_plugins {
41 
42 class ImuAugmentorDisplay : public rviz::MessageFilterDisplay<ff_msgs::EkfState> {
43  Q_OBJECT // NOLINT
44  public : // NOLINT
46  ~ImuAugmentorDisplay() = default;
47 
48  // private:
49  protected:
50  void onInitialize() final;
51  void reset() final;
52 
53  private Q_SLOTS: // NOLINT
54 
55  private:
56  void processMessage(const ff_msgs::EkfState::ConstPtr& imu_augmentor_msg);
57  void clearDisplay();
58 
59  boost::circular_buffer<std::unique_ptr<rviz::Axes>> imu_augmentor_pose_axes_;
60  std::unique_ptr<rviz::Arrow> imu_acceleration_arrow_;
61  std::unique_ptr<rviz::BoolProperty> show_pose_axes_;
62  std::unique_ptr<rviz::FloatProperty> pose_axes_size_;
63  std::unique_ptr<rviz::IntProperty> number_of_poses_;
64  std::unique_ptr<rviz::BoolProperty> show_imu_acceleration_arrow_;
65  std::unique_ptr<rviz::FloatProperty> imu_acceleration_arrow_scale_;
66 };
67 } // namespace localization_rviz_plugins
68 #endif // LOCALIZATION_RVIZ_PLUGINS_IMU_AUGMENTOR_DISPLAY_H_ NOLINT
Ogre
Definition: trajectory_display.h:28
localization_rviz_plugins::ImuAugmentorDisplay
Definition: imu_augmentor_display.h:42
localization_rviz_plugins::ImuAugmentorDisplay::onInitialize
void onInitialize() final
Definition: imu_augmentor_display.cc:47
localization_rviz_plugins::ImuAugmentorDisplay::~ImuAugmentorDisplay
~ImuAugmentorDisplay()=default
localization_rviz_plugins::ImuAugmentorDisplay::reset
void reset() final
Definition: imu_augmentor_display.cc:49
localization_rviz_plugins
Definition: depth_odometry_display.cc:42
localization_rviz_plugins::ImuAugmentorDisplay::ImuAugmentorDisplay
ImuAugmentorDisplay()
Definition: imu_augmentor_display.cc:38