Skip to content

Commit

Permalink
Rename function names for map database I/O
Browse files Browse the repository at this point in the history
  • Loading branch information
shinsumicco committed May 25, 2019
1 parent db3a7fb commit b9f9b8d
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions example/run_euroc_slam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void mono_tracking(const std::shared_ptr<openvslam::config>& cfg,

if (!map_db_path.empty()) {
// output the map database
SLAM.save_message_pack(map_db_path);
SLAM.save_map_database(map_db_path);
}

std::sort(track_times.begin(), track_times.end());
Expand Down Expand Up @@ -269,7 +269,7 @@ void stereo_tracking(const std::shared_ptr<openvslam::config>& cfg,

if (!map_db_path.empty()) {
// output the map database
SLAM.save_message_pack(map_db_path);
SLAM.save_map_database(map_db_path);
}

std::sort(track_times.begin(), track_times.end());
Expand Down
2 changes: 1 addition & 1 deletion example/run_image_localization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void mono_localization(const std::shared_ptr<openvslam::config>& cfg,
// build a SLAM system
openvslam::system SLAM(cfg, vocab_file_path);
// load the prebuilt map
SLAM.load_message_pack(map_db_path);
SLAM.load_map_database(map_db_path);
// startup the SLAM process (it does not need initialization of a map)
SLAM.startup(false);
// select to activate the mapping module or not
Expand Down
2 changes: 1 addition & 1 deletion example/run_image_slam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void mono_tracking(const std::shared_ptr<openvslam::config>& cfg,

if (!map_db_path.empty()) {
// output the map database
SLAM.save_message_pack(map_db_path);
SLAM.save_map_database(map_db_path);
}

std::sort(track_times.begin(), track_times.end());
Expand Down
4 changes: 2 additions & 2 deletions example/run_kitti_slam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void mono_tracking(const std::shared_ptr<openvslam::config>& cfg,

if (!map_db_path.empty()) {
// output the map database
SLAM.save_message_pack(map_db_path);
SLAM.save_map_database(map_db_path);
}

std::sort(track_times.begin(), track_times.end());
Expand Down Expand Up @@ -242,7 +242,7 @@ void stereo_tracking(const std::shared_ptr<openvslam::config>& cfg,

if (!map_db_path.empty()) {
// output the map database
SLAM.save_message_pack(map_db_path);
SLAM.save_map_database(map_db_path);
}

std::sort(track_times.begin(), track_times.end());
Expand Down
4 changes: 2 additions & 2 deletions example/run_tum_slam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void mono_tracking(const std::shared_ptr<openvslam::config>& cfg,

if (!map_db_path.empty()) {
// output the map database
SLAM.save_message_pack(map_db_path);
SLAM.save_map_database(map_db_path);
}

std::sort(track_times.begin(), track_times.end());
Expand Down Expand Up @@ -231,7 +231,7 @@ void rgbd_tracking(const std::shared_ptr<openvslam::config>& cfg,
}

if (!map_db_path.empty()) {
SLAM.save_message_pack(map_db_path);
SLAM.save_map_database(map_db_path);
}

std::sort(track_times.begin(), track_times.end());
Expand Down
2 changes: 1 addition & 1 deletion example/run_video_localization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void mono_localization(const std::shared_ptr<openvslam::config>& cfg,
// build a SLAM system
openvslam::system SLAM(cfg, vocab_file_path);
// load the prebuilt map
SLAM.load_message_pack(map_db_path);
SLAM.load_map_database(map_db_path);
// startup the SLAM process (it does not need initialization of a map)
SLAM.startup(false);
// select to activate the mapping module or not
Expand Down
2 changes: 1 addition & 1 deletion example/run_video_slam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void mono_tracking(const std::shared_ptr<openvslam::config>& cfg,

if (!map_db_path.empty()) {
// output the map database
SLAM.save_message_pack(map_db_path);
SLAM.save_map_database(map_db_path);
}

std::sort(track_times.begin(), track_times.end());
Expand Down
4 changes: 2 additions & 2 deletions src/openvslam/system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,14 @@ void system::save_keyframe_trajectory(const std::string& path, const std::string
resume_other_threads();
}

void system::load_message_pack(const std::string& path) {
void system::load_map_database(const std::string& path) const {
pause_other_threads();
io::map_database_io map_db_io(cam_db_, map_db_, bow_db_, bow_vocab_);
map_db_io.load_message_pack(path);
resume_other_threads();
}

void system::save_message_pack(const std::string& path) {
void system::save_map_database(const std::string& path) const {
pause_other_threads();
io::map_database_io map_db_io(cam_db_, map_db_, bow_db_, bow_vocab_);
map_db_io.save_message_pack(path);
Expand Down
4 changes: 2 additions & 2 deletions src/openvslam/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ class system {

void save_keyframe_trajectory(const std::string& path, const std::string& format) const;

void load_message_pack(const std::string& path);
void load_map_database(const std::string& path) const;

void save_message_pack(const std::string& path);
void save_map_database(const std::string& path) const;

private:
//! check reset request
Expand Down

0 comments on commit b9f9b8d

Please sign in to comment.