Ubuntu下安装gazebo

一、Default installation: one-liner

  1. Install

    curl -sSL http://get.gazebosim.org | sh
  2. Run

    gazebo

二、Alternative installation: step-by-step

  1. Setup your computer to accept software from packages.osrfoundation.org.

    sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
  2. Setup keys

    wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
  3. Install Gazebo.

    First update the debian database:

    sudo apt-get update

    Next install gazebo-7 by:

    sudo apt-get install gazebo7
    # For developers that work on top of Gazebo, one extra package
    sudo apt-get install libgazebo7-dev
  4. Check your installation

    gazebo

具体使用哪个 gazebo版本,请参考链接:http://gazebosim.org/tutorials?tut=ros_wrapper_versions

官方链接:http://gazebosim.org/tutorials?tut=install_ubuntu&cat=install


ubunut16.04 kinetic版本gazebo7升级为gazebo9

问题: 我们加载gazebo7发现启动rourun节点有关摄像头的画面加载不出来,往往是黑屏或者卡顿中断gazebo
原因: Gazebo版本太低造成的。因此,需要对此升级。Kinetic中的默认Gazebo都是版本7.x
进行如下命令,我们可以把gazebo升级为9.x
解决方案:
$ sudo apt-get remove ros-kinetic-gazebo*
$ sudo apt-get remove libgazebo*
$ sudo apt-get remove gazebo*
$ dpkg -l | grep gazebo (这是查找当前安装的gazebo包)
发现有些残留的gazebo7

先把gazebo7卸载干净,执行命令卸载如下:
$ sudo apt-get remove gazebo7 gazebo7-common gazebo7-plugin-base libgazebo7:amd64 libgazebo7-dev:amd64
添加软件源:
$ 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-get update
安装gazebo9:
$ sudo apt-get install ros-kinetic-gazebo9-*

$ gazebo

转载链接:https://my.oschina.net/u/4304002/blog/4901051

posted @ 2021-01-21 10:12  不止所见  阅读(1499)  评论(0编辑  收藏  举报