Skip to content

Commit

Permalink
ionic/install_windows_src: More bulletproof terminal setup instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Pecka <[email protected]>
  • Loading branch information
peci1 authored Sep 15, 2024
1 parent 81fdd19 commit 57c4662
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions ionic/install_windows_src.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,24 @@ without any failures when using their functionalities.
cmake via Conda. All other checkboxes can be left unchecked.

3. Open a Visual Studio Command Prompt (search for "x64 Native Tools Command Prompt
for VS" in the Windows search field near the Windows button). Optionally,
for VS" in the Windows search field near the Windows button) or Developer PowerShell
for VS (search for "developer powershell"). Optionally,
right-click and pin to the task bar for quick access in the future.

If you did not add Conda to your `PATH` environment variable during Conda installation,
you may need to navigate to the location of `condabin` in order to use the `conda` command.
To find `condabin`, search for "Anaconda Prompt" in the Windows search field near the
Windows button, open it, run `where conda`, and look for a line containing the directory `condabin`.

4. Navigate to your `condabin`, if necessary, and then create and activate a Conda environment:
If you chose PowerShell, you need to do a few steps to be able to use Conda and Gazebo in it:
```bash
# Navigate to your condabin directory if needed
conda init powershell
# Restart the PowerShell
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
```

5. Navigate to your `condabin`, if necessary, and then create and activate a Conda environment:
```bash
conda create -n gz-ws
conda activate gz-ws
Expand All @@ -60,7 +69,7 @@ without any failures when using their functionalities.
to a subdirectory of the current directory, you have to prepend `.\` so that Conda
knows it is a path and not a name.

5. Install dependencies:
6. Install dependencies:
```bash
conda install cmake git vcstool curl pkg-config ^
colcon-common-extensions dartsim eigen freeimage gdal gts ^
Expand All @@ -70,15 +79,15 @@ without any failures when using their functionalities.
```
This can take tens of minutes (or less when using libmamba solver).

6. Navigate to where you would like to build the library, create and enter your workspace directory,
7. Navigate to where you would like to build the library, create and enter your workspace directory,
create the `src` directory which will contain the Gazebo source code.
```bash
mkdir gz-ws
cd gz-ws
mkdir src
```

7. Then clone the repositories
8. Then clone the repositories
```bash
# CMD
curl -sk https://raw.githubusercontent.com/gazebo-tooling/gazebodistro/master/collection-ionic.yaml -o collection-ionic
Expand Down Expand Up @@ -127,15 +136,23 @@ If there are no errors, all the binaries should be ready to use.
## Using the workspace

The workspace needs to be sourced every time a new terminal is used (
and Conda environment activated before that).
and Conda environment activated before that). Also, remember that Gazebo
can only run inside a Visual Studio Command Prompt and it will fail to
load from a normal (CMD or PowerShell) prompt with errors like
`Library Error`, `can't load` and similar.

Run the following command to source the workspace:
The overall instructions for setting up a new terminal to use the built
workspace are:

```bash
# CMD
# Run a Visual Studio Command Prompt
conda activate gz-ws
call install\setup.bat

# PowerShell
# Run a Developer PowerShell for VS 2019/2022
conda activate gz-ws
.\install\setup.ps1
```

Expand Down

0 comments on commit 57c4662

Please sign in to comment.