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。

















免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM