Skip to content

Commit

Permalink
Unit tests: add test run against MulRan dataset fragment (Lidar+IMU)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Jan 11, 2025
1 parent 4cc116a commit 8b21ea1
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 1 deletion.
24 changes: 24 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,30 @@ target_link_libraries(test_lidar_odometry_kitti
)


# Test: from rawlog file, using MULRAN fragment (incl IMU,GPS)
# ---------------------------------------------------------------
set(MULRAN_KAIST01_DATASET_FILE "${mola_test_datasets_DIR}/../datasets/mulran/mulran_KAIST01_extract.rawlog")
set(MULRAN_KAIST01_GT_TUM ${mola_lidar_odometry_SOURCE_DIR}/test/mulran_KAIST01_fragment_gt.tum)

if (NOT EXISTS ${MULRAN_KAIST01_DATASET_FILE})
message(STATUS "**Skipping test**: Mulran dataset not available (temporary situation until mola_test_dataset package is updated)")
else()
ament_add_gtest(test_lidar_odometry_mulran test_lidar_odometry_rawlog.cpp
ENV LO_PIPELINE_YAML=${DEFAULT_PIPELINE_YAML}
ENV LO_STATE_ESTIM_YAML=${DEFAULT_STATE_ESTIMATOR_YAML}
ENV LO_TEST_RAWLOG=${MULRAN_KAIST01_DATASET_FILE}
ENV LO_TEST_GT_TUM=${MULRAN_KAIST01_GT_TUM}
ENV MOLA_PROFILER=false
)
ament_target_dependencies(test_lidar_odometry_mulran
mrpt-obs
mola_state_estimation_simple
)
target_link_libraries(test_lidar_odometry_mulran
mola::mola_lidar_odometry
mola::mola_state_estimation_simple
)
endif()

# Test: from rosbag2 file, RSLIDAR data with XYZIRT channels
# -----------------------------------------------------------
Expand Down
80 changes: 80 additions & 0 deletions test/mulran_KAIST01_fragment_gt.tum
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
1561000452.790272 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1.000000
1561000452.890718 0.229364 -0.007834 0.012782 0.000064 0.000168 -0.000580 1.000000
1561000452.991007 0.628876 0.033184 0.010787 -0.000042 0.000123 -0.002319 0.999997
1561000453.090832 0.981785 0.063839 0.009650 -0.000045 0.000042 -0.003298 0.999995
1561000453.190959 1.376017 0.095439 0.012848 -0.000245 0.000148 -0.004705 0.999989
1561000453.290457 1.770185 0.111948 0.028621 -0.000413 0.000456 -0.005398 0.999985
1561000453.390084 2.114604 0.141179 0.030187 -0.000404 0.000452 -0.006635 0.999978
1561000453.491703 2.538050 0.100775 0.024297 -0.000380 0.000211 -0.007196 0.999974
1561000453.589804 2.920939 0.057462 0.030907 -0.000334 0.000104 -0.008148 0.999967
1561000453.691664 3.376859 0.028950 0.043277 -0.000365 0.000124 -0.008681 0.999962
1561000453.789923 3.753870 0.048763 0.046090 -0.000343 0.000015 -0.009912 0.999951
1561000453.891752 4.137398 0.084914 0.045205 -0.000416 0.000003 -0.011290 0.999936
1561000453.991719 4.613687 0.082429 0.045903 -0.000475 -0.000005 -0.012033 0.999927
1561000454.089780 5.114571 0.052358 0.041316 -0.000555 0.000054 -0.012326 0.999924
1561000454.191652 5.571195 0.021023 0.042096 -0.000538 -0.000108 -0.012696 0.999919
1561000454.291076 6.011785 0.013620 0.049890 -0.000523 -0.000371 -0.013493 0.999909
1561000454.393143 6.459985 -0.016501 0.056921 -0.000491 -0.000419 -0.013733 0.999905
1561000454.493148 6.944701 -0.038841 0.053286 -0.000513 -0.000512 -0.014182 0.999899
1561000454.591819 7.439826 -0.079273 0.057512 -0.000534 -0.000598 -0.014181 0.999899
1561000454.692864 7.941204 -0.117116 0.063335 -0.000503 -0.000803 -0.013942 0.999902
1561000454.791188 8.438441 -0.150032 0.076564 -0.000463 -0.000781 -0.013750 0.999905
1561000454.893124 8.923914 -0.138118 0.084224 -0.000506 -0.000883 -0.013366 0.999910
1561000454.993270 9.407866 -0.131452 0.087835 -0.000473 -0.001113 -0.013224 0.999912
1561000455.093516 9.914009 -0.140444 0.092216 -0.000399 -0.001350 -0.012928 0.999915
1561000455.194743 10.451974 -0.151783 0.099931 -0.000333 -0.001704 -0.012664 0.999918
1561000455.292999 10.985764 -0.159192 0.115475 -0.000239 -0.002089 -0.012619 0.999918
1561000455.394336 11.539165 -0.173796 0.130390 -0.000119 -0.002352 -0.012383 0.999921
1561000455.494492 12.097497 -0.198004 0.137439 -0.000122 -0.002167 -0.012073 0.999925
1561000455.594375 12.655505 -0.220477 0.146625 -0.000117 -0.002235 -0.011824 0.999928
1561000455.694271 13.214271 -0.225696 0.160224 -0.000149 -0.002065 -0.011797 0.999928
1561000455.794227 13.790468 -0.233329 0.162016 -0.000215 -0.002051 -0.011768 0.999929
1561000455.894397 14.365809 -0.239539 0.175433 -0.000205 -0.002095 -0.011662 0.999930
1561000455.995970 14.942624 -0.231264 0.191234 0.000010 -0.002743 -0.011483 0.999930
1561000456.095928 15.524738 -0.237021 0.210242 0.000140 -0.003219 -0.011342 0.999930
1561000456.196671 16.109472 -0.238451 0.232616 0.000388 -0.005623 -0.011178 0.999922
1561000456.294606 16.679364 -0.268926 0.255284 0.001532 -0.013345 -0.010854 0.999851
1561000456.394398 17.239678 -0.284195 0.248747 0.004086 -0.021997 -0.010913 0.999690
1561000456.495334 17.821822 -0.324213 0.233438 0.006736 -0.026238 -0.010878 0.999574
1561000456.595848 18.420333 -0.354368 0.274240 0.008495 -0.024816 -0.010872 0.999597
1561000456.695765 19.084590 -0.373391 0.348289 0.006636 -0.014389 -0.011055 0.999813
1561000456.794343 19.778064 -0.376937 0.426129 0.004850 -0.000834 -0.010670 0.999931
1561000456.895545 20.527613 -0.369801 0.439514 0.004526 0.010430 -0.010256 0.999883
1561000456.995572 21.258382 -0.379348 0.458143 0.004918 0.017804 -0.009648 0.999783
1561000457.094012 21.953305 -0.394768 0.487715 0.006491 0.017804 -0.008792 0.999782
1561000457.195689 22.642654 -0.402920 0.516452 0.006725 0.014030 -0.008635 0.999842
1561000457.294307 23.277861 -0.387725 0.535356 0.004494 0.006744 -0.007845 0.999936
1561000457.394392 23.917761 -0.387728 0.491324 0.001584 -0.003873 -0.006815 0.999968
1561000457.495700 24.565632 -0.388164 0.399311 0.000847 -0.011453 -0.005945 0.999916
1561000457.595973 25.247003 -0.397593 0.345927 0.000919 -0.012713 -0.005015 0.999906
1561000457.696955 26.004543 -0.427358 0.392923 0.001120 -0.009642 -0.004185 0.999944
1561000457.797145 26.794663 -0.423674 0.485621 0.001123 -0.004966 -0.004320 0.999978
1561000457.898174 27.583806 -0.412742 0.558773 0.000773 -0.002309 -0.004793 0.999986
1561000457.998225 28.339647 -0.408482 0.579430 0.000605 -0.001778 -0.005005 0.999986
1561000458.097838 29.096510 -0.390001 0.574033 0.001082 -0.004209 -0.004907 0.999979
1561000458.198403 29.860898 -0.409062 0.568828 0.001356 -0.005710 -0.005141 0.999970
1561000458.297378 30.631538 -0.427305 0.600571 0.001579 -0.006136 -0.005291 0.999966
1561000458.398630 31.446745 -0.444044 0.631735 0.001531 -0.006077 -0.004860 0.999969
1561000458.498565 32.231160 -0.431381 0.666603 0.001776 -0.006624 -0.004688 0.999965
1561000458.598814 33.036380 -0.421880 0.692541 0.001722 -0.007599 -0.003978 0.999962
1561000458.698439 33.855812 -0.405911 0.717827 0.001673 -0.008322 -0.003422 0.999958
1561000458.798100 34.679891 -0.402178 0.725371 0.001523 -0.008499 -0.002543 0.999959
1561000458.898592 35.535351 -0.415483 0.742424 0.000954 -0.007479 -0.001631 0.999970
1561000458.998398 36.380327 -0.433841 0.785817 -0.001433 -0.005266 -0.000976 0.999985
1561000459.098563 37.252257 -0.445218 0.814629 -0.001330 -0.005347 -0.000102 0.999985
1561000459.198596 38.117742 -0.437702 0.812847 -0.000978 -0.005638 0.000711 0.999983
1561000459.297422 38.987746 -0.428536 0.842301 -0.001501 -0.005149 0.001322 0.999985
1561000459.398510 39.891140 -0.424780 0.881773 -0.001483 -0.005091 0.001942 0.999984
1561000459.491432 40.743096 -0.420823 0.906441 -0.001118 -0.005849 0.002432 0.999979
1561000459.590748 41.646209 -0.395556 0.938669 -0.001018 -0.006050 0.003167 0.999976
1561000459.690860 42.535028 -0.385652 0.965667 -0.001095 -0.005802 0.003885 0.999975
1561000459.792153 43.438096 -0.377266 0.988210 -0.001365 -0.005153 0.004903 0.999974
1561000459.892141 44.326138 -0.362993 1.019843 -0.001631 -0.004156 0.005774 0.999973
1561000459.991664 45.204275 -0.361480 1.042405 -0.001958 -0.003768 0.006665 0.999969
1561000460.089981 46.080310 -0.356855 1.061832 -0.001792 -0.003683 0.007643 0.999962
1561000460.192226 46.986673 -0.345936 1.087485 -0.001781 -0.003752 0.008539 0.999955
1561000460.289809 47.854948 -0.335223 1.117468 -0.001524 -0.003393 0.009586 0.999947
1561000460.392014 48.743579 -0.306784 1.155983 -0.001309 -0.001913 0.010384 0.999943
1561000460.491705 49.609489 -0.268755 1.202495 -0.001826 -0.002315 0.011430 0.999930
1561000460.591536 50.459875 -0.219893 1.225277 -0.001927 -0.004973 0.012215 0.999911
1561000460.693045 51.324604 -0.187342 1.225889 -0.001889 -0.008319 0.013526 0.999872
1 change: 0 additions & 1 deletion test/test_lidar_odometry_rawlog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ int main_odometry(
const bool gtLoadOk = gt.loadFromTextFile_TUM(gtTrajectory);
ASSERT_(gtLoadOk);

ASSERT_EQUAL_(trajectory.size(), 3U);
ASSERT_EQUAL_(gt.size(), trajectory.size());

auto itP = trajectory.cbegin();
Expand Down

0 comments on commit 8b21ea1

Please sign in to comment.