ROS编译D435i过程中的问题及解决

请确保已经正确安装了ROS 、OPENCV、realsense-viewer。

编译出现第一个问题

`-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

– ~~ traversing 5 packages in topological order:
– ~~ - realsense2_camera_msgs (plain cmake)
– ~~ - realsense2_description (plain cmake)
– ~~ - ddynamic_reconfigure
– ~~ - realsense2_camera (plain cmake)
– ~~ - usb_cam
– ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CMake Error at /opt/ros/melodic/share/catkin/cmake/catkin_workspace.cmake:100 (message):`

指三个错误的包不能编译的意思?
问题是没有正确完成对realsense-ros的处理!
进入realsense-ros文件夹

cd ~/catkin_ws/src/realsense-ros/      
git checkout `git tag | sort -V | grep -P "^2.\d+\.\d+" | tail -1`
cd ~/catkin_ws
catkin_make clean            
catkin_make                   

编译出现第二个问题

CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "OpenCV" with any
  of the following names:

    OpenCVConfig.cmake
    opencv-config.cmake

  Add the installation prefix of "OpenCV" to CMAKE_PREFIX_PATH or set
  "OpenCV_DIR" to a directory containing one of the above files.  If "OpenCV"
  provides a separate development package or SDK, be sure it has been
  installed.

指为找到OPENCV,需要在:~/catkin_ws/src/realsense-ros/realsense2_camera内的CMakeLists.txt内于find_package()上添加:set(OpenCV_DIR /usr/local/share/OpenCV/)
注意目录

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值