rosplane-编译中问题(gazebo、换源等)--ubuntu16.04

ERROR 1

CMake Error at /opt/ros/kinetic/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.

解决方案:(https://blog.csdn.net/qq_16775293/article/details/81022602?utm_source=blogxgwz2)

sudo apt-get install ros-kinetic-gazebo-plugins

重装gazebo (先卸载再装)(http://www.theconstructsim.com/all-about-gazebo-9-with-ros/)(参考https://blog.csdn.net/flyfish1986/article/details/85072626)

dpkg -l | grep gazebo
sudo apt-get remove gazebo7 gazebo7-common gazebo7-plugin-base libgazebo7:amd64 libgazebo7-dev:amd64
二者选其一
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list' 

sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list' 
--------------------- 
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get update
sudo apt-get install ros-kinetic-gazebo9-*  //9那个地方具体看系统内是几

还碰到一种错误是:
[Err] [Visual.cc:353] Unable to create a mesh from /home/daysun/rros_gazeboEnv/src/enemy_suv/enemy_suv_description/meshes/suv.obj
查到是因为需要gazebo7.4版本以上的
需要按照以下安装高版本的gazebo:(参考https://answers.ros.org/question/259989/ubuntu-1604-xenial-package-for-gazebo-740/)
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt update
sudo apt upgrade
然后再装会出现789几个版本,装默认的,会发现是7.1+的版本,就可以用了
不要装89,会有很多很多依赖不存在,其他东西就会报错


 ERROR 2

CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by
  "eigen_stl_containers" with any of the following names:

    eigen_stl_containersConfig.cmake
    eigen_stl_containers-config.cmake

同样的解决办法

sudo apt-get install ros-kinetic-eigen-stl-containers 

ERROR 3

raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: xacro
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/xxx/rosflight_ws1/rosflight_ws/src
ROS path [2]=/opt/ros/kinetic/share

解决:sudo apt-get install ros-kinetic-xacro

ERROR 4

运行时报错 Error [parser.cc:581] Unable to find uri[model://sun] Error [parser.cc:581] Unable to find uri[model]

是因为第一次运行时要下载models,但是又下不下来。。。

因为http://gazebosim.org/models/地址已经变换http://models.gazebosim.org, 可能导致在访问时候无法自动转换地址。

解决方法:通过直接下载所有模型到用户的根目录下的.gazebo/models/下。(参考https://blog.csdn.net/qq_39989653/article/details/78472097)

链接:http://pan.baidu.com/s/1pKaeg0F 密码:cmxc (来自rosclub.cn)

或是下载https://bitbucket.org/osrf/gazebo_models/downloads/ (来自ExBot ROS专区)

直接下载,然后将其解压至~/.gazebo/models里。

此时就可以运行gazebo了

ERROR 5

[gazebo-1] process has died [pid 4529, exit code 139, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -u -e ode worlds/empty.world __name:=gazebo __log:=/home/daysun/.ros/log/637afc6c-7dbe-11e9-abe4-10050145ecee/gazebo-1.log].
log file: /home/daysun/.ros/log/637afc6c-7dbe-11e9-abe4-10050145ecee/gazebo-1*.log

解决方案:(参考https://answers.ros.org/question/281376/gazebo-is-crashingsegmentation-fault/)

$ sudo apt-get dist-upgrade
$ sudo apt-get update
$ sudo apt-get upgrade

 

你可能感兴趣的:(编译)