Skip to content

Commit

Permalink
Merge pull request #385 from ethz-asl/devel/clean_maplab_common
Browse files Browse the repository at this point in the history
Cleaning up in maplab common
  • Loading branch information
smauq authored Apr 19, 2023
2 parents 24a56d3 + e2fb04e commit ab0d958
Show file tree
Hide file tree
Showing 74 changed files with 64 additions and 4,220 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@
[submodule "dependencies/internal/plotty"]
path = dependencies/internal/plotty
url = git@github.com:ethz-asl/plotty.git
[submodule "dependencies/3rdparty/benchmark_catkin"]
path = dependencies/3rdparty/benchmark_catkin
url = git@github.com:ethz-asl/benchmark_catkin.git
[submodule "dependencies/internal/ros-system-monitor"]
path = dependencies/internal/ros-system-monitor
url = git@github.com:ethz-asl/ros-system-monitor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <descriptor-projection/descriptor-projection.h>
#include <localization-summary-map/unique-id.h>
#include <loopclosure-common/types.h>
#include <maplab-common/file-serializable.h>
#include <sensors/external-features.h>
#include <vi-map/mission-baseframe.h>
#include <vi-map/unique-id.h>
Expand Down
2 changes: 1 addition & 1 deletion algorithms/loopclosure/loopclosure-common/src/flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ DEFINE_string(
feature_descriptor_type, loop_closure::kFeatureDescriptorBRISK,
"The feature descriptors to use. [brisk, freak]");
DEFINE_double(
lc_knn_epsilon, 3.0,
lc_knn_epsilon, 2.0,
"Epsilon approximation value for the nearest neighbor search.");
DEFINE_double(
lc_knn_max_radius, 20.0, "Max radius for the nearest neighbor search.");
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <loopclosure-common/types.h>
#include <maplab-common/feature-descriptor-ref.h>
#include <maplab-common/test/testing-entrypoint.h>

#include "vocabulary-tree/distance.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <Eigen/Core>
#include <Eigen/StdVector>
#include <loopclosure-common/types.h>
#include <maplab-common/feature-descriptor-ref.h>
#include <maplab-common/test/testing-entrypoint.h>

#include "vocabulary-tree/simple-kmeans.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <gtest/gtest.h>
#include <maplab-common/test/testing-entrypoint.h>
#include <maplab-common/test/testing-predicates.h>
#include <maplab-common/vector-window-operations.h>
#include <numeric>
#include <vi-map-helpers/vi-map-partitioner.h>
#include <vi-mapping-test-app/vi-mapping-test-app.h>

Expand Down Expand Up @@ -89,10 +89,16 @@ class ViMappingTest : public ::testing::Test {
landmark_ids.size());

constexpr size_t kInvalidValue = -1;
const size_t avg_observers_kept = common::window_vec_ops::computeAverage(
nums_observations_kept_landmarks, kInvalidValue);
const size_t avg_observers_removed = common::window_vec_ops::computeAverage(
nums_observations_removed_landmarks, kInvalidValue);
const size_t avg_observers_kept =
std::accumulate(
nums_observations_kept_landmarks.begin(),
nums_observations_kept_landmarks.end(), 0.0) /
nums_observations_kept_landmarks.size();
const size_t avg_observers_removed =
std::accumulate(
nums_observations_removed_landmarks.begin(),
nums_observations_removed_landmarks.end(), 0.0) /
nums_observations_removed_landmarks.size();

// Make sure the difference between kept and removed landmarks is
// reasonably large.
Expand Down
1 change: 0 additions & 1 deletion algorithms/simulation/test/test-gps-simulator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <eigen-checks/gtest.h>
#include <glog/logging.h>
#include <gtest/gtest.h>
#include <maplab-common/feature-descriptor-ref.h>
#include <maplab-common/global-coordinate-tools.h>
#include <maplab-common/file-logger.h>
#include <maplab-common/test/testing-entrypoint.h>
Expand Down
1 change: 0 additions & 1 deletion algorithms/simulation/test/test-nframe-simulator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <eigen-checks/gtest.h>
#include <glog/logging.h>
#include <gtest/gtest.h>
#include <maplab-common/feature-descriptor-ref.h>
#include <maplab-common/test/testing-entrypoint.h>
#include <maplab-common/test/testing-predicates.h>

Expand Down
49 changes: 0 additions & 49 deletions common/maplab-common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,22 @@ include_directories(${PYTHON_INCLUDE_DIRS})
#############
find_package(Threads)
cs_add_library(${PROJECT_NAME} src/binary-serialization.cc
src/breakpoints.cc
src/combinatorial.cc
src/condition.cc
src/cubic-spline.cc
src/feature-descriptor-ref.cc
src/file-lock.cc
src/file-logger.cc
src/file-system-tools.cc
src/geometry.cc
src/global-coordinate-tools.cc
src/gnuplot-interface.cc
src/gravity-provider.cc
src/histograms.cc
src/map-manager-config.cc
src/multi-threaded-progress-bar.cc
src/progress-bar.cc
src/proto-serialization-helper.cc
src/python-interface.cc
src/shared-gflags.cc
src/sigint-breaker.cc
src/signals.cc
src/stringprintf.cc
src/test/testing-entrypoint.cc
src/threading-helpers.cc
src/tridiagonal-matrix.cc
${PROTO_SRCS}
${PROTO_HDRS})
target_link_libraries(${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT} ${PYTHON_LIBRARIES} readline)
Expand Down Expand Up @@ -73,25 +64,14 @@ catkin_add_gtest(test_eigen_proto_test
test/test_eigen_proto_test.cc)
target_link_libraries(test_eigen_proto_test ${PROJECT_NAME})

catkin_add_gtest(test_file_lock_test
test/test_file_lock.cc)
target_link_libraries(test_file_lock_test ${PROJECT_NAME})

catkin_add_gtest(test_geometry_test
test/test_geometry.cc)
target_link_libraries(test_geometry_test ${PROJECT_NAME})

catkin_add_gtest(test_kruskal_max_span_tree
test/test_kruskal_max_span_tree.cc)
target_link_libraries(test_kruskal_max_span_tree ${PROJECT_NAME})

catkin_add_gtest(test_multi_threaded_progress_bar
test/test_multi_threaded_progress_bar.cc)
target_link_libraries(test_multi_threaded_progress_bar ${PROJECT_NAME})

catkin_add_gtest(test_ordered_monitors test/test_ordered_monitors.cc)
target_link_libraries(test_ordered_monitors ${PROJECT_NAME})

catkin_add_gtest(test_parallel_process
test/test_parallel_process.cc)
target_link_libraries(test_parallel_process ${PROJECT_NAME})
Expand All @@ -117,21 +97,9 @@ catkin_add_gtest(test_file_system_tools
target_link_libraries(test_file_system_tools ${PROJECT_NAME})
add_dependencies(test_file_system_tools ${PROJECT_TEST_DATA})

catkin_add_gtest(test_data_synchronizer
test/test_data_synchronizer.cc)
target_link_libraries(test_data_synchronizer ${PROJECT_NAME})

catkin_add_gtest(test_vector_window_operations
test/test_vector-window-operations.cc)
target_link_libraries(test_vector_window_operations ${PROJECT_NAME})

catkin_add_gtest(test_temporal_buffer test/test_temporal_buffer.cc)
target_link_libraries(test_temporal_buffer ${PROJECT_NAME})

catkin_add_gtest(test_combinatorial
test/test_combinatorial.cc)
target_link_libraries(test_combinatorial ${PROJECT_NAME})

catkin_add_gtest(test_feature_descriptor_ref
test/test_feature-descriptor-ref.cc)
target_link_libraries(test_feature_descriptor_ref ${PROJECT_NAME})
Expand All @@ -144,27 +112,10 @@ catkin_add_gtest(test_file_logger
test/test_file_logger.cc)
target_link_libraries(test_file_logger ${PROJECT_NAME})

catkin_add_gtest(test_python_interface
test/test_python_interface.cc)
target_link_libraries(test_python_interface ${PROJECT_NAME} ${PYTHON_LIBRARIES})

catkin_add_gtest(test_string_tools
test/test_string_tools.cc)
target_link_libraries(test_string_tools ${PROJECT_NAME})

catkin_add_gtest(test_threadsafe_temporal_buffer
test/test-threadsafe-temporal-buffer.cc)
target_link_libraries(test_threadsafe_temporal_buffer ${PROJECT_NAME})

catkin_add_gtest(test_thread_safe_queue
test/test_threadsafe_queue.cc)
target_link_libraries(test_thread_safe_queue ${PROJECT_NAME})


catkin_add_gtest(test_threaded_task_queue_processor
test/test-threaded-task-queue-processor.cc)
target_link_libraries(test_threaded_task_queue_processor ${PROJECT_NAME})

catkin_add_gtest(test_monitor test/test_monitor.cc)
target_link_libraries(test_monitor ${PROJECT_NAME})

Expand Down
78 changes: 0 additions & 78 deletions common/maplab-common/include/maplab-common/backtrace.h

This file was deleted.

13 changes: 0 additions & 13 deletions common/maplab-common/include/maplab-common/breakpoints.h

This file was deleted.

Loading

0 comments on commit ab0d958

Please sign in to comment.