Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first commit #756

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 59 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,31 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -march=native")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -march=native")

# Check C++11 or C++0x support
# Check C++14 or C++0x support
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++14" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
add_definitions(-DCOMPILEDWITHC11)
message(STATUS "Using flag -std=c++11.")
message(STATUS "Using flag -std=c++14.")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
add_definitions(-DCOMPILEDWITHC0X)
message(STATUS "Using flag -std=c++0x.")
else()
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++14 support. Please use a different C++ compiler.")
endif()

LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules)

find_package(OpenCV 4.4)
if(NOT OpenCV_FOUND)
message(FATAL_ERROR "OpenCV > 4.4 not found.")
endif()
#find_package(OpenCV 4.4)
# if(NOT OpenCV_FOUND)
# message(FATAL_ERROR "OpenCV > 4.4 not found.")
# endif()

MESSAGE("OPENCV VERSION:")
MESSAGE(${OpenCV_VERSION})
#MESSAGE("OPENCV VERSION:")
#MESSAGE(${OpenCV_VERSION})

find_package(Eigen3 3.1.0 REQUIRED)
find_package(Pangolin REQUIRED)
Expand Down Expand Up @@ -121,6 +121,54 @@ ${EIGEN3_LIBS}
${Pangolin_LIBRARIES}
${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/libDBoW2.so
${PROJECT_SOURCE_DIR}/Thirdparty/g2o/lib/libg2o.so
#/usr/local/lib/aarch64-linux-gnu/libopencv_core.so
/usr/local/lib/aarch64-linux-gnu/libopencv_aruco.so
/usr/local/lib/aarch64-linux-gnu/libopencv_bgsegm.so
/usr/local/lib/aarch64-linux-gnu/libopencv_bioinspired.so
/usr/local/lib/aarch64-linux-gnu/libopencv_calib3d.so
/usr/local/lib/aarch64-linux-gnu/libopencv_ccalib.so
/usr/local/lib/aarch64-linux-gnu/libopencv_core.so
/usr/local/lib/aarch64-linux-gnu/libopencv_datasets.so
/usr/local/lib/aarch64-linux-gnu/libopencv_dnn_objdetect.so
/usr/local/lib/aarch64-linux-gnu/libopencv_dnn.so
/usr/local/lib/aarch64-linux-gnu/libopencv_dpm.so
/usr/local/lib/aarch64-linux-gnu/libopencv_face.so
/usr/local/lib/aarch64-linux-gnu/libopencv_features2d.so
/usr/local/lib/aarch64-linux-gnu/libopencv_flann.so
/usr/local/lib/aarch64-linux-gnu/libopencv_freetype.so
/usr/local/lib/aarch64-linux-gnu/libopencv_fuzzy.so
/usr/local/lib/aarch64-linux-gnu/libopencv_hdf.so
/usr/local/lib/aarch64-linux-gnu/libopencv_hfs.so
/usr/local/lib/aarch64-linux-gnu/libopencv_highgui.so
/usr/local/lib/aarch64-linux-gnu/libopencv_imgcodecs.so
/usr/local/lib/aarch64-linux-gnu/libopencv_img_hash.so
/usr/local/lib/aarch64-linux-gnu/libopencv_imgproc.so
/usr/local/lib/aarch64-linux-gnu/libopencv_line_descriptor.so
/usr/local/lib/aarch64-linux-gnu/libopencv_ml.so
/usr/local/lib/aarch64-linux-gnu/libopencv_objdetect.so
/usr/local/lib/aarch64-linux-gnu/libopencv_optflow.so
/usr/local/lib/aarch64-linux-gnu/libopencv_phase_unwrapping.so
/usr/local/lib/aarch64-linux-gnu/libopencv_photo.so
/usr/local/lib/aarch64-linux-gnu/libopencv_plot.so
/usr/local/lib/aarch64-linux-gnu/libopencv_reg.so
/usr/local/lib/aarch64-linux-gnu/libopencv_rgbd.so
/usr/local/lib/aarch64-linux-gnu/libopencv_saliency.so
/usr/local/lib/aarch64-linux-gnu/libopencv_sfm.so
/usr/local/lib/aarch64-linux-gnu/libopencv_shape.so
/usr/local/lib/aarch64-linux-gnu/libopencv_stereo.so
/usr/local/lib/aarch64-linux-gnu/libopencv_stitching.so
/usr/local/lib/aarch64-linux-gnu/libopencv_structured_light.so
/usr/local/lib/aarch64-linux-gnu/libopencv_superres.so
/usr/local/lib/aarch64-linux-gnu/libopencv_surface_matching.so
/usr/local/lib/aarch64-linux-gnu/libopencv_text.so
/usr/local/lib/aarch64-linux-gnu/libopencv_tracking.so
/usr/local/lib/aarch64-linux-gnu/libopencv_videoio.so
/usr/local/lib/aarch64-linux-gnu/libopencv_video.so
/usr/local/lib/aarch64-linux-gnu/libopencv_videostab.so
/usr/local/lib/aarch64-linux-gnu/libopencv_xfeatures2d.so
/usr/local/lib/aarch64-linux-gnu/libopencv_ximgproc.so
/usr/local/lib/aarch64-linux-gnu/libopencv_xobjdetect.so
/usr/local/lib/aarch64-linux-gnu/libopencv_xphoto.so
-lboost_serialization
-lcrypto
)
Expand Down
2 changes: 1 addition & 1 deletion Examples/Monocular/mono_euroc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int main(int argc, char **argv)
int fps = 20;
float dT = 1.f/fps;
// Create SLAM system. It initializes all system threads and gets ready to process frames.
ORB_SLAM3::System SLAM(argv[1],argv[2],ORB_SLAM3::System::MONOCULAR, false);
ORB_SLAM3::System SLAM(argv[1],argv[2],ORB_SLAM3::System::MONOCULAR, true);
float imageScale = SLAM.GetImageScale();

double t_resize = 0.f;
Expand Down
19 changes: 19 additions & 0 deletions Examples/euroc_eval_examples.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
pathDatasetEuroc='~/Downloads/euroc_test'

# Single Session Example (Visual-Inertial)
echo "Launching V102 with Monocular-Inertial sensor"
./Monocular-Inertial/mono_inertial_euroc ../Vocabulary/ORBvoc.txt ./Monocular-Inertial/EuRoC.yaml "$pathDatasetEuroc"/V102 ./Monocular-Inertial/EuRoC_TimeStamps/V102.txt dataset-V102_monoi
echo "------------------------------------"
echo "Evaluation of V102 trajectory with Monocular-Inertial sensor"
python ../evaluation/evaluate_ate_scale.py "$pathDatasetEuroc"/V102/mav0/state_groundtruth_estimate0/data.csv f_dataset-V102_monoi.txt --plot V102_monoi.pdf


# MultiSession Monocular Examples

echo "Launching Vicon Room 2 with Monocular-Inertial sensor"
./Monocular-Inertial/mono_inertial_euroc ../Vocabulary/ORBvoc.txt ./Monocular-Inertial/EuRoC.yaml "$pathDatasetEuroc"/V201 ./Monocular-Inertial/EuRoC_TimeStamps/V201.txt "$pathDatasetEuroc"/V202 ./Monocular-Inertial/EuRoC_TimeStamps/V202.txt "$pathDatasetEuroc"/V203 ./Monocular-Inertial/EuRoC_TimeStamps/V203.txt dataset-V201_to_V203_monoi
echo "------------------------------------"
echo "Evaluation of Vicon Room 2 trajectory with Stereo sensor"
python ../evaluation/evaluate_ate_scale.py ../evaluation/Ground_truth/EuRoC_imu/V2_GT.txt f_dataset-V201_to_V203_monoi.txt --plot V201_to_V203_monoi.pdf

Loading