MIT-SPARK / Kimera-VIO

Visual Inertial Odometry with SLAM capabilities and 3D Mesh generation.
BSD 2-Clause "Simplified" License
1.56k stars 418 forks source link

编译报错 #224

Closed chen128 closed 9 months ago

chen128 commented 9 months ago

scope: /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/StereoVisionImuFrontend-definitions.h:41:12: error: ‘std::optional’ has not been declared std::optional lkf_body_Pose_kf_body = std::nullopt, ^~~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/StereoVisionImuFrontend-definitions.h:41:20: error: expected ‘,’ or ‘...’ before ‘<’ token std::optional lkf_body_Pose_kf_body = std::nullopt, ^ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/StereoVisionImuFrontend-definitions.h: In constructor ‘VIO::StereoFrontendOutput::StereoFrontendOutput(bool, const StatusStereoMeasurementsPtr&, const gtsam::Pose3&, const gtsam::Pose3&, const VIO::StereoFrame&, const PimPtr&, const ImuAccGyrS&, const cv::Mat&, const VIO::DebugTrackerInfo&, int)’: /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/StereoVisionImuFrontend-definitions.h:49:34: error: ‘lkf_body_Pose_kf_body’ was not declared in this scope lkf_body_Pose_kf_body, ^~~~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/StereoVisionImuFrontend-definitions.h:50:34: error: ‘body_world_Vel_body’ was not declared in this scope body_world_Vel_body), ^~~~~~~ In file included from /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/pipeline/Pipeline-definitions.h:20, from /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/dataprovider/DataProviderInterface.h:23, from /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/dataprovider/EurocDataProvider.h:32, from /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:17: /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/backend/VioBackend-definitions.h: At global scope: /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/backend/VioBackend-definitions.h:239:12: error: ‘std::optional’ has not been declared std::optional body_lkf_OdomPose_body_kf = std::nullopt, ^~~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/backend/VioBackend-definitions.h:239:20: error: expected ‘,’ or ‘...’ before ‘<’ token std::optional body_lkf_OdomPose_body_kf = std::nullopt, ^ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/backend/VioBackend-definitions.h:254:8: error: ‘optional’ in namespace ‘std’ does not name a template type std::optional body_lkf_OdomPose_bodykf; ^~~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/backend/VioBackend-definitions.h:254:3: note: ‘std::optional’ is only available from C++17 onwards std::optional body_lkf_OdomPose_bodykf; ^~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/backend/VioBackend-definitions.h:257:8: error: ‘optional’ in namespace ‘std’ does not name a template type std::optional body_kf_world_OdomVel_bodykf; ^~~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/backend/VioBackend-definitions.h:257:3: note: ‘std::optional’ is only available from C++17 onwards std::optional body_kf_world_OdomVel_bodykf; ^~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/backend/VioBackend-definitions.h: In constructor ‘VIO::BackendInput::BackendInput(const Timestamp&, const StatusStereoMeasurementsPtr&, const PimPtr&, const ImuAccGyrS&, int)’: /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/backend/VioBackend-definitions.h:246:9: error: class ‘VIO::BackendInput’ does not have any field named ‘body_lkf_OdomPose_bodykf’ body_lkf_OdomPose_bodykf(body_lkf_OdomPose_body_kf), ^~~~~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/backend/VioBackend-definitions.h:246:36: error: ‘body_lkf_OdomPose_body_kf’ was not declared in this scope body_lkf_OdomPose_bodykf(body_lkf_OdomPose_body_kf), ^~~~~~~~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/backend/VioBackend-definitions.h:247:9: error: class ‘VIO::BackendInput’ does not have any field named ‘body_kf_world_OdomVel_bodykf’ body_kf_world_OdomVel_bodykf(body_kf_world_OdomVel_body_kf) {} ^~~~~~~~~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/backend/VioBackend-definitions.h:247:40: error: ‘body_kf_world_OdomVel_body_kf’ was not declared in this scope body_kf_world_OdomVel_bodykf(body_kf_world_OdomVel_body_kf) {} ^~~~~~~~~ In file included from /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/dataprovider/DataProviderInterface.h:23, from /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/dataprovider/EurocDataProvider.h:32, from /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:17: /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/pipeline/Pipeline-definitions.h: At global scope: /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/pipeline/Pipeline-definitions.h:152:8: error: ‘optional’ in namespace ‘std’ does not name a template type std::optional odomparams; ^~~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/pipeline/Pipeline-definitions.h:152:3: note: ‘std::optional’ is only available from C++17 onwards std::optional odomparams; ^~~ In file included from /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/StereoImuSyncPacket.h:24, from /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/dataprovider/EurocDataProvider.h:34, from /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:17: /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/FrontendInputPacketBase.h:38:32: error: ‘std::optional’ has not been declared std::optional world_NavState_ext_odom = std::nullopt) ^~~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/FrontendInputPacketBase.h:38:40: error: expected ‘,’ or ‘...’ before ‘<’ token std::optional world_NavState_ext_odom = std::nullopt) ^ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/FrontendInputPacketBase.h:52:8: error: ‘optional’ in namespace ‘std’ does not name a template type std::optional world_NavState_extodom; ^~~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/FrontendInputPacketBase.h:52:3: note: ‘std::optional’ is only available from C++17 onwards std::optional world_NavState_extodom; ^~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/FrontendInputPacketBase.h: In constructor ‘VIO::FrontendInputPacketBase::FrontendInputPacketBase(const Timestamp&, const ImuStampS&, const ImuAccGyrS&, int)’: /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/FrontendInputPacketBase.h:42:9: error: class ‘VIO::FrontendInputPacketBase’ does not have any field named ‘world_NavState_extodom’ world_NavState_extodom(world_NavState_ext_odom) { ^~~~~~~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/FrontendInputPacketBase.h:42:34: error: ‘world_NavState_ext_odom’ was not declared in this scope world_NavState_extodom(world_NavState_ext_odom) { ^~~~~~~ In file included from /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/dataprovider/EurocDataProvider.h:34, from /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:17: /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/StereoImuSyncPacket.h: At global scope: /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/StereoImuSyncPacket.h:91:12: error: ‘std::optional’ has not been declared std::optional external_odometry = std::nullopt, ^~~~ /home/cr/catkin_ws/src/Kimera-VIO/include/kimera-vio/frontend/StereoImuSyncPacket.h:91:20: error: expected ‘,’ or ‘...’ before ‘<’ token std::optional external_odometry = std::nullopt, ^ /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp: In constructor ‘VIO::EurocDataProvider::EurocDataProvider(const string&, const int&, const int&, const VIO::VioParams&)’: /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:68:46: error: ‘makeunique’ is not a member of ‘std’ logger(FLAGS_log_euroc_gt_data ? std::make_unique() ^~~ /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:68:46: note: ‘std::make_unique’ is only available from C++14 onwards /home/cr/catkinws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:68:71: error: expected primary-expression before ‘>’ token logger(FLAGS_log_euroc_gt_data ? std::make_unique() ^ /home/cr/catkinws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:68:73: error: expected primary-expression before ‘)’ token logger(FLAGS_log_euroc_gt_data ? std::make_unique() ^ /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp: In member function ‘virtual bool VIO::EurocDataProvider::spinOnce()’: /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:174:14: error: ‘make_unique’ is not a member of ‘std’ std::make_unique(currentk, ^~~ /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:174:14: note: ‘std::make_unique’ is only available from C++14 onwards /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:174:31: error: expected primary-expression before ‘>’ token std::make_unique(currentk, ^ /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:174:33: warning: left operand of comma operator has no effect [-Wunused-value] std::make_unique(currentk, ^~~~~~ /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:175:33: warning: right operand of comma operator has no effect [-Wunused-value] timestamp_frame_k, ^~~~~ /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:178:33: warning: right operand of comma operator has no effect [-Wunused-value] left_cam_info, ^~~~~ /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:183:14: error: ‘make_unique’ is not a member of ‘std’ std::make_unique(currentk, ^~~ /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:183:14: note: ‘std::make_unique’ is only available from C++14 onwards /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:183:31: error: expected primary-expression before ‘>’ token std::make_unique(currentk, ^ /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:183:33: warning: left operand of comma operator has no effect [-Wunused-value] std::make_unique(currentk, ^~~~~~ /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:184:33: warning: right operand of comma operator has no effect [-Wunused-value] timestamp_frame_k, ^~~~~ /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:187:33: warning: right operand of comma operator has no effect [-Wunused-value] right_cam_info, ^~~~~~ /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp: In member function ‘virtual bool VIO::MonoEurocDataProvider::spinOnce()’: /home/cr/catkin_ws/src/Kimera-VIO/src/dataprovider/EurocDataProvider.cpp:848:14: error: ‘make_unique’ is not a member of ‘std’ std::make_unique(currentk,

chen128 commented 9 months ago

gtsam要用最新版,支持C++17才行,不能用4.2版本