今天在用Gazebo进行物理仿真环境的搭建时,在对工作空间编译时,catkin_make报错
运行环境:ubuntu20.04 ROS版本:noetic
error打印信息:
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by
"gazebo_ros_control" with any of the following names:
gazebo_ros_controlConfig.cmake
gazebo_ros_control-config.cmake
Add the installation prefix of "gazebo_ros_control" to CMAKE_PREFIX_PATH or
set "gazebo_ros_control_DIR" to a directory containing one of the above
files. If "gazebo_ros_control" provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
mbot_gazebo/CMakeLists.txt:10 (find_package)
解决办法:
sudo apt-get install ros-noetic-gazebo-ros-pkgs ros-noetic-gazebo-ros-control
我再重新编译时又报错,error打印信息:
CMake Error at /opt/ros/noetic/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
Add the installation prefix of "gazebo_plugins" to CMAKE_PREFIX_PATH or set
"gazebo_plugins_DIR" to a directory containing one of the above files. If
"gazebo_plugins" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
mbot_gazebo/CMakeLists.txt:10 (find_package)
仔细看会发现是同类错误,所以有问题吗?没有问题!来接着来,运行:
sudo apt-get install ros-noetic-gazebo11-plugins
把缺少的东西下下来,继续编译,要是出现无法定位软件包的问题,先确认自己有没有输入错误,或者是版本问题。确认无误的话,可以多试两边这个命令,还是不行的话,建议换成中科大的源试一下,要是有更好的方法,欢迎在评论区留言。