From 88c383f1b6a72626b1e5b1349c1c61147ed6c80e Mon Sep 17 00:00:00 2001 From: "marcin.matecki" Date: Fri, 20 Mar 2026 17:04:54 +0100 Subject: [PATCH 1/7] upgrade step 3 import benchmark --- .../multi_session_registration.cpp | 130 +++++++++++++++++- 1 file changed, 123 insertions(+), 7 deletions(-) diff --git a/apps/multi_session_registration/multi_session_registration.cpp b/apps/multi_session_registration/multi_session_registration.cpp index 2c4c06e6..cb428de4 100644 --- a/apps/multi_session_registration/multi_session_registration.cpp +++ b/apps/multi_session_registration/multi_session_registration.cpp @@ -2183,6 +2183,117 @@ void settings_gui() } } + static bool open_import_popup = false; + static bool show_instruction = false; + + ImGui::Dummy(ImVec2(0, 10)); + + if (ImGui::Button("Import Benchmark Output Folders")) + { + open_import_popup = true; + ImGui::OpenPopup("Import Benchmark"); + } + + if (ImGui::BeginPopupModal("Import Benchmark", NULL, ImGuiWindowFlags_AlwaysAutoResize)) + { + ImGui::Text("Import benchmark sessions"); + ImGui::Separator(); + ImGui::SetNextWindowSize(ImVec2(740, 340), ImGuiCond_Once); + if (ImGui::Button("Instruction")) + { + show_instruction = !show_instruction; + } + + ImGui::Dummy(ImVec2(0, 10)); + if (ImGui::Button("Select Folder")) + { + const std::string algorithms[] = { + "ct-icp", "glim", "super-lio", "dlio", "i2ekf-lo", + "superOdom", "lego-loam", "faster-lio", + "kiss-icp", "fast-lio", "lio-ekf", "genz-icp", "point-lio", + "ig-lio", "dlo", "lidar_odometry_ros_wrapper" + }; + + std::vector missing; + std::unordered_map algo_map; + + for (const auto& algo : algorithms) { + if (algo == "kiss-icp") { + algo_map[algo] = "output_hdmapping-kiss"; + } else if (algo == "genz-icp") { + algo_map[algo] = "output_hdmapping-genz"; + } else if (algo == "lidar_odometry_ros_wrapper") { + algo_map[algo] = "output_hdmapping-lidar-odometry-ros"; + } else { + algo_map[algo] = "output_hdmapping-" + algo; + } + } + + fs::path path = fs::path(mandeye::fd::SelectFolder("Add sessions")); + + for (const auto& algo : algorithms) { + fs::path output_folder = path / algo / algo_map[algo]; + fs::path session_file = output_folder / "session.json"; + + if (fs::is_directory(output_folder)) { + auto it = std::find( + project_settings.session_file_names.begin(), + project_settings.session_file_names.end(), + session_file + ); + + if (it == project_settings.session_file_names.end()) { + std::cout << "Adding session file: '" << session_file << "'" << std::endl; + project_settings.session_file_names.push_back(session_file); + } + } else { + missing.push_back(output_folder); + } + } + + for (const auto& miss : missing) { + std::cout << miss << " doesn't exist" << std::endl; + } + } + + ImGui::SameLine(); + + if (ImGui::Button("Close")) + { + ImGui::CloseCurrentPopup(); + show_instruction = false; + } + + if (show_instruction) + { + ImGui::BeginChild("InstructionChild", ImVec2(720, 300), true, ImGuiWindowFlags_HorizontalScrollbar); + ImGui::Separator(); + + ImGui::TextWrapped("Required folder structure:"); + + ImGui::Spacing(); + + ImGui::TextWrapped( + "Folders must follow the structure generated in benchmark-HDMapping-Orchestration (step 3):"); + ImGui::TextWrapped( + "https://github.com/MapsHD/benchmark-HDMapping-Orchestration"); + + ImGui::Spacing(); + ImGui::Separator(); + + ImGui::BulletText("chosen_folder/"); + ImGui::BulletText(" ct-icp/output_hdmapping-ct-icp/session.json"); + ImGui::BulletText(" glim/output_hdmapping-glim/session.json"); + ImGui::BulletText(" kiss-icp/output_hdmapping-kiss/session.json"); + ImGui::BulletText(" fast-lio/output_hdmapping-fast-lio/session.json"); + ImGui::BulletText(" ... (same pattern for other algorithms)"); + + ImGui::Spacing(); + ImGui::EndChild(); + } + + ImGui::EndPopup(); + } if (project_settings.session_file_names.size() > 0) { ImGui::Separator(); @@ -3822,17 +3933,22 @@ pose_tait_bryan_from_affine_matrix(m_src.inverse() * m_g); if (ImGui::Button("Remove")) { - for (size_t i = project_settings.session_file_names.size() - 1; i >= 0; i--) + for (size_t i = project_settings.session_file_names.size(); i > 0; --i) { - if (session_marked_for_removal[i]) + size_t idx = i - 1; + + if (session_marked_for_removal[idx]) { - std::cout << "Removing session: " << project_settings.session_file_names[i] << std::endl; - project_settings.session_file_names.erase(project_settings.session_file_names.begin() + i); - if ((sessions.size() > 0) && i < sessions.size()) - sessions.erase(sessions.begin() + i); + std::cout << "Removing session: " << project_settings.session_file_names[idx] << std::endl; + + project_settings.session_file_names.erase( + project_settings.session_file_names.begin() + idx + ); + + if (idx < sessions.size()) + sessions.erase(sessions.begin() + idx); } } - session_marked_for_removal.clear(); if (!sessions.empty()) From 7de16a44949e145d696f34d19ef183b4ae10d2e6 Mon Sep 17 00:00:00 2001 From: "marcin.matecki" Date: Fri, 20 Mar 2026 21:41:50 +0100 Subject: [PATCH 2/7] update step3 --- .../multi_session_registration.cpp | 86 +++++++++---------- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/apps/multi_session_registration/multi_session_registration.cpp b/apps/multi_session_registration/multi_session_registration.cpp index cb428de4..74aacc41 100644 --- a/apps/multi_session_registration/multi_session_registration.cpp +++ b/apps/multi_session_registration/multi_session_registration.cpp @@ -2186,14 +2186,14 @@ void settings_gui() static bool open_import_popup = false; static bool show_instruction = false; - ImGui::Dummy(ImVec2(0, 10)); + ImGui::Dummy(ImVec2(0, 10)); if (ImGui::Button("Import Benchmark Output Folders")) { open_import_popup = true; ImGui::OpenPopup("Import Benchmark"); } - + if (ImGui::BeginPopupModal("Import Benchmark", NULL, ImGuiWindowFlags_AlwaysAutoResize)) { ImGui::Text("Import benchmark sessions"); @@ -2207,51 +2207,60 @@ void settings_gui() ImGui::Dummy(ImVec2(0, 10)); if (ImGui::Button("Select Folder")) { - const std::string algorithms[] = { - "ct-icp", "glim", "super-lio", "dlio", "i2ekf-lo", - "superOdom", "lego-loam", "faster-lio", - "kiss-icp", "fast-lio", "lio-ekf", "genz-icp", "point-lio", - "ig-lio", "dlo", "lidar_odometry_ros_wrapper" - }; + const std::string algorithms[] = { "ct-icp", "glim", "super-lio", "dlio", + "i2ekf-lo", "superOdom", "lego-loam", "faster-lio", + "kiss-icp", "fast-lio", "lio-ekf", "genz-icp", + "point-lio", "ig-lio", "dlo", "lidar_odometry_ros_wrapper" }; std::vector missing; std::unordered_map algo_map; - for (const auto& algo : algorithms) { - if (algo == "kiss-icp") { + for (const auto& algo : algorithms) + { + if (algo == "kiss-icp") + { algo_map[algo] = "output_hdmapping-kiss"; - } else if (algo == "genz-icp") { + } + else if (algo == "genz-icp") + { algo_map[algo] = "output_hdmapping-genz"; - } else if (algo == "lidar_odometry_ros_wrapper") { + } + else if (algo == "lidar_odometry_ros_wrapper") + { algo_map[algo] = "output_hdmapping-lidar-odometry-ros"; - } else { + } + else + { algo_map[algo] = "output_hdmapping-" + algo; } } fs::path path = fs::path(mandeye::fd::SelectFolder("Add sessions")); - for (const auto& algo : algorithms) { + for (const auto& algo : algorithms) + { fs::path output_folder = path / algo / algo_map[algo]; fs::path session_file = output_folder / "session.json"; - if (fs::is_directory(output_folder)) { - auto it = std::find( - project_settings.session_file_names.begin(), - project_settings.session_file_names.end(), - session_file - ); + if (fs::is_directory(output_folder)) + { + auto it = + std::find(project_settings.session_file_names.begin(), project_settings.session_file_names.end(), session_file); - if (it == project_settings.session_file_names.end()) { + if (it == project_settings.session_file_names.end()) + { std::cout << "Adding session file: '" << session_file << "'" << std::endl; project_settings.session_file_names.push_back(session_file); } - } else { + } + else + { missing.push_back(output_folder); } } - for (const auto& miss : missing) { + for (const auto& miss : missing) + { std::cout << miss << " doesn't exist" << std::endl; } } @@ -2273,10 +2282,8 @@ void settings_gui() ImGui::Spacing(); - ImGui::TextWrapped( - "Folders must follow the structure generated in benchmark-HDMapping-Orchestration (step 3):"); - ImGui::TextWrapped( - "https://github.com/MapsHD/benchmark-HDMapping-Orchestration"); + ImGui::TextWrapped("Folders must follow the structure generated in benchmark-HDMapping-Orchestration (step 3):"); + ImGui::TextWrapped("https://github.com/MapsHD/benchmark-HDMapping-Orchestration"); ImGui::Spacing(); ImGui::Separator(); @@ -3389,10 +3396,7 @@ pose_tait_bryan_from_affine_matrix(m_src.inverse() * m_g); continue; } - outfile << "timestampLidar,x,y,z," - << "r00,r01,r02," - << "r10,r11,r12," - << "r20,r21,r22\n"; + outfile << "timestampLidar,x,y,z," << "r00,r01,r02," << "r10,r11,r12," << "r20,r21,r22\n"; for (const auto& pc : session.point_clouds_container.point_clouds) { @@ -3447,8 +3451,7 @@ pose_tait_bryan_from_affine_matrix(m_src.inverse() * m_g); continue; } - outfile << "timestampUnix,x,y,z," - << "r00,r01,r02,r10,r11,r12,r20,r21,r22\n"; + outfile << "timestampUnix,x,y,z," << "r00,r01,r02,r10,r11,r12,r20,r21,r22\n"; for (const auto& pc : session.point_clouds_container.point_clouds) { @@ -3499,8 +3502,7 @@ pose_tait_bryan_from_affine_matrix(m_src.inverse() * m_g); continue; } - outfile << "timestampLidar,timestampUnix,x,y,z," - << "r00,r01,r02,r10,r11,r12,r20,r21,r22\n"; + outfile << "timestampLidar,timestampUnix,x,y,z," << "r00,r01,r02,r10,r11,r12,r20,r21,r22\n"; for (const auto& pc : session.point_clouds_container.point_clouds) { @@ -3769,14 +3771,12 @@ pose_tait_bryan_from_affine_matrix(m_src.inverse() * m_g); { ImGui::BeginTooltip(); ImGui::Text("Point cloud alignment (registration) algorithm"); - ImGui::Text( - "Probabilistic alternative to ICP that models one cloud (the target)\nas a set of Gaussian distributions " - "rather than raw points"); + ImGui::Text("Probabilistic alternative to ICP that models one cloud (the target)\nas a set of Gaussian distributions " + "rather than raw points"); ImGui::Text( "Robust for rough initial poses but can converge to a local optimum\nif the initial misalignment is very large"); - ImGui::Text( - "Known for being faster and smoother in optimization because\nit replaces discrete point-point correspondences " - "with continuous probability density functions."); + ImGui::Text("Known for being faster and smoother in optimization because\nit replaces discrete point-point correspondences " + "with continuous probability density functions."); ImGui::EndTooltip(); } @@ -3941,9 +3941,7 @@ pose_tait_bryan_from_affine_matrix(m_src.inverse() * m_g); { std::cout << "Removing session: " << project_settings.session_file_names[idx] << std::endl; - project_settings.session_file_names.erase( - project_settings.session_file_names.begin() + idx - ); + project_settings.session_file_names.erase(project_settings.session_file_names.begin() + idx); if (idx < sessions.size()) sessions.erase(sessions.begin() + idx); From b77c679b62927fa7b57be72ad91318298d646a58 Mon Sep 17 00:00:00 2001 From: "marcin.matecki" Date: Fri, 20 Mar 2026 22:06:28 +0100 Subject: [PATCH 3/7] upgrade step3 --- .../multi_session_registration.cpp | 10 +- llvm.sh | 237 ++++++++++++++++++ 2 files changed, 243 insertions(+), 4 deletions(-) create mode 100755 llvm.sh diff --git a/apps/multi_session_registration/multi_session_registration.cpp b/apps/multi_session_registration/multi_session_registration.cpp index 74aacc41..61d9f9df 100644 --- a/apps/multi_session_registration/multi_session_registration.cpp +++ b/apps/multi_session_registration/multi_session_registration.cpp @@ -3771,12 +3771,14 @@ pose_tait_bryan_from_affine_matrix(m_src.inverse() * m_g); { ImGui::BeginTooltip(); ImGui::Text("Point cloud alignment (registration) algorithm"); - ImGui::Text("Probabilistic alternative to ICP that models one cloud (the target)\nas a set of Gaussian distributions " - "rather than raw points"); + ImGui::Text( + "Probabilistic alternative to ICP that models one cloud (the target)\nas a set of Gaussian distributions " + "rather than raw points"); ImGui::Text( "Robust for rough initial poses but can converge to a local optimum\nif the initial misalignment is very large"); - ImGui::Text("Known for being faster and smoother in optimization because\nit replaces discrete point-point correspondences " - "with continuous probability density functions."); + ImGui::Text( + "Known for being faster and smoother in optimization because\nit replaces discrete point-point correspondences " + "with continuous probability density functions."); ImGui::EndTooltip(); } diff --git a/llvm.sh b/llvm.sh new file mode 100755 index 00000000..1aef9a61 --- /dev/null +++ b/llvm.sh @@ -0,0 +1,237 @@ +#!/bin/bash +################################################################################ +# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +################################################################################ +# +# This script will install the llvm toolchain on the different +# Debian and Ubuntu versions + +# This script is stored on: +# https://github.com/opencollab/llvm-jenkins.debian.net/blob/master/llvm.sh + +set -eux + +usage() { + set +x + echo "Usage: $0 [llvm_major_version] [all] [OPTIONS]" 1>&2 + echo -e "all\t\t\tInstall all packages." 1>&2 + echo -e "-n=code_name\t\tSpecifies the distro codename, for example bionic" 1>&2 + echo -e "-h\t\t\tPrints this help." 1>&2 + echo -e "-m=repo_base_url\tSpecifies the base URL from which to download." 1>&2 + exit 1; +} + +CURRENT_LLVM_STABLE=20 +BASE_URL="http://apt.llvm.org" + +NEW_DEBIAN_DISTROS=("trixie" "forky" "unstable") +# Set default values for commandline arguments +# We default to the current stable branch of LLVM +LLVM_VERSION=$CURRENT_LLVM_STABLE +ALL=0 +DISTRO=$(lsb_release -is) +VERSION_CODENAME=$(lsb_release -cs) +VERSION=$(lsb_release -sr) +UBUNTU_CODENAME="" +CODENAME_FROM_ARGUMENTS="" +# Obtain VERSION_CODENAME and UBUNTU_CODENAME (for Ubuntu and its derivatives) +source /etc/os-release +DISTRO=${DISTRO,,} + +# Check for required tools + +# Check if this is a new Debian distro +is_new_debian=0 +if [[ "${DISTRO}" == "debian" ]]; then + for new_distro in "${NEW_DEBIAN_DISTROS[@]}"; do + if [[ "${VERSION_CODENAME}" == "${new_distro}" ]]; then + is_new_debian=1 + break + fi + done +fi + +# Check for required tools +needed_binaries=(lsb_release wget gpg) +# add-apt-repository is not needed for newer Debian distros +if [[ $is_new_debian -eq 0 ]]; then + needed_binaries+=(add-apt-repository) +fi + +missing_binaries=() +using_curl= +for binary in "${needed_binaries[@]}"; do + if ! command -v $binary &>/dev/null ; then + if [[ "$binary" == "wget" ]] && command -v curl &>/dev/null; then + using_curl=1 + continue + fi + missing_binaries+=($binary) + fi +done + +if [[ ${#missing_binaries[@]} -gt 0 ]] ; then + echo "You are missing some tools this script requires: ${missing_binaries[@]}" + echo "(hint: apt install lsb-release wget software-properties-common gnupg)" + echo "curl is also supported" + exit 4 +fi + +case ${DISTRO} in + debian) + # Debian Forky has a workaround because of + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1038383 + if [[ "${VERSION}" == "unstable" ]] || [[ "${VERSION}" == "testing" ]] || [[ "${VERSION_CODENAME}" == "forky" ]]; then + CODENAME=unstable + LINKNAME= + else + # "stable" Debian release + CODENAME=${VERSION_CODENAME} + LINKNAME=-${CODENAME} + fi + ;; + *) + # ubuntu and its derivatives + if [[ -n "${UBUNTU_CODENAME}" ]]; then + CODENAME=${UBUNTU_CODENAME} + if [[ -n "${CODENAME}" ]]; then + LINKNAME=-${CODENAME} + fi + fi + ;; +esac + +# read optional command line arguments +if [ "$#" -ge 1 ] && [ "${1::1}" != "-" ]; then + if [ "$1" != "all" ]; then + LLVM_VERSION=$1 + else + # special case for ./llvm.sh all + ALL=1 + fi + OPTIND=2 + if [ "$#" -ge 2 ]; then + if [ "$2" == "all" ]; then + # Install all packages + ALL=1 + OPTIND=3 + fi + fi +fi + +while getopts ":hm:n:" arg; do + case $arg in + h) + usage + ;; + m) + BASE_URL=${OPTARG} + ;; + n) + CODENAME=${OPTARG} + if [[ "${CODENAME}" == "unstable" ]]; then + # link name does not apply to unstable repository + LINKNAME= + else + LINKNAME=-${CODENAME} + fi + CODENAME_FROM_ARGUMENTS="true" + ;; + esac +done + +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root!" + exit 1 +fi + +declare -A LLVM_VERSION_PATTERNS +LLVM_VERSION_PATTERNS[9]="-9" +LLVM_VERSION_PATTERNS[10]="-10" +LLVM_VERSION_PATTERNS[11]="-11" +LLVM_VERSION_PATTERNS[12]="-12" +LLVM_VERSION_PATTERNS[13]="-13" +LLVM_VERSION_PATTERNS[14]="-14" +LLVM_VERSION_PATTERNS[15]="-15" +LLVM_VERSION_PATTERNS[16]="-16" +LLVM_VERSION_PATTERNS[17]="-17" +LLVM_VERSION_PATTERNS[18]="-18" +LLVM_VERSION_PATTERNS[19]="-19" +LLVM_VERSION_PATTERNS[20]="-20" +LLVM_VERSION_PATTERNS[21]="-21" +LLVM_VERSION_PATTERNS[22]="-22" +LLVM_VERSION_PATTERNS[23]="" + +if [ ! ${LLVM_VERSION_PATTERNS[$LLVM_VERSION]+_} ]; then + echo "This script does not support LLVM version $LLVM_VERSION" + exit 3 +fi + +LLVM_VERSION_STRING=${LLVM_VERSION_PATTERNS[$LLVM_VERSION]} + +# join the repository name +if [[ -n "${CODENAME}" ]]; then + REPO_NAME="deb ${BASE_URL}/${CODENAME}/ llvm-toolchain${LINKNAME}${LLVM_VERSION_STRING} main" + # check if the repository exists for the distro and version + if ! wget -q --method=HEAD ${BASE_URL}/${CODENAME} &> /dev/null && \ + ! curl -sSLI -XHEAD ${BASE_URL}/${CODENAME} &> /dev/null; then + if [[ -n "${CODENAME_FROM_ARGUMENTS}" ]]; then + echo "Specified codename '${CODENAME}' is not supported by this script." + else + echo "Distribution '${DISTRO}' in version '${VERSION}' is not supported by this script." + fi + exit 2 + fi +fi + + +# install everything + +if [[ ! -f /etc/apt/trusted.gpg.d/apt.llvm.org.asc ]]; then + # download GPG key once + if [[ -z "$using_curl" ]]; then + wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc + else + curl -sSL https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc + fi +fi + +if [[ -z "`apt-key list 2> /dev/null | grep -i llvm`" ]]; then + # Delete the key in the old format + apt-key del AF4F7421 || true +fi + + +# Add repository based on distribution +if [[ "${VERSION_CODENAME}" == "bookworm" ]]; then + # add it twice to workaround: + # https://github.com/llvm/llvm-project/issues/62475 + add-apt-repository -y "${REPO_NAME}" + add-apt-repository -y "${REPO_NAME}" +elif [[ $is_new_debian -eq 1 ]]; then + # workaround missing add-apt-repository in newer Debian and use new source.list format + SOURCES_FILE="/etc/apt/sources.list.d/http_apt_llvm_org_${CODENAME}_-${VERSION_CODENAME}.sources" + TEXT_TO_ADD="Types: deb +Architectures: amd64 arm64 +Signed-By: /etc/apt/trusted.gpg.d/apt.llvm.org.asc +URIs: ${BASE_URL}/${CODENAME}/ +Suites: llvm-toolchain${LINKNAME}${LLVM_VERSION_STRING} +Components: main" + echo "$TEXT_TO_ADD" | tee -a "$SOURCES_FILE" > /dev/null +else + add-apt-repository -y "${REPO_NAME}" +fi + +apt-get update +PKG="clang-$LLVM_VERSION lldb-$LLVM_VERSION lld-$LLVM_VERSION clangd-$LLVM_VERSION" +if [[ $ALL -eq 1 ]]; then + # same as in test-install.sh + # No worries if we have dups + PKG="$PKG clang-tidy-$LLVM_VERSION clang-format-$LLVM_VERSION clang-tools-$LLVM_VERSION llvm-$LLVM_VERSION-dev lld-$LLVM_VERSION lldb-$LLVM_VERSION llvm-$LLVM_VERSION-tools libomp-$LLVM_VERSION-dev libc++-$LLVM_VERSION-dev libc++abi-$LLVM_VERSION-dev libclang-common-$LLVM_VERSION-dev libclang-$LLVM_VERSION-dev libclang-cpp$LLVM_VERSION-dev liblldb-$LLVM_VERSION-dev libunwind-$LLVM_VERSION-dev" + if test $LLVM_VERSION -gt 14; then + PKG="$PKG libclang-rt-$LLVM_VERSION-dev libpolly-$LLVM_VERSION-dev" + fi +fi +apt-get install -y $PKG From 62abd48b5291cfb48e494984d864246851e9415e Mon Sep 17 00:00:00 2001 From: "marcin.matecki" Date: Fri, 20 Mar 2026 22:09:37 +0100 Subject: [PATCH 4/7] upgrade step3 --- .../multi_session_registration.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/apps/multi_session_registration/multi_session_registration.cpp b/apps/multi_session_registration/multi_session_registration.cpp index 61d9f9df..74aacc41 100644 --- a/apps/multi_session_registration/multi_session_registration.cpp +++ b/apps/multi_session_registration/multi_session_registration.cpp @@ -3771,14 +3771,12 @@ pose_tait_bryan_from_affine_matrix(m_src.inverse() * m_g); { ImGui::BeginTooltip(); ImGui::Text("Point cloud alignment (registration) algorithm"); - ImGui::Text( - "Probabilistic alternative to ICP that models one cloud (the target)\nas a set of Gaussian distributions " - "rather than raw points"); + ImGui::Text("Probabilistic alternative to ICP that models one cloud (the target)\nas a set of Gaussian distributions " + "rather than raw points"); ImGui::Text( "Robust for rough initial poses but can converge to a local optimum\nif the initial misalignment is very large"); - ImGui::Text( - "Known for being faster and smoother in optimization because\nit replaces discrete point-point correspondences " - "with continuous probability density functions."); + ImGui::Text("Known for being faster and smoother in optimization because\nit replaces discrete point-point correspondences " + "with continuous probability density functions."); ImGui::EndTooltip(); } From 42726e51da90227f13418c1e51704da833b771cb Mon Sep 17 00:00:00 2001 From: "marcin.matecki" Date: Fri, 20 Mar 2026 22:22:43 +0100 Subject: [PATCH 5/7] upgrade step3 --- .../multi_session_registration.cpp | 142 ++---------------- 1 file changed, 16 insertions(+), 126 deletions(-) diff --git a/apps/multi_session_registration/multi_session_registration.cpp b/apps/multi_session_registration/multi_session_registration.cpp index 74aacc41..1a40875d 100644 --- a/apps/multi_session_registration/multi_session_registration.cpp +++ b/apps/multi_session_registration/multi_session_registration.cpp @@ -2183,124 +2183,6 @@ void settings_gui() } } - static bool open_import_popup = false; - static bool show_instruction = false; - - ImGui::Dummy(ImVec2(0, 10)); - - if (ImGui::Button("Import Benchmark Output Folders")) - { - open_import_popup = true; - ImGui::OpenPopup("Import Benchmark"); - } - - if (ImGui::BeginPopupModal("Import Benchmark", NULL, ImGuiWindowFlags_AlwaysAutoResize)) - { - ImGui::Text("Import benchmark sessions"); - ImGui::Separator(); - ImGui::SetNextWindowSize(ImVec2(740, 340), ImGuiCond_Once); - if (ImGui::Button("Instruction")) - { - show_instruction = !show_instruction; - } - - ImGui::Dummy(ImVec2(0, 10)); - if (ImGui::Button("Select Folder")) - { - const std::string algorithms[] = { "ct-icp", "glim", "super-lio", "dlio", - "i2ekf-lo", "superOdom", "lego-loam", "faster-lio", - "kiss-icp", "fast-lio", "lio-ekf", "genz-icp", - "point-lio", "ig-lio", "dlo", "lidar_odometry_ros_wrapper" }; - - std::vector missing; - std::unordered_map algo_map; - - for (const auto& algo : algorithms) - { - if (algo == "kiss-icp") - { - algo_map[algo] = "output_hdmapping-kiss"; - } - else if (algo == "genz-icp") - { - algo_map[algo] = "output_hdmapping-genz"; - } - else if (algo == "lidar_odometry_ros_wrapper") - { - algo_map[algo] = "output_hdmapping-lidar-odometry-ros"; - } - else - { - algo_map[algo] = "output_hdmapping-" + algo; - } - } - - fs::path path = fs::path(mandeye::fd::SelectFolder("Add sessions")); - - for (const auto& algo : algorithms) - { - fs::path output_folder = path / algo / algo_map[algo]; - fs::path session_file = output_folder / "session.json"; - - if (fs::is_directory(output_folder)) - { - auto it = - std::find(project_settings.session_file_names.begin(), project_settings.session_file_names.end(), session_file); - - if (it == project_settings.session_file_names.end()) - { - std::cout << "Adding session file: '" << session_file << "'" << std::endl; - project_settings.session_file_names.push_back(session_file); - } - } - else - { - missing.push_back(output_folder); - } - } - - for (const auto& miss : missing) - { - std::cout << miss << " doesn't exist" << std::endl; - } - } - - ImGui::SameLine(); - - if (ImGui::Button("Close")) - { - ImGui::CloseCurrentPopup(); - show_instruction = false; - } - - if (show_instruction) - { - ImGui::BeginChild("InstructionChild", ImVec2(720, 300), true, ImGuiWindowFlags_HorizontalScrollbar); - ImGui::Separator(); - - ImGui::TextWrapped("Required folder structure:"); - - ImGui::Spacing(); - - ImGui::TextWrapped("Folders must follow the structure generated in benchmark-HDMapping-Orchestration (step 3):"); - ImGui::TextWrapped("https://github.com/MapsHD/benchmark-HDMapping-Orchestration"); - - ImGui::Spacing(); - ImGui::Separator(); - - ImGui::BulletText("chosen_folder/"); - ImGui::BulletText(" ct-icp/output_hdmapping-ct-icp/session.json"); - ImGui::BulletText(" glim/output_hdmapping-glim/session.json"); - ImGui::BulletText(" kiss-icp/output_hdmapping-kiss/session.json"); - ImGui::BulletText(" fast-lio/output_hdmapping-fast-lio/session.json"); - ImGui::BulletText(" ... (same pattern for other algorithms)"); - - ImGui::Spacing(); - ImGui::EndChild(); - } - - ImGui::EndPopup(); - } if (project_settings.session_file_names.size() > 0) { ImGui::Separator(); @@ -3771,12 +3653,14 @@ pose_tait_bryan_from_affine_matrix(m_src.inverse() * m_g); { ImGui::BeginTooltip(); ImGui::Text("Point cloud alignment (registration) algorithm"); - ImGui::Text("Probabilistic alternative to ICP that models one cloud (the target)\nas a set of Gaussian distributions " - "rather than raw points"); + ImGui::Text( + "Probabilistic alternative to ICP that models one cloud (the target)\nas a set of Gaussian distributions " + "rather than raw points"); ImGui::Text( "Robust for rough initial poses but can converge to a local optimum\nif the initial misalignment is very large"); - ImGui::Text("Known for being faster and smoother in optimization because\nit replaces discrete point-point correspondences " - "with continuous probability density functions."); + ImGui::Text( + "Known for being faster and smoother in optimization because\nit replaces discrete point-point correspondences " + "with continuous probability density functions."); ImGui::EndTooltip(); } @@ -3933,20 +3817,26 @@ pose_tait_bryan_from_affine_matrix(m_src.inverse() * m_g); if (ImGui::Button("Remove")) { - for (size_t i = project_settings.session_file_names.size(); i > 0; --i) + for (size_t i = project_settings.session_file_names.size() - 1; i >= 0; i--) { - size_t idx = i - 1; - - if (session_marked_for_removal[idx]) + if (session_marked_for_removal[i]) { +<<<<<<< HEAD std::cout << "Removing session: " << project_settings.session_file_names[idx] << std::endl; project_settings.session_file_names.erase(project_settings.session_file_names.begin() + idx); if (idx < sessions.size()) sessions.erase(sessions.begin() + idx); +======= + std::cout << "Removing session: " << project_settings.session_file_names[i] << std::endl; + project_settings.session_file_names.erase(project_settings.session_file_names.begin() + i); + if ((sessions.size() > 0) && i < sessions.size()) + sessions.erase(sessions.begin() + i); +>>>>>>> parent of 88c383f (upgrade step 3 import benchmark) } } + session_marked_for_removal.clear(); if (!sessions.empty()) From 97ab061b9bfff89b667482495fe04755ae557cde Mon Sep 17 00:00:00 2001 From: "marcin.matecki" Date: Fri, 20 Mar 2026 22:26:49 +0100 Subject: [PATCH 6/7] upgrade step3 --- .../multi_session_registration.cpp | 132 ++++++++++++++++-- 1 file changed, 122 insertions(+), 10 deletions(-) diff --git a/apps/multi_session_registration/multi_session_registration.cpp b/apps/multi_session_registration/multi_session_registration.cpp index 1a40875d..61d9f9df 100644 --- a/apps/multi_session_registration/multi_session_registration.cpp +++ b/apps/multi_session_registration/multi_session_registration.cpp @@ -2183,6 +2183,124 @@ void settings_gui() } } + static bool open_import_popup = false; + static bool show_instruction = false; + + ImGui::Dummy(ImVec2(0, 10)); + + if (ImGui::Button("Import Benchmark Output Folders")) + { + open_import_popup = true; + ImGui::OpenPopup("Import Benchmark"); + } + + if (ImGui::BeginPopupModal("Import Benchmark", NULL, ImGuiWindowFlags_AlwaysAutoResize)) + { + ImGui::Text("Import benchmark sessions"); + ImGui::Separator(); + ImGui::SetNextWindowSize(ImVec2(740, 340), ImGuiCond_Once); + if (ImGui::Button("Instruction")) + { + show_instruction = !show_instruction; + } + + ImGui::Dummy(ImVec2(0, 10)); + if (ImGui::Button("Select Folder")) + { + const std::string algorithms[] = { "ct-icp", "glim", "super-lio", "dlio", + "i2ekf-lo", "superOdom", "lego-loam", "faster-lio", + "kiss-icp", "fast-lio", "lio-ekf", "genz-icp", + "point-lio", "ig-lio", "dlo", "lidar_odometry_ros_wrapper" }; + + std::vector missing; + std::unordered_map algo_map; + + for (const auto& algo : algorithms) + { + if (algo == "kiss-icp") + { + algo_map[algo] = "output_hdmapping-kiss"; + } + else if (algo == "genz-icp") + { + algo_map[algo] = "output_hdmapping-genz"; + } + else if (algo == "lidar_odometry_ros_wrapper") + { + algo_map[algo] = "output_hdmapping-lidar-odometry-ros"; + } + else + { + algo_map[algo] = "output_hdmapping-" + algo; + } + } + + fs::path path = fs::path(mandeye::fd::SelectFolder("Add sessions")); + + for (const auto& algo : algorithms) + { + fs::path output_folder = path / algo / algo_map[algo]; + fs::path session_file = output_folder / "session.json"; + + if (fs::is_directory(output_folder)) + { + auto it = + std::find(project_settings.session_file_names.begin(), project_settings.session_file_names.end(), session_file); + + if (it == project_settings.session_file_names.end()) + { + std::cout << "Adding session file: '" << session_file << "'" << std::endl; + project_settings.session_file_names.push_back(session_file); + } + } + else + { + missing.push_back(output_folder); + } + } + + for (const auto& miss : missing) + { + std::cout << miss << " doesn't exist" << std::endl; + } + } + + ImGui::SameLine(); + + if (ImGui::Button("Close")) + { + ImGui::CloseCurrentPopup(); + show_instruction = false; + } + + if (show_instruction) + { + ImGui::BeginChild("InstructionChild", ImVec2(720, 300), true, ImGuiWindowFlags_HorizontalScrollbar); + ImGui::Separator(); + + ImGui::TextWrapped("Required folder structure:"); + + ImGui::Spacing(); + + ImGui::TextWrapped("Folders must follow the structure generated in benchmark-HDMapping-Orchestration (step 3):"); + ImGui::TextWrapped("https://github.com/MapsHD/benchmark-HDMapping-Orchestration"); + + ImGui::Spacing(); + ImGui::Separator(); + + ImGui::BulletText("chosen_folder/"); + ImGui::BulletText(" ct-icp/output_hdmapping-ct-icp/session.json"); + ImGui::BulletText(" glim/output_hdmapping-glim/session.json"); + ImGui::BulletText(" kiss-icp/output_hdmapping-kiss/session.json"); + ImGui::BulletText(" fast-lio/output_hdmapping-fast-lio/session.json"); + ImGui::BulletText(" ... (same pattern for other algorithms)"); + + ImGui::Spacing(); + ImGui::EndChild(); + } + + ImGui::EndPopup(); + } if (project_settings.session_file_names.size() > 0) { ImGui::Separator(); @@ -3817,26 +3935,20 @@ pose_tait_bryan_from_affine_matrix(m_src.inverse() * m_g); if (ImGui::Button("Remove")) { - for (size_t i = project_settings.session_file_names.size() - 1; i >= 0; i--) + for (size_t i = project_settings.session_file_names.size(); i > 0; --i) { - if (session_marked_for_removal[i]) + size_t idx = i - 1; + + if (session_marked_for_removal[idx]) { -<<<<<<< HEAD std::cout << "Removing session: " << project_settings.session_file_names[idx] << std::endl; project_settings.session_file_names.erase(project_settings.session_file_names.begin() + idx); if (idx < sessions.size()) sessions.erase(sessions.begin() + idx); -======= - std::cout << "Removing session: " << project_settings.session_file_names[i] << std::endl; - project_settings.session_file_names.erase(project_settings.session_file_names.begin() + i); - if ((sessions.size() > 0) && i < sessions.size()) - sessions.erase(sessions.begin() + i); ->>>>>>> parent of 88c383f (upgrade step 3 import benchmark) } } - session_marked_for_removal.clear(); if (!sessions.empty()) From 5067a69ca649f9fc125af5a8028aee8b2ca3c9e4 Mon Sep 17 00:00:00 2001 From: "marcin.matecki" Date: Sun, 22 Mar 2026 11:18:15 +0100 Subject: [PATCH 7/7] fix win --- apps/multi_session_registration/multi_session_registration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/multi_session_registration/multi_session_registration.cpp b/apps/multi_session_registration/multi_session_registration.cpp index 61d9f9df..ace798f7 100644 --- a/apps/multi_session_registration/multi_session_registration.cpp +++ b/apps/multi_session_registration/multi_session_registration.cpp @@ -2250,7 +2250,7 @@ void settings_gui() if (it == project_settings.session_file_names.end()) { std::cout << "Adding session file: '" << session_file << "'" << std::endl; - project_settings.session_file_names.push_back(session_file); + project_settings.session_file_names.push_back(session_file.string()); } } else