Windows下安装gazebo

参考链接:http://gazebosim.org/tutorials?tut=install_on_windows&cat=install

Important requirement: 30Gb free disk space

It is recommended to have at least 30 Gigabytes of disk space to host Gazebo sources together with all the dependencies and compilation artifacts.

Supported compilers

At this moment, compilation has been tested on Windows 8.1 and 10, supported when using Visual Studio 2017. Patches for other versions are welcome.

Installation

This installation procedure uses pre-compiled binaries in a local workspace. To make things easier, use a MinGW shell for your editing work (such as the Git Bash Shell), and only use the Windows cmd for configuring and building. You might also need to disable the Windows firewall.

  • 创建一个目录, e.g.:
mkdir gz-ws
cd gz-ws
  • 在目录下,下载相关联的文件
  1. libcurl HEAD
  2. libyaml
  3. dlfcn-win32
  4. jsoncpp
  5. protobuf 3.4.1
  6. zlib
  7. zziplib 0.13.62
  8. freeImage 3.x
  9. boost 1.67.0
  10. OGRE 1.10.12 rc1
  11. bzip2 1.0.6
  12. TBB 4.3
  13. Qt 5.7.0
  14. QWT 6.1.22
  15. ZeroMQ 4.2.3
  • 解压每一个文件到gz-ws;
  • 安装cmake,安装的时候选择"Add CMake to system path for all users";

http://www.cmake.org/download/

  • 安装 Ruby 1.9 或更高版本,并确定把ruby添加到了环境变量里;

https://rubyinstaller.org/downloads/

  • clone Ignition CMake, Common, Fuel Tools, Math, Transport, Sdformat, and Gazebo:
git clone https://github.com/ignitionrobotics/ign-cmake -b ign-cmake0
git clone https://github.com/ignitionrobotics/ign-common -b ign-common1
git clone https://github.com/ignitionrobotics/ign-fuel-tools -b ign-fuel-tools1
git clone https://github.com/ignitionrobotics/ign-math -b ign-math4
git clone https://github.com/ignitionrobotics/ign-msgs -b ign-msgs1
git clone https://github.com/ignitionrobotics/ign-transport -b ign-transport4
git clone https://github.com/osrf/sdformat -b sdf6
git clone https://github.com/osrf/gazebo -b gazebo9

  • 打开cmd(Start->Run->"cmd"->enter),输入以下命令:
"C:\Program Files\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64

or "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_amd64

(假如Visual Studio 2017安装到了C:\Program Files下)

  • 安装ign-cmake,运行.\configure.bat,安装目录为gz-ws/ign-cmake/build/install/Release;
  • 安装ign-math,运行.\configure.bat,安装目录为gz-ws/ign-math/build/install/Release;
  • 安装ign-common,运行.\configure.bat,安装目录为gz-ws/ign-common/build/install/Release;
  • 安装ign-fuel-tools,运行.\configure.bat,安装目录为gz-ws/ign-fuel-tools/build/install/Release;
  • 安装ign-msgs,运行.\configure.bat,安装目录为gz-ws/ign-msgs/build/install/Release;
  • 安装ign-transport,运行.\configure.bat,安装目录为gz-ws/ign-transport/build/install/Release;
  • 安装sdformat,运行.\configure.bat,安装目录为gz-ws/sdformat/build/install/Release;
  • 安装gazebo,运行.\configure.bat,安装目录为gz-ws/gazebo/build/install/Release;
gzclient: nmake gzclient
gzserver: nmake gzserver
nmake install
备注: 以上安装如果编译错误的话,则需要修改相应的configure.bat,把相应的依赖库增加到CMAKE_PREFIX_PATH中;

  • 运行
  1. gzserver

修改win_addpath.bat,只需修改gazebo相关的变量值

cd gz-ws\gazebo\build ..\win_addpath.bat Release

gzserver.exe

  1. gzclient

cd gz-ws\gazebo\build ..\win_addpath.bat Release

gzclient.exe

如果需要运行过程中得到更多的信息,请使用 --verbose。
















posted @ 2020-07-03 09:35  不止所见  阅读(4443)  评论(1编辑  收藏  举报