diff --git a/tutorials/04_messages.md b/tutorials/04_messages.md index 4252e5b5f..672322d6b 100644 --- a/tutorials/04_messages.md +++ b/tutorials/04_messages.md @@ -224,8 +224,12 @@ cd build Run `cmake` and build the code. ```{.sh} +# Linux and MacOS cmake .. make publisher subscriber + +# Windows +cmake --build . --config Release ``` ## Running the examples @@ -235,13 +239,21 @@ Open two new terminals and from your `build/` directory run the executables. From terminal 1: ```{.sh} +# Linux and MacOS ./publisher + +# Windows +.\Release\publisher.exe ``` From terminal 2: ```{.sh} +# Linux and MacOS ./subscriber + +# Windows +.\Release\subscriber.exe ``` In your subscriber terminal, you should expect an output similar to this one, @@ -438,20 +450,33 @@ Run `cmake` and build the example: ```{.sh} cd build + +# Linux and MacOS cmake .. make subscriber_generic + +# Windows +cmake --build . --config Release ``` From terminal 1: ```{.sh} +# Linux and MacOS ./publisher + +# Windows +.\Release\publisher.exe ``` From terminal 2: ```{.sh} +# Linux and MacOS ./subscriber_generic + +# Windows +.\Release\subscriber_generic.exe ``` ## Using custom Protobuf messages @@ -543,20 +568,33 @@ Run `cmake` and build the example: ```{.sh} cd build + +# Linux and MacOS cmake .. make + +# Windows +cmake --build . --config Release ``` From terminal 1: ```{.sh} +# Linux and MacOS ./publisher_custom_msg + +# Windows +.\Release\publisher_custom_msg.exe ``` From terminal 2: ```{.sh} +# Linux and MacOS ./subscriber_custom_msg + +# Windows +.\Release\subscriber_custom_msg.exe ``` ## Topic remapping @@ -585,7 +623,11 @@ You can modify any of the publisher examples to add this option. From terminal 1: ```{.sh} +# Linux and MacOS ./publisher + +# Windows +.\Release\publisher.exe ``` From terminal 2 (requires Gazebo Tools): diff --git a/tutorials/05_services.md b/tutorials/05_services.md index 8417bf305..965586538 100644 --- a/tutorials/05_services.md +++ b/tutorials/05_services.md @@ -598,9 +598,13 @@ cd build Run ``cmake`` and build the code. ```{.sh} +# Linux and MacOS cmake .. make responser responser_oneway requester requester_async requester_oneway make responser_no_input requester_no_input requester_async_no_input + +# Windows +cmake --build . --config Release ``` ## Running the examples @@ -610,19 +614,31 @@ Open three new terminals and from your ``build/`` directory run the executables. From terminal 1: ```{.sh} +# Linux and MacOS ./responser + +# Windows +.\Release\responser.exe ``` From terminal 2: ```{.sh} +# Linux and MacOS ./requester + +# Windows +.\Release\requester.exe ``` From terminal 3: ```{.sh} +# Linux and MacOS ./requester_async + +# Windows +.\Release\requester_async.exe ``` In your requester terminals, you should expect an output similar to this one, @@ -651,14 +667,22 @@ From terminal 1: From terminal 2: ```{.sh} +# Linux and MacOS ./requester_oneway + +# Windows +.\Release\requester_oneway.exe ``` In your responser terminal, you should expect an output similar to this one, showing that your service provider has received a request: ```{.sh} -$ ./responser_oneway +# Linux and MacOS +./responser_oneway + +# Windows +.\Release\responser_oneway.exe Request received: [HELLO] ``` @@ -668,26 +692,43 @@ For running the examples without input, open three terminals and from your From terminal 1: ```{.sh} +# Linux and MacOS ./responser_no_input + +# Windows +.\Release\responser_no_input.exe ``` From terminal 2: ```{.sh} +# Linux and MacOS ./requester_no_input + +# Windows +.\Release\requester_no_input.exe ``` From terminal 3: ```{.sh} +# Linux and MacOS ./requester_async_no_input + +# Windows +.\Release\requester_async_no_input.exe ``` In your requesters' terminals, you should expect an output similar to this one, showing that you have received a response: ```{.sh} -$ ./requester_no_input +# 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_security.md b/tutorials/06_security.md index efc37a5e0..69bad0210 100644 --- a/tutorials/06_security.md +++ b/tutorials/06_security.md @@ -28,7 +28,7 @@ either use, or not use, authentication. Two environment variables are used to enable authentications: 1. `GZ_TRANSPORT_USERNAME` : The username -2. `GZ_TRANSPORT_PASSWORD` : The password +2. `GZ_TRANSPORT_PASSWORD` : The password When both `GZ_TRANSPORT_USERNAME` and `GZ_TRANSPORT_PASSWORD` are set, the authentication is enabled for a process. Every publisher in a secure @@ -58,8 +58,13 @@ Now let's try a secure publisher and an unsecure subscriber. 1. Leave the first terminal running `gz topic -t /foo -e`. 2. Setup authentication in the second terminal: ``` +# Linux and MacOS export GZ_TRANSPORT_USERNAME=user export GZ_TRANSPORT_PASSWORD=pass + +# Windows +set GZ_TRANSPORT_USERNAME=user +set GZ_TRANSPORT_PASSWORD=pass ``` 3. Now publish a message in the second terminal: ``` @@ -72,8 +77,13 @@ Finally, let's create secure subscriber. 1. Open a third terminal, and setup authentication in that terminal. ``` +# Linux and MacOS export GZ_TRANSPORT_USERNAME=user export GZ_TRANSPORT_PASSWORD=pass + +# Windows +set GZ_TRANSPORT_USERNAME=user +set GZ_TRANSPORT_PASSWORD=pass ``` 2. Echo the `/foo` topic in the secure third terminal. ``` diff --git a/tutorials/10_logging.md b/tutorials/10_logging.md index 0b09fca89..c2de0e48d 100644 --- a/tutorials/10_logging.md +++ b/tutorials/10_logging.md @@ -228,8 +228,12 @@ cd build Run `cmake` and build the code. ```{.sh} +# Linux and MacOS cmake .. make + +# Windows +cmake --build . --config Release ``` ## Running the examples @@ -239,7 +243,12 @@ Open two new terminals and from your `build/` directory run the recorder. From terminal 1: ```{.sh} +# Linux and MacOS ./log_record tutorial.tlog + +# Windows +.\Release\log_record.exe tutorial.tlog + Press Ctrl+C to finish recording. Recording... ``` @@ -261,7 +270,11 @@ gz topic -t /foo -e And from terminal 1, playback your log file: ```{.sh} +# Linux and MacOS ./log_playback tutorial.tlog + +# Windows +.\Release\log_playback.exe tutorial.tlog ``` You should receive one message in terminal 2: