CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "turtlebot_msgs"
with any of the following names:
turtlebot_msgsConfig.cmake
turtlebot_msgs-config.cmake
Add the installation prefix of "turtlebot_msgs" to CMAKE_PREFIX_PATH or set
"turtlebot_msgs_DIR" to a directory containing one of the above files. If
"turtlebot_msgs" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
turtlebot_apps/turtlebot_follower/CMakeLists.txt:5 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/chance/catkin_ws_517/build/CMakeFiles/CMakeOutput.log".
See also "/home/chance/catkin_ws_517/build/CMakeFiles/CMakeError.log".
在 catkin_make 的时候出现如上错误,查阅网上的资料无非几个就是安装一下turtlebot_msgs 这个包,但是ubuntu20.04的ROS版本为Noetic,在源里早就剔除了turtlebot,已换用turtlebot3了,所以如果运行 apt-get install ros-noetic-turtlebot-msgs 会报无法定义这个软件包。如果必要可以替换为 turtlebot3_msgs 这个。
可我就是牛角尖,草,必须给老子编译通过!
研究解决方案是直接进行一个源码的装:
找一个文件夹下载源码
git clone https://github.com/turtlebot/turtlebot_msgs.git
我是放在 ~/Downloads/turtlebot_msgs 下边了,然后把这个turtlebot_msgs这个包 catkin_make 一下。
编译通过之后,sudo gedit ~/.bashrc 在bashrc中添加变量如下(换成你自己的路径)
source ~/Downloads/turtlebot_msgs/catkin_ws/devel/setup.bash
然后回到原来需要turtlebot_msgs编译失败的工程中,重置刷新一下bashrc,source ~/.bashrc
重新catkin_make 编译成功。
除此之外,应该还有更好的解决办法,在研究过程中发现了一篇文章非常受启发,就是如何在高版本ros上安装低版本ros的包。
Is it possible to install Turtlebot software on ROS Noetic ??
My installing procedure about turtlebot2 on neotic (ubuntu 20.04 focal)
本文讲述了在Ubuntu 20.04 Noetic环境下,遇到turtlebot_msgs包编译错误的解决方案,包括从源码安装、配置环境变量和CMake设置。通过git clone获取turtlebot_msgs源码,手动编译并添加setup.bash到~/.bashrc,确保工程顺利编译。
3227

被折叠的 条评论
为什么被折叠?



