注意,若是你使用默認分支,你可能不是二進制兼容任何發佈的軟件包,因此你須要一個catkin工做區,以得到一個有效的gazebo_ros_pkgs。app
ROS Indigo主機是2.x版本的Gazebo。對於徹底集成的ROS系統,咱們建議使用2.x版本的Gazebo。繼續的方式只是使用ROS存儲庫(它將自動安裝gazebo2),而且不使用osrfoundation存儲庫。ide
使用ROS的特定Gazebo版本若是您不須要ROS支持,推薦的版本是可使用osrfoundation repo安裝的最新發布的版本。ui
從gazebo4開始,bullet和simbody支持內置在Ubuntu包中,所以請按照上述說明使用gazebo4和ROS。 Dart仍然須要從源碼安裝gazebo(從gazebo3開始),所以您可使用gazebo3或更高版本,並按照本頁上面的說明使其與ROS配合使用。this
若是你須要一些功能只存在於版本5.x,6.x或7.x的Gazebo,有一種方法來安裝gazebo5,gazebo6或gazebo7和ROSIndigo。請按照說明,關於如何使用ROS與gazebo4,gazebo5或gazebo6在同一個文檔。spa
若是你須要一些功能只存在於版本6.x / 7.x的Gazebo,有一種方法來安裝gazebo6或gazebo7和ROSJade。請按照同一文檔中關於如何使用ROS與gazebo6軟件包的說明。設計
若是在嘗試安裝本文檔中描述的某個版本以後發現依賴性衝突(例如使用RVIZ),您將須要從源代碼安裝ROS或Gazebo。rest
官網原文,翻譯爲谷歌翻譯。code
This document provides an overview about the options to use different versions of ROSin combination with different versions of Gazebo.It is recommended to read it before installing the Gazebo ROS wrappers.教程
If you are planning on using a specific version of ROS and don't have a reasonto use a specific version of Gazebo, you should proceed with theInstalling gazebo_ros_pkgstutorial which explains how to install the fully supported version of gazeboby ROS.ci
Warning: note that using a different gazebo version than the official version delivered from the ROSrepositories could end up in conflicts or other integration problems with ROS packages.
Gazebo is an independent project like boost, ogre orany other project used by ROS. Usually, the latest major version of gazeboavailable at the beginning of every ROS release cycle (for example gazebo5
for ROS Jade) is selected as the official one to be fully integrated andsupported and will be kept during the whole life of the ROS distribution.
Gazebo development is not synced with ROS, so each new major version of Gazebomust be released before being used in a ROS distribution. The followingsections cover how to use ROS with different versions of Gazebo.
Note that Gazebo ABI stability policy follows thesemantic versioning philosophy, in which all versionsthat have the same major number (gazebo_6.0.0
, gazebo_6.1.0
,gazebo_6.0.1
, ...) are binary compatible and thus interchangeable when usingthe same ROS distro.
The easiest way of installing Gazebo is to use packages. There are two main repositories which host Gazebo packages: one is packages.ros.org
and the other is packages.osrfoundation.org
. At the time of writing:
gazebo5
)gazebo6
)gazebo7
)This means that including the osrfoundation repository is not strictly needed to get the Gazebo Ubuntu package.It can be installed from the ros repository.
If you have compiled a gazebo version from source, note that depending on therepository branch used (gazebo6
,gazebo7
,...) your gazebo will bebinary compatible with the gazebo_ros_pkgs
(and all other ROS packages compiledon top of gazebo) only if the major version matches your local branchrepository and the gazebo version used in your ROS distro. For example, if youare compiling from gazebo branch gazebo_2.0
, you can use the gazebo_ros_pkgs
present in Indigo (which uses gazebo2 series).
Note that if you are using default
branch, you are probably not binarycompatible with any of the packages released, so you will need a catkinworkspace for getting a valid gazebo_ros_pkgs
.
For the users that need to run a specific version of ROSand want to use all the gazebo ROS related packages out-of-the-box,this is the recommended section:
ROS Jade hosts the 5.x version of Gazebo.For a fully-integrated ROS system, we recommend using the 5.x version ofGazebo. The way to proceed is just to use the ROS repository (it willautomatically install gazebo5
) and do not use the osrfoundationrepository.
ROS Indigo hosts the 2.x version of Gazebo.For a fully-integrated ROS system, we recommend using the 2.x version of Gazebo.The way to proceed is just to use the ROS repository (it will automatically install gazebo2
)and do not use the osrfoundation repository.
Warning!: Using this option, you won't be able to use any ROS Ubuntu packagerelated to Gazebo from ROS deb repository. The equivalent of gazebo_ros_pkgs
can be installed from debian packages, but all other software (such asturtlebot_gazebo) must be built fromsource. Thanks to catkin workspacesthis is quite easy to do.
There is a way of using any specific version of gazebo and ROS if really needed:
The OSRF repository provides -gazebo7-
versions of ROS/Indigo and ROS/Jadegazebo wrappers (gazebo7_ros_pkgs
) which are built on top of the gazebo7
package. The steps to use them are:
ros-$ROS_DISTRO-gazebo7-ros-pkgs
from the osrfoundation repository, which will install the gazebo7
package.The OSRF repository provides -gazebo6-
versions of ROS/Indigo and ROS/Jadegazebo wrappers (gazebo6_ros_pkgs
) which are built on top of the gazebo6
package. The steps to use them are:
ros-$ROS_DISTRO-gazebo6-ros-pkgs
from the osrfoundation repository, which will install the gazebo6
package.The OSRF repository provides -gazebo5-
versions of ROS/Indigo gazebo wrappers(gazebo5_ros_pkgs
) which are built on top of the gazebo5
package.The steps to use them are:
ros-indigo-gazebo5-ros-pkgs
from the osrfoundation repository, which will install the gazebo5
package.If you don't need ROS support, the recommended version is the latest released version that can beinstalled using the osrfoundation repo.
Starting from gazebo4
, bullet and simbody support is built into the Ubuntu package,so please follow the above instructions to use gazebo4
in combination with ROS.Dart still requires gazebo installation from source (starting from gazebo3
),so you can use gazebo3
or above and follow the instructions above in this page to make it work with ROS.
Warning!: Using this option, you won't be able to use any ROS Indigo package related to Gazebo from ROS deb repository. The way to go is to build them from source. Thanks to catkin workspaces this is quite easy to do.
If you need some features only present in version 5.x, 6.x or 7.x of Gazebo,there is a way of installing gazebo5
, gazebo6
or gazebo7
and ROS Indigo.Please follow the instructions about how to use ROS with gazebo4, gazebo5 orgazebo6 which are in this same document.
Warning!: Using this option, you won't be able to use any ROS Jade packagerelated to Gazebo from ROS deb repository. The way to go is to build them fromsource. Thanks to catkin workspaces this is quite easy to do.
If you need some features only present in versions 6.x/7.x of Gazebo,there is a way of installing gazebo6
or gazebo7
and ROS Jade. Pleasefollow the instructions about how to use ROS with gazebo6 packagewhich are in this same document.
Note that each ROS distribution is designed to be used with an specific versionof Gazebo (gazebo5
in Jade). When someone chooses to use a different versionof Gazebo than the one recommended in the ROS distribution, problems may appearand some of them could be unsolvable.
If you a find a dependency conflict (for example with RVIZ) after trying toinstall one of the versions described in this document, you will need toprobably install ROS or Gazebo from source.