赞
踩
报错
mount: /mnt: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.
解决办法
主机和从机都要安装 nfs-utils
安装nfs-utils
sudo apt-get install nfs-utils
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
E: 无法定位软件包 nfs-utils
再安装nfs-common
sudo apt-get install nfs-common
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
nfs-common 已经是最新版 (1:1.2.8-9ubuntu12.3)。
下列软件包是自动安装的并且现在不需要了:
libsvncpp3 libwxbase3.0-0v5 libwxgtk3.0-0v5
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
再次执行,最终成功
wget http://fishros.com/install -O fishros&&. fishros
选择rosdep配置
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):-CSDN博客
根据这个我发现我处理需要安装上一个博主的 rmoveit-core、tf2-sensor-msgs、move_base_msg
- sudo apt-get install ros-melodic-tf2-sensor-msgs
-
- sudo apt-get install ros-melodic-moveit-core
-
- sudo apt-get install ros-melodic-costmap-converter
-
- sudo apt-get install ros-melodic-mbf-costmap-core
-
- sudo apt-get install ros-melodic-mbf-msgs
-
- sudo apt-get install ros-melodic-libg2o
-
- sudo apt-get install ros-melodic-async-web-server-cpp
-
- sudo apt-get install ros-melodic-joy*
-
- sudo apt-get install ros-melodic-navigation
-
- sudo apt-get install ros-melodic-costmap-converter
-
- sudo apt-get install ros-melodic-serial
为了方便最好可以使用下面的代码代替上面的那些
sudo apt-get install ros-melodic-tf2-sensor-msgs ros-melodic-moveit-core ros-melodic-costmap-converter ros-melodic-mbf-costmap-core ros-melodic-mbf-msgs ros-melodic-libg2o ros-melodic-async-web-server-cpp ros-melodic-joy* ros-melodic-navigation ros-melodic-costmap-converter
uuid_msgs这个包需要用另外一种方式解决
ROS编译遇到的【bug】Could not find a package configuration file provided by “uuid_msgs“-CSDN博客
下载延时的话,就在主机上下载好,然后用scp命令传输到小车上,就是这样需要解压和重命名
libuv的安装则需要
ROS编译遇到的【bug】Could not find a package configuration file provided by “libuvc“-CSDN博客 serial的安装则需要Could not find a package configuration file provided by “serial“ with any serialConfig.cmake-CSDN博客
其他很多错误可以在这个链接中找到
和
【ROS小车5】_ROS源码移植 编译报错汇总_could not find a package configuration file provid-CSDN博客
- CMake Error at /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake:113 (message):
- Project 'cv_bridge' specifies '/usr/include/opencv' as an include dir,
- which is not found. It does neither exist as an absolute directory nor in
- '${{prefix}}//usr/include/opencv'. Check the issue tracker
- 'https://github.com/ros-perception/vision_opencv/issues' and consider
- creating a ticket if the problem has not been reported yet.
sudo vim /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake
找到第96、97、98行
改成:
之所以改成这样是因为我ros自带的是OpenCV4的版本
自然也会有其他类似的错误(按照它给出的提示更该对应目录下的内容为opencn4)
sudo vim /opt/ros/melodic/share/image_geometry/cmake/image_geometryConfig.cmake
修改成下面这样,也是对应的95和96行
这是因为自带的opencv4他是需要c++11支持的,但是我在出现问题的功能包下的CMakeList.txt下添加了c++11的支持还是出错(如下所示)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
最终我决定安装一个opencv2来解决问题
opencv 可以多版本兼容所以可以多安装一个opencv3.X的版本
Ubuntu下OpenCV3.4.16的安装及使用-CSDN博客
真的好慢
安装好opencv2后在/usr/local/include/文件夹下我有一个opencv和一个OpenCV2
sudo gedit /opt/ros/melodic/share/cv_bridge/cmake/cv_bridgeConfig.cmake
- if(NOT "include;/usr/local/include/opencv; /usr/local/include/opencv2 " STREQUAL " ")
- set(image_geometry_INCLUDE_DIRS "")
- set(_include_dirs "include;/usr/local/lib;/usr/local/include/opencv;/usr/local/include/opencv2;/usr/local/include;/usr/include")
- #set(libraries "cv_bridge;/usr/lib/aarch64-linux-gnu/libopencv_core.so.3.2.0;/usr/lib/aarch64-linux-gnu/libopencv_imgproc.so.3.2.0;/usr/lib/aarch64-linux-gnu/libopencv_imgcodecs.so.3.2.0")
- set(libraries "cv_bridge;/usr/local/lib/libopencv_calib3d.so;/usr/local/lib/libopencv_imgproc.so;/usr/local/lib/libopencv_core.so;/usr/local/lib/libopencv_highgui.so;")
到此还是出错,鉴于我出错的功能包是darknet_ros,所以找到这个功能包下的CMakeList.txt文件修改:
然后在CMakeLists.txt文件下指定该文件的目录,指令如下。
set(OpenCV_DIR /usr/local/share/OpenCV)
再就是用find package指令找到OpenCV包。
find_package(OpenCV REQUIRED)
指定OpenCV的头文件目录
- include_directories(
- ......
- ${OpenCV_INCLUDE_DIRS}
- ......
- )
将编译生成的文件与OpenCV的动态库/静态库进行链接。
- target_link_libraries(
- ......
- ${OpenCV_LIBS}
- ......
- )
总体的CMakeLists.txt文件如下图所示。
这一部分是参考下面这个链接修改的。
解决Ubuntu环境下ROS Kinetic中的cv_bridge和自己安装OpenCV 2.4.xx兼容性笔记_将ros的cv_bridge链接到自己版本的opencv-CSDN博客
- /usr/include/pcl-1.8/pcl/kdtree/kdtree_flann.h:233:29: error: field ‘param_radius_’ has incomplete type ‘flann::SearchParams’
- ::flann::SearchParams param_radius_;
解决办法:
修改/usr/include/pcl-1.8/pcl/kdtree/kdtree_flann.h文件:
将230行 ::flann::SearchParams param_k_;改为 ::flann::SearchParams *param_k_;
将233行::flann::SearchParams param_radius_;改为::flann::SearchParams *param_radius_;
- /home/wheeltec/wheeltec_robot/src/darknet_ros/darknet_ros/src/YoloObjectDetector.cpp:516:49: error: no matching function for call to ‘_IplImage::_IplImage(cv::Mat&)’
- IplImage* ROS_img = new IplImage(camImageCopy_);
catkin_make --cmake-args -DCMAKE_CXX_FLAGS=-DCV__ENABLE_C_API_CTORS
接着单独编译只出错的功能包就可以,因为我的功能包太多了我为了找到具体哪里出错,我就一个包一个包编译的,最后再统一编译(因为一起编译会卡住)
单独编译包:
catkin_make -DCATKIN_WHITELIST_PACKAGES=包的名字
取消单独编译包
catkin_make -DCATKIN_WHITELIST_PACKAGES=""
运行节点前记得执行:
source devel/setup.bash
正常执行功能包节点了
之所以写这个教程,是因为网上的教程都不够详细,为了避免我以后忘记,也为了其他人少走一点错误,我已经尽可能的详细写了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。