From 5c61231e3d8e4f64ffbb27b6aaabeba445c417e0 Mon Sep 17 00:00:00 2001 From: Martin Pecka Date: Sun, 15 Sep 2024 23:43:50 +0200 Subject: [PATCH] tutorials: Added notices about GZ_PARTITION Signed-off-by: Martin Pecka --- tutorials/04_messages.md | 14 ++++++++++++++ tutorials/06_python_support.md | 14 ++++++++++++++ tutorials/07_security.md | 14 ++++++++++++++ tutorials/10_logging.md | 14 ++++++++++++++ tutorials/23_topic_statistics.md | 14 ++++++++++++++ 5 files changed, 70 insertions(+) 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/06_python_support.md b/tutorials/06_python_support.md index 21b663a8..50cb712f 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: 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 1f24806f..43e6afde 100644 --- a/tutorials/23_topic_statistics.md +++ b/tutorials/23_topic_statistics.md @@ -73,6 +73,20 @@ if (!node.EnableStats(topic, true, "/my_stats", 100)) ### 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 +> ``` + If you have the Gazebo Transport sources with the example programs built, then you can test topic statistics by following these steps.