ubuntu18.04 ROS编译ROS-Academy-for Beginners包常见错误及gazebo的瞎搞之路

ubuntu18.04 ROS编译ROS-Academy-for Beginners包常见错误及gazebo的瞎搞之路_第1张图片
错误:

Could not find a package configuration file provided by "move_base"

解决办法:

sudo apt-get install ros-melodic-navigation

安装对应的包即可。

ubuntu18.04 ROS编译ROS-Academy-for Beginners包常见错误及gazebo的瞎搞之路_第2张图片
解决办法:

 sudo apt-get install ros-melodic-slam-karto

ubuntu18.04 ROS编译ROS-Academy-for Beginners包常见错误及gazebo的瞎搞之路_第3张图片
解决办法:

source ~/ros_class/devel/setup.bash

或者

echo "source ~/ros_class/devel/setup.bash" >> ~/.bashrc

ubuntu18.04 ROS编译ROS-Academy-for Beginners包常见错误及gazebo的瞎搞之路_第4张图片解决办法:

sudo apt install cmake gcc g++ qt{4,5}-qmake libqt4-dev

关于这个包编译一直出各种各样的bug的原因是我没有按照操作指南再catkin_make之前先安装依赖,就是那一句

rosdep install --from-paths src --ignore-src --rosdistro=melodic -y

这一句的作用就是安装各种依赖啊,粗心、瞎搞就是我,根据bug一点一点修正真的很累啊,gazebo的加载一直有问题,大片大片的error,心累,最后领导给我的一句话就是,拿到一个东西,首先看README.txt 。

记录gazebo能重新正常启动的过程

错误1:

[gazebo -2]

尝试升级gazebo至9.10.0

sudo apt-get update
sudo apt-get install gazebo9

出现错误

gazebo: symbol lookup error

解决办法:终端输入

sudo apt upgrade libignition-math2

成功升级到gazebo9.10.0,但是在运行

roslaunch robot_sim_demo robot_spawn.launch

出现错误

[gazebo -1]

卸载gazebo,

sudo apt-get remove gazebo*

重新安装gezebo

sudo apt-get update
sudo apt install gazebo9

成功安装gazebo9.10.0,在catkin_make时出错

 Could not find a package configuration file provided by "gazebo_ros" with
  any of the following names:

    gazebo_rosConfig.cmake
    gazebo_ros-config.cmake

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

按照提示安装gazebo_ros(这个应该是单独卸载gazebo又重装gazebo和ros未链接出现的问题)

sudo apt-get install ros-melodic-gazebo-ros

catkin_make通过,再启动launch文件出现错误

[gazebo -2]

参照网上操作,执行

killall gzserver

能正常启动gazebo模型

你可能感兴趣的:(ubuntu18.04 ROS编译ROS-Academy-for Beginners包常见错误及gazebo的瞎搞之路)