Skip to content

Commit 2d23f6d

Browse files
authored
tutorials/install: Added Windows instructions
Signed-off-by: Martin Pecka <peci1@seznam.cz>
1 parent 3765579 commit 2d23f6d

File tree

1 file changed

+65
-3
lines changed

1 file changed

+65
-3
lines changed

tutorials/install.md

Lines changed: 65 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
\page install Installation
22

3-
These instructions are for installing only Gazebo. If you're interested
4-
in using all the Gazebo libraries, not only Igniton Gazebo, check out this
3+
These instructions are for installing only Gazebo Sim. If you're interested
4+
in using all the Gazebo libraries including gz-launch, or to install all
5+
libraries from source, check out
56
[Gazebo installation](https://gazebosim.org/docs/latest/install).
67

78
We recommend following the binary install instructions to get up and running as
@@ -50,6 +51,27 @@ installing Gazebo from source.
5051
brew install gz-sim<#>
5152
```
5253

54+
### Windows
55+
56+
First, follow the [gz-cmake](https://gazebosim.org/api/cmake/4/install.html) tutorial for installing Conda, Visual Studio, CMake, and other prerequisites, and also for creating a Conda environment.
57+
58+
Navigate to ``condabin`` if necessary to use the ``conda`` command (i.e., if Conda is not in your `PATH` environment variable. You can find the location of ``condabin`` in Anaconda Prompt, ``where conda``).
59+
60+
Create if necessary, and activate a Conda environment:
61+
```
62+
conda create -n gz-ws
63+
conda activate gz-ws
64+
```
65+
66+
Now install Gazebo.
67+
68+
```
69+
conda install gz-sim<#> --channel conda-forge
70+
```
71+
72+
Be sure to replace `<#>` with a number value, such as 8 or 9, depending on
73+
which version you need.
74+
5375
## Source Install
5476

5577
Install from source if you're interested in changing the source code or need a
@@ -115,6 +137,43 @@ feature which hasn't been released yet.
115137
sudo make install
116138
```
117139

140+
### Windows
141+
142+
This assumes you have created and activated a Conda environment (the same way as in the
143+
binary install).
144+
145+
1. Install Gazebo dependencies:
146+
147+
You can view available versions and their dependencies:
148+
```
149+
conda search libgz-sim* --channel conda-forge --info
150+
```
151+
152+
Install the dependencies, replacing `<#>` with the required versions:
153+
```
154+
conda install gz-cmake<#> gz-common<#> gz-fuel-tools<#> gz-gui<#> gz-math<#> gz-msgs<#> gz-physics<#> gz-plugin<#> gz-rendering<#> gz-sensors<#> gz-tools<#> gz-transport<#> gz-utils<#> sdformat<#> --channel conda-forge
155+
```
156+
157+
2. Navigate to where you would like to build the library, and clone the repository.
158+
```
159+
# Optionally, append `-b gz-sim#` (replace # with a number) to check out a specific version
160+
git clone https://github.com/gazebosim/gz-sim.git
161+
```
162+
163+
3. Configure and build
164+
```
165+
cd gz-sim
166+
mkdir build
167+
cd build
168+
cmake .. -DBUILD_TESTING=OFF # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\install
169+
cmake --build . --config Release
170+
```
171+
172+
4. Optionally, install
173+
```
174+
cmake --install . --config Release
175+
```
176+
118177
## Documentation
119178

120179
API documentation and tutorials can be accessed at [https://gazebosim.org/libs/gazebo](https://gazebosim.org/libs/gazebo)
@@ -123,7 +182,10 @@ You can also generate the documentation from a clone of this repository by follo
123182

124183
1. You will need [Doxygen](http://www.doxygen.org/). On Ubuntu Doxygen can be installed using
125184
```
185+
# Linux
126186
sudo apt-get install doxygen
187+
# Windows
188+
conda install doxygen --channel conda-forge
127189
```
128190

129191
2. Clone the repository
@@ -137,7 +199,7 @@ You can also generate the documentation from a clone of this repository by follo
137199
mkdir build
138200
cd build
139201
cmake ../
140-
make doc
202+
cmake --build . --target doc
141203
```
142204

143205
4. View the documentation by running the following command from the `build` directory.

0 commit comments

Comments
 (0)