请确保已经正确安装了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文件夹文章来源:https://www.toymoban.com/news/detail-400513.html
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/)
注意目录文章来源地址https://www.toymoban.com/news/detail-400513.html
到了这里,关于ROS编译D435i过程中的问题及解决的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!