问题出现在我使用catkin_make的时候
CMake Error at /home/hiuching-g/catkin_ws/devel/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "gazebo_plugins"
with any of the following names:
gazebo_pluginsConfig.cmake
gazebo_plugins-config.cmake
而且我能够在/opt/ros/foxy/share/gazebo_plugins/cmake路径找到gazebo_plugins_Config.cmake文件,有一个很坑的就是报错要找的是gazebo_pluginsConfig.cmake,而不是中间有一杠,所以我把那一杠删掉了。
原来的Cmakelist.txt是
find_package(catkin REQUIRED COMPONENTS
gazebo_plugins
gazebo_ros
roscpp
rospy
std_msgs
)
然后在catkin_ws的cmakelist.txt里边修改,让它直接找path而不是按照预设的找
find_package(catkin REQUIRED COMPONENTS
PATHS /opt/ros/foxy/share/gazebo_plugins/cmake
PATHS /opt/ros/foxy/share/gazebo_ros/cmake
roscpp
rospy
std_msgs
)
再次运行catkin_make就成功了。