Skip to content
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ 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)
Expand Down
6 changes: 3 additions & 3 deletions Examples/Monocular-Inertial/mono_inertial_euroc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ int main(int argc, char *argv[])
cout.precision(17);

// 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::IMU_MONOCULAR, true);
ORB_SLAM3::System SLAM(argv[1],argv[2],ORB_SLAM3::System::IMU_MONOCULAR, false);
float imageScale = SLAM.GetImageScale();

double t_resize = 0.f;
Expand Down Expand Up @@ -235,8 +235,8 @@ int main(int argc, char *argv[])
// Save camera trajectory
if (bFileName)
{
const string kf_file = "kf_" + string(argv[argc-1]) + ".txt";
const string f_file = "f_" + string(argv[argc-1]) + ".txt";
const string kf_file = string(argv[argc-1]) + "_keyframes.txt";
const string f_file = string(argv[argc-1]) + "_frames.txt";
SLAM.SaveTrajectoryEuRoC(f_file);
SLAM.SaveKeyFrameTrajectoryEuRoC(kf_file);
}
Expand Down
4 changes: 2 additions & 2 deletions Examples/Monocular-Inertial/mono_inertial_tum_vi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,8 @@ int main(int argc, char **argv)

if (bFileName)
{
const string kf_file = "kf_" + string(argv[argc-1]) + ".txt";
const string f_file = "f_" + string(argv[argc-1]) + ".txt";
const string kf_file = string(argv[argc-1]) + "_keyframes.txt";
const string f_file = string(argv[argc-1]) + "_frames.txt";
SLAM.SaveTrajectoryEuRoC(f_file);
SLAM.SaveKeyFrameTrajectoryEuRoC(kf_file);
}
Expand Down
4 changes: 2 additions & 2 deletions Examples/Monocular/mono_euroc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ int main(int argc, char **argv)
// Save camera trajectory
if (bFileName)
{
const string kf_file = "kf_" + string(argv[argc-1]) + ".txt";
const string f_file = "f_" + string(argv[argc-1]) + ".txt";
const string kf_file = string(argv[argc-1]) + "_keyframes.txt";
const string f_file = string(argv[argc-1]) + "_frames.txt";
SLAM.SaveTrajectoryEuRoC(f_file);
SLAM.SaveKeyFrameTrajectoryEuRoC(kf_file);
}
Expand Down
4 changes: 2 additions & 2 deletions Examples/Monocular/mono_tum_vi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ int main(int argc, char **argv)

if (bFileName)
{
const string kf_file = "kf_" + string(argv[argc-1]) + ".txt";
const string f_file = "f_" + string(argv[argc-1]) + ".txt";
const string kf_file = string(argv[argc-1]) + "_keyframes.txt";
const string f_file = string(argv[argc-1]) + "_frames.txt";
SLAM.SaveTrajectoryEuRoC(f_file);
SLAM.SaveKeyFrameTrajectoryEuRoC(kf_file);
}
Expand Down
4 changes: 2 additions & 2 deletions Examples/Stereo-Inertial/stereo_inertial_euroc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ int main(int argc, char **argv)
// Save camera trajectory
if (bFileName)
{
const string kf_file = "kf_" + string(argv[argc-1]) + ".txt";
const string f_file = "f_" + string(argv[argc-1]) + ".txt";
const string kf_file = string(argv[argc-1]) + "_keyframes.txt";
const string f_file = string(argv[argc-1]) + "_frames.txt";
SLAM.SaveTrajectoryEuRoC(f_file);
SLAM.SaveKeyFrameTrajectoryEuRoC(kf_file);
}
Expand Down
4 changes: 2 additions & 2 deletions Examples/Stereo-Inertial/stereo_inertial_tum_vi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ int main(int argc, char **argv)

if (bFileName)
{
const string kf_file = "kf_" + string(argv[argc-1]) + ".txt";
const string f_file = "f_" + string(argv[argc-1]) + ".txt";
const string kf_file = string(argv[argc-1]) + "_keyframes.txt";
const string f_file = string(argv[argc-1]) + "_frames.txt";
SLAM.SaveTrajectoryEuRoC(f_file);
SLAM.SaveKeyFrameTrajectoryEuRoC(kf_file);
}
Expand Down
6 changes: 3 additions & 3 deletions Examples/Stereo/stereo_euroc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ int main(int argc, char **argv)
cout.precision(17);

// 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::STEREO, true);
ORB_SLAM3::System SLAM(argv[1],argv[2],ORB_SLAM3::System::STEREO, false);

cv::Mat imLeft, imRight;
for (seq = 0; seq<num_seq; seq++)
Expand Down Expand Up @@ -171,8 +171,8 @@ int main(int argc, char **argv)
// Save camera trajectory
if (bFileName)
{
const string kf_file = "kf_" + string(argv[argc-1]) + ".txt";
const string f_file = "f_" + string(argv[argc-1]) + ".txt";
const string kf_file = string(argv[argc-1]) + "_keyframes.txt";
const string f_file = string(argv[argc-1]) + "_frames.txt";
SLAM.SaveTrajectoryEuRoC(f_file);
SLAM.SaveKeyFrameTrajectoryEuRoC(kf_file);
}
Expand Down
4 changes: 2 additions & 2 deletions Examples/Stereo/stereo_tum_vi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ int main(int argc, char **argv)

if (bFileName)
{
const string kf_file = "kf_" + string(argv[argc-1]) + ".txt";
const string f_file = "f_" + string(argv[argc-1]) + ".txt";
const string kf_file = string(argv[argc-1]) + "_keyframes.txt";
const string f_file = string(argv[argc-1]) + "_frames.txt";
SLAM.SaveTrajectoryEuRoC(f_file);
SLAM.SaveKeyFrameTrajectoryEuRoC(kf_file);
}
Expand Down
Loading