Skip to content

Commit

Permalink
updating kimera_vio sha, starting to work on kimera script
Browse files Browse the repository at this point in the history
  • Loading branch information
efahnestock committed Dec 18, 2024
1 parent 1e119c9 commit 19192d6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ http_archive(
urls = ["https://github.com/ewfuentes/Kimera-VIO/archive/master.zip"],
strip_prefix = "Kimera-VIO-master",
build_file = "//third_party:BUILD.kimera_vio",
integrity = "sha256-+hQBAPv4bDRbYnH1iXeuHTNsWnfXgqZ0FoUTv6usQ/k=",
integrity = "sha256-dWzux1ioSB8LfovhQFAcbmlotNo19x++7ptw9S64UGM=",
)

http_archive(
Expand Down
11 changes: 11 additions & 0 deletions experimental/overhead_matching/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,14 @@ cc_test(
"//common/video:image_compare",
]
)

cc_test(
name = "kimera_vio_pipeline_test",
srcs = ["kimera_vio_pipeline_test.cc"],
copts = ["-Wno-sign-compare", "-Wno-vla"],
deps = [
":kimera_spectacular_data_provider",
"@com_google_googletest//:gtest_main",
"@fmt",
]
)
15 changes: 11 additions & 4 deletions experimental/overhead_matching/kimera_vio_pipeline_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ int main(int argc, char* argv[]) {
// Build dataset parser.
VIO::DataProviderInterface::Ptr dataset_parser =
std::make_unique<robot::experimental::overhead_matching::SpectacularDataProviderInterface>(
FLAGS_dataset_path,
0,
std::numeric_limits<int>::max(),
vio_params);

CHECK(dataset_parser);
Expand All @@ -42,18 +45,22 @@ int main(int argc, char* argv[]) {
// Register callback to shutdown data provider in case VIO pipeline
// shutsdown.
vio_pipeline->registerShutdownCallback(
std::bind(&VIO::DataProviderModule::shutdown, dataset_parser));
[&dataset_parser](){ dataset_parser->shutdown();});

// Register callback to vio pipeline.
dataset_parser->registerImuSingleCallback(
std::bind(&VIO::Pipeline::fillSingleImuQueue, vio_pipeline, std::placeholders::_1));
[&vio_pipeline](const auto& arg){ vio_pipeline->fillSingleImuQueue(arg); });
// We use blocking variants to avoid overgrowing the input queues (use
// the non-blocking versions with real sensor streams)
dataset_parser->registerLeftFrameCallback(
std::bind(&VIO::Pipeline::fillLeftFrameQueue, vio_pipeline, std::placeholders::_1));
[&vio_pipeline](auto arg){ vio_pipeline->fillLeftFrameQueue(std::move(arg)); });

dataset_parser->registerDepthFrameCallback(
std::bind(&VIO::RgbdImuPipeline::fillDepthFrameQueue, vio_pipeline, std::placeholders::_1));
[&vio_pipeline](auto arg){
auto rgbd_pipeline = std::dynamic_pointer_cast<VIO::RgbdImuPipeline>(vio_pipeline);
ROBOT_CHECK(rgbd_pipeline);
rgbd_pipeline->fillDepthFrameQueue(std::move(arg));
});

// Spin dataset.
auto tic = VIO::utils::Timer::tic();
Expand Down

0 comments on commit 19192d6

Please sign in to comment.