-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'MIT-SPARK:main' into main
- Loading branch information
Showing
16 changed files
with
402 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
|
||
project(json_download NONE) | ||
|
||
include(ExternalProject) | ||
ExternalProject_Add( | ||
json | ||
URL https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.zip | ||
# GIT_REPOSITORY "https://github.com/nlohmann/json.git" GIT_TAG "v3.9.1" GIT_SHALLOW | ||
# TRUE | ||
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/json-src" | ||
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/json-build" | ||
CONFIGURE_COMMAND "" | ||
BUILD_COMMAND "" | ||
INSTALL_COMMAND "" | ||
TEST_COMMAND "" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
### Download and unzip the vocabularly file | ||
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/vocab/mit_voc.yml) | ||
message(STATUS "Downloading vocabulary file from drive.") | ||
file(DOWNLOAD | ||
https://drive.google.com/uc?export=download&confirm=9iBg&id=1N4y0HbgA3PHQ73ZxFJvy5dgvV_0cTBYF | ||
${CMAKE_CURRENT_SOURCE_DIR}/vocab.zip | ||
SHOW_PROGRESS | ||
STATUS voc_download_success | ||
TIMEOUT 60) | ||
if(voc_download_success) | ||
message(STATUS "Unzipping vocabulary file.") | ||
|
||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzf ${CMAKE_CURRENT_SOURCE_DIR}/vocab.zip | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/) | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_CURRENT_SOURCE_DIR}/vocab.zip) | ||
else(voc_download_success) | ||
message(STATUS "Failed to download vocabulary file. Please download manually.") | ||
endif(voc_download_success) | ||
else() | ||
message(STATUS "Vocabulary file exists, will not download.") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright Notes | ||
* | ||
* Authors: Yun Chang ([email protected]) | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <pose_graph_tools_msgs/BowVector.h> | ||
#include <pose_graph_tools_msgs/VLCFrameMsg.h> | ||
|
||
#include <map> | ||
|
||
#include "kimera_multi_lcd/types.h" | ||
|
||
namespace kimera_multi_lcd { | ||
|
||
// Save BoW vectors | ||
void saveBowVectors(const std::map<PoseId, pose_graph_tools_msgs::BowVector>& bow_vectors, | ||
const std::string& filename); | ||
|
||
void saveBowVectors(const std::map<PoseId, DBoW2::BowVector>& bow_vectors, | ||
const std::string& filename); | ||
|
||
// Save VLC Frames | ||
void saveVLCFrames(const std::map<PoseId, pose_graph_tools_msgs::VLCFrameMsg>& vlc_frames, | ||
const std::string& filename); | ||
|
||
void saveVLCFrames(const std::map<PoseId, VLCFrame>& vlc_frames, | ||
const std::string& filename); | ||
|
||
// Save BoW vectors | ||
void loadBowVectors(const std::string& filename, | ||
std::map<PoseId, pose_graph_tools_msgs::BowVector>& bow_vectors); | ||
|
||
void loadBowVectors(const std::string& filename, | ||
std::map<PoseId, DBoW2::BowVector>& bow_vectors); | ||
|
||
// Save VLC Frames | ||
void loadVLCFrames(const std::string& filename, | ||
std::map<PoseId, pose_graph_tools_msgs::VLCFrameMsg>& vlc_frames); | ||
|
||
void loadVLCFrames(const std::string& filename, std::map<PoseId, VLCFrame>& vlc_frames); | ||
} // namespace kimera_multi_lcd |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#pragma once | ||
#include <pose_graph_tools_msgs/BowVector.h> | ||
#include <pose_graph_tools_msgs/VLCFrameMsg.h> | ||
|
||
#include <nlohmann/json.hpp> | ||
|
||
namespace pose_graph_tools_msgs { | ||
|
||
void to_json(nlohmann::json& j, const pose_graph_tools_msgs::BowVector& bow_vector); | ||
|
||
void from_json(const nlohmann::json& j, pose_graph_tools_msgs::BowVector& bow_vector); | ||
|
||
void to_json(nlohmann::json& j, const pose_graph_tools_msgs::VLCFrameMsg& vlc_frame); | ||
|
||
void from_json(const nlohmann::json& j, pose_graph_tools_msgs::VLCFrameMsg& vlc_frame); | ||
} // namespace pose_graph_tools_msgs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.