diff --git a/tutorials/02_installation.md b/tutorials/02_installation.md index 28931fe9..89207356 100644 --- a/tutorials/02_installation.md +++ b/tutorials/02_installation.md @@ -205,7 +205,7 @@ sudo make uninstall ### 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. +First, follow the [source installation](https://gazebosim.org/docs/ionic/install_windows_src/) tutorial until step 5 included 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`). @@ -266,7 +266,7 @@ conda install libgz-cmake<#> libgz-msgs<#> libgz-tools<#> --channel conda-forge cmake --build . --config Release ``` - Try an example + Try an example (in the Release directory) ```bash responser ``` diff --git a/tutorials/04_messages.md b/tutorials/04_messages.md index 85bc5ab0..4e6adc7f 100644 --- a/tutorials/04_messages.md +++ b/tutorials/04_messages.md @@ -148,6 +148,20 @@ cmake --build . --config Release ## Running the examples +> **NOTE** +> It is essential to have a valid value of `GZ_PARTITION` environment variable +> and to have it set to the same value in all open terminals. As `GZ_PARTITION` +> is based on hostname and username, especially Windows and Mac users might +> have problems due to spaces in their username, which are not a valid character +> in `GZ_PARTITION`. gz-transport prints error `Invalid partition name` in such +> case. To resolve that, set `GZ_PARTITION` explicitly to a valid value: +> ```bash +> # Linux and Mac +> export GZ_PARTITION=test +> # Windows +> set GZ_PARTITION=test +> ``` + Open two new terminals and from your `build/` directory run the executables. From terminal 1: diff --git a/tutorials/05_services.md b/tutorials/05_services.md index 801a8fa8..da4e0e95 100644 --- a/tutorials/05_services.md +++ b/tutorials/05_services.md @@ -609,6 +609,25 @@ cmake --build . --config Release ## Running the examples +> **NOTE** +> It is essential to have a valid value of `GZ_PARTITION` environment variable +> and to have it set to the same value in all open terminals. As `GZ_PARTITION` +> is based on hostname and username, especially Windows and Mac users might +> have problems due to spaces in their username, which are not a valid character +> in `GZ_PARTITION`. gz-transport prints error `Invalid partition name` in such +> case. To resolve that, set `GZ_PARTITION` explicitly to a valid value: +> ```bash +> # Linux and Mac +> export GZ_PARTITION=test +> # Windows +> set GZ_PARTITION=test +> ``` + +> **NOTE** +> On Windows, you can see firewall or antivirus prompts when running the examples. +> For them to work properly, you should allow all communication to the +> example programs. + Open three new terminals and from your ``build/`` directory run the executables. From terminal 1: @@ -661,7 +680,11 @@ directory run the executables. From terminal 1: ```{.sh} +# Linux and MacOS ./responser_oneway + +# Windows +.\Release\responser_oneway.exe ``` From terminal 2: @@ -678,11 +701,7 @@ In your responser terminal, you should expect an output similar to this one, showing that your service provider has received a request: ```{.sh} -# Linux and MacOS ./responser_oneway - -# Windows -.\Release\responser_oneway.exe Request received: [HELLO] ``` @@ -723,12 +742,8 @@ In your requesters' terminals, you should expect an output similar to this one, showing that you have received a response: ```{.sh} -# Linux and MacOS ./requester_no_input -# Windows -.\Release\requester_no_input.exe - Press to exit Response: [This is it! This is the answer. It says here...that a bolt of lightning is going to strike the clock tower at precisely 10:04pm, next diff --git a/tutorials/06_python_support.md b/tutorials/06_python_support.md index 21b663a8..74204c2c 100644 --- a/tutorials/06_python_support.md +++ b/tutorials/06_python_support.md @@ -177,6 +177,20 @@ export PYTHONPATH=$PYTHONPATH:/lib/python ## Running the examples +> **NOTE** +> It is essential to have a valid value of `GZ_PARTITION` environment variable +> and to have it set to the same value in all open terminals. As `GZ_PARTITION` +> is based on hostname and username, especially Windows and Mac users might +> have problems due to spaces in their username, which are not a valid character +> in `GZ_PARTITION`. gz-transport prints error `Invalid partition name` in such +> case. To resolve that, set `GZ_PARTITION` explicitly to a valid value: +> ```bash +> # Linux and Mac +> export GZ_PARTITION=test +> # Windows +> set GZ_PARTITION=test +> ``` + Open two new terminals and directly run the Python scripts downloaded previously. From terminal 1: @@ -340,7 +354,7 @@ We can declare the topic remapping option using the following code: # Create a transport node and remap a topic. nodeOpts = NodeOptions() - nodeOpts.add_topic_remap("/foo", "/bar") + nodeOpts.add_topic_remap("/example_stringmsg_topic", "/bar") node = Node(nodeOpts) ``` diff --git a/tutorials/07_security.md b/tutorials/07_security.md index 6ed4829f..98f3d88c 100644 --- a/tutorials/07_security.md +++ b/tutorials/07_security.md @@ -37,6 +37,20 @@ password. Also, every subscriber will only connect to secure publishers. ### Example +> **NOTE** +> It is essential to have a valid value of `GZ_PARTITION` environment variable +> and to have it set to the same value in all open terminals. As `GZ_PARTITION` +> is based on hostname and username, especially Windows and Mac users might +> have problems due to spaces in their username, which are not a valid character +> in `GZ_PARTITION`. gz-transport prints error `Invalid partition name` in such +> case. To resolve that, set `GZ_PARTITION` explicitly to a valid value: +> ```bash +> # Linux and Mac +> export GZ_PARTITION=test +> # Windows +> set GZ_PARTITION=test +> ``` + First, let's test unsecure communication. This example requires [gz-tools](https://github.com/gazebosim/gz-tools). diff --git a/tutorials/10_logging.md b/tutorials/10_logging.md index 61a5779d..d969ab12 100644 --- a/tutorials/10_logging.md +++ b/tutorials/10_logging.md @@ -148,6 +148,20 @@ cmake --build . --config Release ## Running the examples +> **NOTE** +> It is essential to have a valid value of `GZ_PARTITION` environment variable +> and to have it set to the same value in all open terminals. As `GZ_PARTITION` +> is based on hostname and username, especially Windows and Mac users might +> have problems due to spaces in their username, which are not a valid character +> in `GZ_PARTITION`. gz-transport prints error `Invalid partition name` in such +> case. To resolve that, set `GZ_PARTITION` explicitly to a valid value: +> ```bash +> # Linux and Mac +> export GZ_PARTITION=test +> # Windows +> set GZ_PARTITION=test +> ``` + Open two new terminals and from your `build/` directory run the recorder. From terminal 1: diff --git a/tutorials/23_topic_statistics.md b/tutorials/23_topic_statistics.md index ce40afa5..92a214ff 100644 --- a/tutorials/23_topic_statistics.md +++ b/tutorials/23_topic_statistics.md @@ -85,14 +85,27 @@ cmake --build build --parallel cmake --build build --config release --parallel ``` -#### Executing on Linux or Mac - -1. Terminal 1: `GZ_TRANSPORT_TOPIC_STATISTICS=1 ./example/build/publisher` -1. Terminal 2: `GZ_TRANSPORT_TOPIC_STATISTICS=1 ./example/build/subscriber_stats` -1. Terminal 3: `GZ_TRANSPORT_TOPIC_STATISTICS=1 gz topic -et /statistics` - -#### Executing on Windows - -1. Terminal 1: `set "GZ_TRANSPORT_TOPIC_STATISTICS=1" && example\build\release\publisher.exe` -1. Terminal 2: `set "GZ_TRANSPORT_TOPIC_STATISTICS=1" && example\build\subscriber_stats.exe` -1. Terminal 3: `set "GZ_TRANSPORT_TOPIC_STATISTICS=1" && gz topic -et /statistics` +#### Executing +> **NOTE** +> It is essential to have a valid value of `GZ_PARTITION` environment variable +> and to have it set to the same value in all open terminals. As `GZ_PARTITION` +> is based on hostname and username, especially Windows and Mac users might +> have problems due to spaces in their username, which are not a valid character +> in `GZ_PARTITION`. gz-transport prints error `Invalid partition name` in such +> case. To resolve that, set `GZ_PARTITION` explicitly to a valid value. + +If you have the Gazebo Transport sources with the example programs built, +then you can test topic statistics by following these steps depending on the +platform: + +##### Linux or Mac + +1. Terminal 1: `GZ_PARTITION=test GZ_TRANSPORT_TOPIC_STATISTICS=1 ./example/build/publisher` +1. Terminal 2: `GZ_PARTITION=test GZ_TRANSPORT_TOPIC_STATISTICS=1 ./example/build/subscriber_stats` +1. Terminal 3: `GZ_PARTITION=test GZ_TRANSPORT_TOPIC_STATISTICS=1 gz topic -et /statistics` + +##### Windows + +1. Terminal 1: `set "GZ_PARTITION=test" && set "GZ_TRANSPORT_TOPIC_STATISTICS=1" && example\build\release\publisher.exe` +1. Terminal 2: `set "GZ_PARTITION=test" && set "GZ_TRANSPORT_TOPIC_STATISTICS=1" && example\build\subscriber_stats.exe` +1. Terminal 3: `set "GZ_PARTITION=test" && set "GZ_TRANSPORT_TOPIC_STATISTICS=1" && gz topic -et /statistics`