NASA Astrobee Robot Software  Astrobee Version:
Flight software for the Astrobee robots operating inside the International Space Station.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
localization.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_NODE_LOCALIZATION_H_
20 #define LOCALIZATION_NODE_LOCALIZATION_H_
21 
23 
25 #include <cv_bridge/cv_bridge.h>
26 #include <ff_msgs/VisualLandmarks.h>
28 #include <sensor_msgs/PointCloud2.h>
29 
30 #include <deque>
31 
32 namespace localization_node {
33 
43 };
44 
45 class Localizer {
46  public:
47  explicit Localizer(sparse_mapping::SparseMap* map);
48  bool ReadParams(config_reader::ConfigReader& config, bool fatal_failure = true);
49  bool Localize(cv_bridge::CvImageConstPtr image_ptr, ff_msgs::VisualLandmarks* vl,
50  Eigen::Matrix2Xd* image_keypoints = NULL);
51  private:
52  void AdjustThresholds();
53 
55  // Success params for adjusting keypoint thresholds
56  std::deque<int> successes_;
57  ThresholdParams params_;
59 };
60 
61 }; // namespace localization_node
62 
63 #endif // LOCALIZATION_NODE_LOCALIZATION_H_
localization_common::Timer
Definition: timer.h:30
localization_node::ThresholdParams::success_history_size
int success_history_size
Definition: localization.h:35
localization_node::ThresholdParams::max_features
int max_features
Definition: localization.h:39
localization_node::Localizer::ReadParams
bool ReadParams(config_reader::ConfigReader &config, bool fatal_failure=true)
Definition: localization.cc:32
localization_node
Definition: localization.h:32
localization_node::ThresholdParams::max_num_similar
int max_num_similar
Definition: localization.h:42
localization_node::ThresholdParams::min_features
int min_features
Definition: localization.h:38
localization_node::ThresholdParams
Definition: localization.h:34
localization_node::Localizer
Definition: localization.h:45
localization_node::ThresholdParams::adjust_num_similar
bool adjust_num_similar
Definition: localization.h:40
timer.h
config_reader::ConfigReader
Definition: config_reader.h:48
config_reader.h
localization_node::ThresholdParams::min_num_similar
int min_num_similar
Definition: localization.h:41
localization_node::ThresholdParams::max_success_rate
double max_success_rate
Definition: localization.h:37
sparse_map.h
sparse_mapping::SparseMap
Definition: sparse_map.h:63
localization_node::Localizer::Localizer
Localizer(sparse_mapping::SparseMap *map)
Definition: localization.cc:30
localization_node::Localizer::Localize
bool Localize(cv_bridge::CvImageConstPtr image_ptr, ff_msgs::VisualLandmarks *vl, Eigen::Matrix2Xd *image_keypoints=NULL)
Definition: localization.cc:114
localization_node::ThresholdParams::min_success_rate
double min_success_rate
Definition: localization.h:36