NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
sparse_mapping_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_SPARSE_MAPPING_DISPLAY_H_ // NOLINT
21 #define LOCALIZATION_RVIZ_PLUGINS_SPARSE_MAPPING_DISPLAY_H_ // NOLINT
22 
23 // Required for Qt
24 #ifndef Q_MOC_RUN
26 #include <ros/node_handle.h>
27 #include <ros/publisher.h>
28 #include <rviz/display.h>
29 #endif
30 
31 // Forward declarations for ogre and rviz
32 namespace Ogre {
33 class SceneNode;
34 }
35 
36 namespace localization_rviz_plugins {
37 
38 class SparseMappingDisplay : public rviz::Display {
39  Q_OBJECT // NOLINT
40  public : // NOLINT
42  ~SparseMappingDisplay() = default;
43 
44  protected:
45  void onInitialize() final;
46  void reset() final;
47 
48  private:
49  void drawMap();
50 
51  std::unique_ptr<sparse_mapping::SparseMap> map_;
52  // TODO(rosussan): Remove publishing and use point_cloud_common from rviz/default_plugins
53  // when linking error is fixed
54  ros::Publisher map_cloud_publisher_;
55  ros::NodeHandle nh_;
56 };
57 } // namespace localization_rviz_plugins
58 #endif // LOCALIZATION_RVIZ_PLUGINS_SPARSE_MAPPING_DISPLAY_H_ NOLINT
localization_rviz_plugins::SparseMappingDisplay
Definition: sparse_mapping_display.h:38
Ogre
Definition: trajectory_display.h:28
localization_rviz_plugins::SparseMappingDisplay::SparseMappingDisplay
SparseMappingDisplay()
Definition: sparse_mapping_display.cc:33
localization_rviz_plugins::SparseMappingDisplay::onInitialize
void onInitialize() final
Definition: sparse_mapping_display.cc:52
localization_rviz_plugins::SparseMappingDisplay::~SparseMappingDisplay
~SparseMappingDisplay()=default
localization_rviz_plugins
Definition: depth_odometry_display.cc:42
sparse_map.h
localization_rviz_plugins::SparseMappingDisplay::reset
void reset() final
Definition: sparse_mapping_display.cc:92