编译orb-slam2带线特征报错

In file included from /home/jyyang/catkin_ws/src/ORB-SLAM2_with_line-master/Examples/ROS/ORB_SLAM2/src/AR/ViewerAR.h:29:0,
                 from /home/jyyang/catkin_ws/src/ORB-SLAM2_with_line-master/Examples/ROS/ORB_SLAM2/src/AR/ViewerAR.cc:21:
/home/jyyang/catkin_ws/src/ORB-SLAM2_with_line-master/Examples/ROS/ORB_SLAM2/../../../include/System.h:29:10: fatal error: pcl/common/common_headers.h: 没有那个文件或目录
 #include

解决办法,cmakelist下没有链接pcl库,在cmakelist下加入

find_package(PCL 1.9.1 REQUIRED )  #添加了稠密点云显示,用到了pcl库,要找到PCL库并添加进来

include_directories(
${PROJECT_SOURCE_DIR}
${PCL_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/../../../
${PROJECT_SOURCE_DIR}/../../../include
${Pangolin_INCLUDE_DIRS}
)

link_directories( ${PCL_LIBRARY_DIRS} )

set(LIBS 
${OpenCV_LIBS} 
${EIGEN3_LIBS}
${Pangolin_LIBRARIES}
${PROJECT_SOURCE_DIR}/../../../Thirdparty/DBoW2/lib/libDBoW2.so
${PROJECT_SOURCE_DIR}/../../../Thirdparty/g2o/lib/libg2o.so
${PROJECT_SOURCE_DIR}/../../../lib/libORB_SLAM2.so
${Boost_SYSTEM_LIBRARY}
${PCL_LIBRARIES}
)

你可能感兴趣的:(自动驾驶)