Skip to content

Commit

Permalink
Replace ign with gz and update windows instructions in installation t…
Browse files Browse the repository at this point in the history
…utorial (#382)


---------

Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Sep 13, 2023
1 parent f504526 commit 11bf731
Showing 1 changed file with 35 additions and 34 deletions.
69 changes: 35 additions & 34 deletions tutorials/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ sudo apt-get update

2. Install Gazebo Sensors
```{.sh}
# Change <#> to a version number, like 3 or 4
# Change <#> to a version number, like 7 or 8
sudo apt install libgz-sensors<#>-dev
```

Expand All @@ -35,12 +35,32 @@ sudo apt install libgz-sensors<#>-dev
brew install gz-sensors<#>
```

Be sure to replace `<#>` with a number value, such as 5 or 6, depending on
Be sure to replace `<#>` with a number value, such as 7 or 8, depending on
which version you need.

### Windows

Binary install is pending `gz-rendering` and `gz-sensors` being added to conda-forge.
#### Install Prerequisites

First, follow the [gz-cmake](https://github.com/gazebosim/gz-cmake) tutorial for installing Conda, Visual Studio, CMake, etc., prerequisites, and creating a Conda environment.

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`).

Create if necessary, and activate a Conda environment:

```
conda create -n gz-ws
conda activate gz-ws
```

#### Binary Installation

```
conda install libgz-sensors<#> --channel conda-forge
```

Be sure to replace `<#>` with a number value, such as 7 or 8, depending on
which version you need.

## Source Install

Expand Down Expand Up @@ -85,14 +105,14 @@ Gazebo Sensors requires:

1. Clone the repository
```
git clone https://github.com/gazebosim/gz-sensors -b ign-sensors<#>
git clone https://github.com/gazebosim/gz-sensors -b gz-sensors<#>
```
Be sure to replace `<#>` with a number value, such as 5 or 6, depending on
which version you need.

2. Install dependencies
```
brew install --only-dependencies ignition-sensors<#>
brew install --only-dependencies gz-sensors<#>
```
Be sure to replace `<#>` with a number value, such as 5 or 6, depending on
which version you need.
Expand All @@ -113,37 +133,24 @@ Gazebo Sensors requires:

### Windows

#### Install Prerequisites

First, follow the [gz-cmake](https://github.com/gazebosim/gz-cmake) tutorial for installing Conda, Visual Studio, CMake, etc., prerequisites, and creating a Conda environment.

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`).

Create if necessary, and activate a Conda environment:
This assumes you have created and activated a Conda environment while [installing the Prerequisites](#install-prerequisites).

```
conda create -n gz-ws
conda activate gz-ws
```
1. Install Gazebo dependencies:

Install Gazebo dependencies, replacing `<#>` with the desired versions:

```
conda install libgz-cmake<#> libgz-common<#> libgz-math<#> libgz-transport<#> libgz-msgs<#> --channel conda-forge
```

Before [gz-rendering](https://github.com/gazebosim/gz-rendering) becomes available on conda-forge, follow its tutorial to build it from source.
You can view available versions and their dependencies:
```
conda search libgz-sensors* --channel conda-forge --info
```

#### Build from source
Install dependencies, replacing `<#>` with the desired versions:

1. Activate the Conda environment created in the prerequisites:
```
conda activate gz-ws
conda install libgz-cmake<#> libgz-common<#> libgz-math<#> libgz-transport<#> libgz-msgs<#> libgz-rendering<#> --channel conda-forge
```

2. Navigate to where you would like to build the library, and clone the repository.
```
# Optionally, append `-b ign-sensors#` (replace # with a number) to check out a specific version
# Optionally, append `-b gz-sensors#` (replace # with a number) to check out a specific version
git clone https://github.com/gazebosim/gz-sensors.git
```

Expand All @@ -154,13 +161,7 @@ Before [gz-rendering](https://github.com/gazebosim/gz-rendering) becomes availab
cd build
```

4. Before `gz-rendering` becomes available on conda-forge, we need to build it from source and specify the path containing `gz-rendering-config.cmake` in `CMAKE_PREFIX_PATH`, for cmake to find `gz-rendering`. That path could be `gz-rendering-install-path\lib\cmake\gz-rendering4`, for example.
```
cmake .. -DBUILD_TESTING=OFF -DCMAKE_PREFIX_PATH=path\containing\ignition-rendering-config # Optionally, -DCMAKE_INSTALL_PREFIX=path\to\install
cmake --build . --config Release
```

5. Optionally, install. You will likely need to run a terminal with admin privileges for this call to succeed.
4. Optionally, install. You will likely need to run a terminal with admin privileges for this call to succeed.
```
cmake --install . --config Release
```
Expand Down

0 comments on commit 11bf731

Please sign in to comment.