编译A-LOAM,catkin_make后PCL报错

本文分享了如何修复在使用FLANN库时遇到的关于SearchParams类型的报错,重点介绍了将'param_k_'改为'*param_k_'的解决方案,以及相关错误产生的原因和链接解析。

报错:
error field ‘param_k_’ has incomplete type ‘flann:SearchParams’
::flann::SearchParams param_k_;

话不多说直接上图:
在这里插入图片描述

,查了查百度没有好的解决方案(也有可能找的不全),最后在GitHub上找到了解决方案:
::flann::SearchParams param_k_;
改成:
::flann::SearchParams *param_k_;

另外一个错误也是如此.
在这儿里放一个链接,解释了为什么会有这种情况:
链接: link.

lei@leiguoguo:~$ source ~/ros_catkin_ws/install_isolated/setup.bash lei@leiguoguo:~$ cd legoloam_ws lei@leiguoguo:~/legoloam_ws$ catkin_make -j1 Base path: /home/lei/legoloam_ws Source space: /home/lei/legoloam_ws/src Build space: /home/lei/legoloam_ws/build Devel space: /home/lei/legoloam_ws/devel Install space: /home/lei/legoloam_ws/install #### #### Running command: "cmake /home/lei/legoloam_ws/src -DCATKIN_DEVEL_PREFIX=/home/lei/legoloam_ws/devel -DCMAKE_INSTALL_PREFIX=/home/lei/legoloam_ws/install -G Unix Makefiles" in "/home/lei/legoloam_ws/build" #### -- The C compiler identification is GNU 11.4.0 -- The CXX compiler identification is GNU 11.4.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Using CATKIN_DEVEL_PREFIX: /home/lei/legoloam_ws/devel -- Using CMAKE_PREFIX_PATH: /home/lei/ros_catkin_ws/install_isolated -- This workspace overlays: /home/lei/ros_catkin_ws/install_isolated -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.10.12", minimum required is "3") -- Using PYTHON_EXECUTABLE: /usr/bin/python3 -- Using Debian Python package layout -- Using empy: /usr/bin/empy -- Using CATKIN_ENABLE_TESTING: ON -- Call enable_testing() -- Using CATKIN_TEST_RESULTS_DIR: /home/lei/legoloam_ws/build/test_results -- Forcing gtest/gmock from source, though one was otherwise available. -- Found gtest sources under '/usr/src/googletest': gtests will be built -- Found gmock sources under '/usr/src/googletest': gmock will be built -- Found PythonInterp: /usr/bin/python3 (found version "3.10.12") -- Found Threads: TRUE -- Using Python nosetests: /usr/bin/nosetests3 -- catkin 0.8.12 -- BUILD_SHARED_LIBS is on -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- ~~ traversing 2 packages in topological order: -- ~~ - cloud_msgs -- ~~ - lego_loam -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- +++ processing catkin package: 'cloud_msgs' -- ==> add_subdirectory(LeGO-LOAM/cloud_msgs) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy -- cloud_msgs: 1 messages, 0 services -- +++ processing catkin package: 'lego_loam' -- ==> add_subdirectory(LeGO-LOAM/LeGO-LOAM) -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy CMake Warning at /home/lei/ros_catkin_ws/install_isolated/share/catkin/cmake/catkinConfig.cmake:76 (find_package): Could not find a package configuration file provided by "pcl_ros" with any of the following names: pcl_rosConfig.cmake pcl_ros-config.cmake Add the installation prefix of "pcl_ros" to CMAKE_PREFIX_PATH or set "pcl_ros_DIR" to a directory containing one of the above files. If "pcl_ros" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): LeGO-LOAM/LeGO-LOAM/CMakeLists.txt:8 (find_package) -- Could not find the required component 'pcl_ros'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at /home/lei/ros_catkin_ws/install_isolated/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by "pcl_ros" with any of the following names: pcl_rosConfig.cmake pcl_ros-config.cmake Add the installation prefix of "pcl_ros" to CMAKE_PREFIX_PATH or set "pcl_ros_DIR" to a directory containing one of the above files. If "pcl_ros" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): LeGO-LOAM/LeGO-LOAM/CMakeLists.txt:8 (find_package) -- Configuring incomplete, errors occurred! See also "/home/lei/legoloam_ws/build/CMakeFiles/CMakeOutput.log".
最新发布
06-29
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值