NASA Astrobee Robot Software  0.19.1
Flight software for the Astrobee robots operating inside the International Space Station.
map_matcher.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 #ifndef LOCALIZATION_ANALYSIS_MAP_MATCHER_H_
20 #define LOCALIZATION_ANALYSIS_MAP_MATCHER_H_
21 
22 #include <ff_msgs/VisualLandmarks.h>
26 
27 #include <rosbag/view.h>
28 
29 #include <gtsam/geometry/Pose3.h>
30 
31 #include <string>
32 
33 namespace localization_analysis {
34 class MapMatcher {
35  public:
36  MapMatcher(const std::string& input_bag_name, const std::string& map_file, const std::string& image_topic,
37  const std::string& output_bag_name, const std::string& save_noloc_imgs = "");
38  void AddMapMatches();
39  void LogResults();
40 
41  private:
42  bool GenerateVLFeatures(const sensor_msgs::ImageConstPtr& image_msg, ff_msgs::VisualLandmarks& vl_features);
43 
44  rosbag::Bag input_bag_;
45  rosbag::Bag output_bag_;
46  rosbag::Bag nonloc_bag_;
47  std::string image_topic_;
49  localization_node::Localizer map_feature_matcher_;
50  gtsam::Pose3 body_T_nav_cam_;
51  localization_common::Averager feature_averager_;
52  int sparse_mapping_min_num_landmarks_;
53  int match_count_;
54  int image_count_;
55 };
56 } // namespace localization_analysis
57 
58 #endif // LOCALIZATION_ANALYSIS_MAP_MATCHER_H_
localization_analysis
Definition: ar_tag_pose_adder.h:29
localization_common::Averager
Definition: averager.h:34
localization.h
localization_node::Localizer
Definition: localization.h:45
localization_analysis::MapMatcher::MapMatcher
MapMatcher(const std::string &input_bag_name, const std::string &map_file, const std::string &image_topic, const std::string &output_bag_name, const std::string &save_noloc_imgs="")
Definition: map_matcher.cc:32
averager.h
localization_analysis::MapMatcher::LogResults
void LogResults()
Definition: map_matcher.cc:102
localization_analysis::MapMatcher::AddMapMatches
void AddMapMatches()
Definition: map_matcher.cc:74
localization_analysis::MapMatcher
Definition: map_matcher.h:34
sparse_map.h
sparse_mapping::SparseMap
Definition: sparse_map.h:63