From 085d73ee06ecf0646fca4a96019b30e378def28f Mon Sep 17 00:00:00 2001 From: yogesh kumar Date: Thu, 25 Aug 2022 10:16:43 +0530 Subject: [PATCH] removed unused variables --- src/socket_publisher/data_serializer.h | 2 +- src/stella_vslam/mapping_module.h | 3 --- src/stella_vslam/module/initializer.h | 3 +-- src/stella_vslam/module/local_map_updater.cc | 2 +- src/stella_vslam/module/loop_detector.h | 4 ---- src/stella_vslam/system.cc | 2 +- src/stella_vslam/system.h | 2 -- 7 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/socket_publisher/data_serializer.h b/src/socket_publisher/data_serializer.h index 2cee516a1..790bb72ca 100644 --- a/src/socket_publisher/data_serializer.h +++ b/src/socket_publisher/data_serializer.h @@ -48,7 +48,7 @@ class data_serializer { std::unique_ptr> point_hash_map_; double current_pose_hash_ = 0; - int frame_hash_ = 0; + inline double get_vec_hash(const stella_vslam::Vec3_t& point) { return point[0] + point[1] + point[2]; diff --git a/src/stella_vslam/mapping_module.h b/src/stella_vslam/mapping_module.h index 254aa7eb2..fd1adcee7 100644 --- a/src/stella_vslam/mapping_module.h +++ b/src/stella_vslam/mapping_module.h @@ -221,9 +221,6 @@ class mapping_module { //! map database data::map_database* map_db_ = nullptr; - //! BoW database - data::bow_database* bow_db_ = nullptr; - //! BoW vocabulary data::bow_vocabulary* bow_vocab_ = nullptr; diff --git a/src/stella_vslam/module/initializer.h b/src/stella_vslam/module/initializer.h index daa5258f2..d0f6a206d 100644 --- a/src/stella_vslam/module/initializer.h +++ b/src/stella_vslam/module/initializer.h @@ -60,8 +60,7 @@ class initializer { private: //! map database data::map_database* map_db_ = nullptr; - //! BoW database - data::bow_database* bow_db_ = nullptr; + //! initializer status initializer_state_t state_ = initializer_state_t::NotReady; diff --git a/src/stella_vslam/module/local_map_updater.cc b/src/stella_vslam/module/local_map_updater.cc index 224fabbb5..fd9d4545f 100644 --- a/src/stella_vslam/module/local_map_updater.cc +++ b/src/stella_vslam/module/local_map_updater.cc @@ -98,7 +98,7 @@ auto local_map_updater::find_second_local_keyframes(const std::vector& keyfrm) { + auto add_second_local_keyframe = [&second_local_keyfrms, &already_found_keyfrm_ids](const std::shared_ptr& keyfrm) { if (!keyfrm) { return false; } diff --git a/src/stella_vslam/module/loop_detector.h b/src/stella_vslam/module/loop_detector.h index 2dc7dbffb..1c6958ca0 100644 --- a/src/stella_vslam/module/loop_detector.h +++ b/src/stella_vslam/module/loop_detector.h @@ -122,8 +122,6 @@ class loop_detector { //! BoW database data::bow_database* bow_db_; - //! BoW vocabulary - data::bow_vocabulary* bow_vocab_; //! transform optimizer const optimize::transform_optimizer transform_optimizer_; @@ -133,8 +131,6 @@ class loop_detector { //! flag which indicates the loop detector is enabled or not std::atomic loop_detector_is_enabled_{true}; - //! for stereo/RGBD models, fix scale when estimating Sim3 - const bool fix_scale_in_Sim3_estimation_; //! the threshold of the number of mutual matches after the Sim3 estimation const unsigned int num_final_matches_thr_; diff --git a/src/stella_vslam/system.cc b/src/stella_vslam/system.cc index f5e3dda3e..19f4d23d5 100644 --- a/src/stella_vslam/system.cc +++ b/src/stella_vslam/system.cc @@ -323,7 +323,7 @@ data::frame system::create_stereo_frame(const cv::Mat& left_img, const cv::Mat& std::thread thread_left([this, &frm_obs, &img_gray, &mask]() { extractor_left_->extract(img_gray, mask, keypts_, frm_obs.descriptors_); }); - std::thread thread_right([this, &frm_obs, &right_img_gray, &mask, &keypts_right, &descriptors_right]() { + std::thread thread_right([this,&right_img_gray, &mask, &keypts_right, &descriptors_right]() { extractor_right_->extract(right_img_gray, mask, keypts_right, descriptors_right); }); thread_left.join(); diff --git a/src/stella_vslam/system.h b/src/stella_vslam/system.h index 69b1760e5..f0abf252a 100644 --- a/src/stella_vslam/system.h +++ b/src/stella_vslam/system.h @@ -238,8 +238,6 @@ class system { feature::orb_extractor* extractor_left_ = nullptr; //! ORB extractor for right image feature::orb_extractor* extractor_right_ = nullptr; - //! ORB extractor only when used in initializing - feature::orb_extractor* ini_extractor_left_ = nullptr; //! marker detector marker_detector::base* marker_detector_ = nullptr;