如何让ubuntu16.04的基地代码在ubuntu20.04下成功编译
亦可作为ros-noetic
下的一些常见问题的总结
author’s email: xiangyushun@mail.nwpu.edu.cn
rosdep init失败的解决方法
参考文档ros机器人入门课程的ros安装部分
以及bilibili视频rosdep的安装说明
无serial包解决方法
若出现这样的报错:
输入指令
sudo apt search ros-noetic-serial*
sudo apt install ros-noetic-serial
但是系统报错软件包定位不到,这时候就要参考这篇教程了
ubuntu 20.04 ROS Noetic 无serial包解决方法
opencv版本问题
由于学长写的代码是基于opencv3的,但是我们下载了opencv4的包,不过语法都是一致的,只需要将calibration_util/CMakeLists.txt:22
路径下的find_package(OpenCV 3 REQUIRED)
改为find_package(OpenCV REQUIRED)
即可
driver_base
的安装问题
若编译器给出报错:
Could not find a package configuration file provided by "driver_base" with
any of the following names:
driver_baseConfig.cmake
driver_base-config.cmake
Add the installation prefix of "driver_base" to CMAKE_PREFIX_PATH or set
"driver_base_DIR" to a directory containing one of the above files. If
"driver_base" provides a separate development package or SDK, be sure it
has been installed.
解决方案:
原因是缺少driver_base
依赖包
输入指令:
$ sudo apt-get install ros-noetic-driver-base
即可。
一些找不到的包
-
camera_driver/tiscamera/gscam/CMakeLists.txt:14
的pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0)
缺失解决方案:
$ sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
然后应该就解决了所有依赖问题。但是基地代码仍有编译错误,可能是从ubuntu16.04到ubuntu20.04上的版本迁移问题,后续和团队成员一同解决