ROS空间移植记录(一)

系列文章目录

麦轮小车的基本环境使用(1)
麦轮小车的基本环境使用(2)
麦轮小车的基本环境使用(3)
ROS空间移植记录(一)


前言

这篇是记录树莓派ROS工作空间移植到Jetson TX的过程记录,因为两者系统差距比较小,改动较小和相关依赖软件包不存在,当前篇的主要问题是需要的相关软件包不存在安装。
(因为是很久之前做的学习和移植记录,所以不够完备,欢迎指教)


一、ROS工作空间遇到的问题

1.1、Could NOT find SDL (missing:SDL_LIBRARY SDL_INCLUDE_DIR)

没有找到相关的包
所以解决方法需要下载下面两个包:

Sudo apt-get install libsdl-image1.2-dev
Sudo apt-get install libsdl-dev or sudo apt-get install libsdll1.2-dev

1.2、Could not find a package configuration file provided by “serial“ with any of the following names:

**Could not find a package configuration file provided by “serial” with any of the following names:

serialConfig.cmake

serial-config.cmake

解决办法:

方法一:

sudo apt-get install ros-melodic-serial

其中melodic为ununtu18.04对应的ROS版本,可根据自己的版本修改
【Ubuntu版本号:
16版本:kinetic
18版本:melodic
20版本:noetic】

方法二:
也可以一次性安装所有的包:

sudo apt-get install ros-melodic-*

不太建议第二种方法,需要15个G的空间,可以根据需要哪个包安装哪个包即可。

1.3、cmake报错:Could not find a package configuration file provided by “joy”,

解决方法:
方法一:

sudo apt-get install ros-melodic-joy*

melodic换成你的ROS版本
joy换成你缺少的ROS包名

方法二:
在github上下载相对应的ROS包:
https://github.com/ros-perception
在包放在src路径下即可

参考:
https://blog.csdn.net/qq_37668436/article/details/104253102

1.4.catkin_make失败,找不到cv_brige

– ==> add_subdirectory(lane_detect)
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
‘/opt/ros/melodic//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.
Call Stack (most recent call first):
/opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:76 (find_package)
lane_detect/CMakeLists.txt:6 (find_package)

– Configuring incomplete, errors occurred!
See also “/home/cds/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/cds/catkin_ws/build/CMakeFiles/CMakeError.log”.
Invoking “cmake” failed

解决方法:
使用带有内部库的 vision_opencv 源重新检查编译是否成功
,如下所示:

① cd ~/catkin_ws/src
② git clone https://github.com/ros-perception/vision_opencv
③ cd ~/catkin_ws
④ catkin_make
⑤ source devel/setup.bash

1.5.catkin_make编译失败,findlibuvc.make未找到

Make Error at ros_astra_camera/CMakeLists.txt:8 (find_package):
By not providing “Findlibuvc.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “libuvc”, but
CMake did not find one.
Could not find a package configuration file provided by “libuvc” with any
of the following names:
libuvcConfig.cmake
libuvc-config.cmake
Add the installation prefix of “libuvc” to CMAKE_PREFIX_PATH or set
“libuvc_DIR” to a directory containing one of the above files. If “libuvc”
provides a separate development package or SDK, be sure it has been
installed.

缺少libcx包,所以通过安装libuvc-dev报错就可以解决:

Sudo apt-get install libuvc-dev  

1.6.CMake Error at realsense-ros/realsense2_camera/CMakeLists.txt:48 (message): Intel RealSense SDK 2.0

在这里插入图片描述
图一:报错提示

解决办法:
将realsense_ros功能包目录下realsense2_camera的CMakelist.txt文件中44行对应版本改成2.49

if (WIN32)
find_package(realsense2 CONFIG REQUIRED)
else()
find_package(realsense2 2.49.0)    #修改为2.49.0
endif()

继续编译并添加环境变量:
catkin_make
echo “source ~/realsense_ws/devel/setup.bash” >> ~/.bashrc
source ~/.bashrc

参考:
博客:
https://blog.csdn.net/weixin_50508111/article/details/124566566

https://www.its203.com/article/nannan7777/103128397

GitHub :
https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md#installing-the-packages

1.7.package ‘orocos-bfl’ not found

– ==> add_subdirectory(bp_fusion)-- checking for module ‘orocos-bfl’
– package ‘orocos-bfl’ not found
CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:283 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:337 (_pkg_check_modules_internal)
bp_fusion/CMakeLists.txt:5 (pkg_check_modules)

解决方法:

sudo apt-get install ros-indigo-bfl

1.8.Could not find a package configuration file provided by

缺少相关依赖软件包
解决方案:
使用如下指令安装:

sudo apt-get install ros-kinetic-tf2-sensor-msgs
    继续进行编译的时候出现类似的错误:
    Could not find a package configuration file provided by "move_base_msgs"

后进行使用以下指令进行安装:

sudo apt-get install ros-kinetic-move-base-msgs

1.9 Could not find a package configuration file provided by “mbf_costmap_core” with any of the following names

解决办法:

sudo apt-get install ros-melodic-mbf-costmap-core
sudo apt-get install ros-melodic-mbf-msgs

总结

以上就是今天要讲的内容,当前篇的主要问题是需要的相关软件包不存在安装。

  • 18
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值