You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: tutorials/04_messages.md
+9-9
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ cd ~/gz_transport_tutorial
17
17
18
18
## Publisher
19
19
20
-
Download the [publisher.cc](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/publisher.cc) file within the `gz_transport_tutorial`
20
+
Download the [publisher.cc](https://github.com/gazebosim/gz-transport/raw/main/example/publisher.cc) file within the `gz_transport_tutorial`
21
21
folder and open it with your favorite editor:
22
22
23
23
\snippet example/publisher.cc complete
@@ -76,7 +76,7 @@ The method *Publish()* sends a message to all the subscribers.
76
76
77
77
## Subscriber
78
78
79
-
Download the [subscriber.cc](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/subscriber.cc)
79
+
Download the [subscriber.cc](https://github.com/gazebosim/gz-transport/raw/main/example/subscriber.cc)
80
80
file into the `gz_transport_tutorial` folder and open it with your favorite editor:
81
81
82
82
\snippet example/subscriber.cc complete
@@ -126,7 +126,7 @@ until you hit *CTRL-C*. Note that this function captures the *SIGINT* and
126
126
127
127
## Building the code
128
128
129
-
Download the [CMakeLists.txt](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/CMakeLists.txt) file within the `gz_transport_tutorial` folder.
129
+
Download the [CMakeLists.txt](https://github.com/gazebosim/gz-transport/raw/main/example/CMakeLists.txt) file within the `gz_transport_tutorial` folder.
130
130
131
131
Once you have all your files, go ahead and create a `build/` directory within
132
132
the `gz_transport_tutorial` directory.
@@ -287,7 +287,7 @@ between Gazebo Transport and another protocol or if you want to just print the
287
287
content of a generic protobuf message using `DebugString()`, among other use
288
288
cases.
289
289
290
-
Download the [subscriber_generic.cc](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/subscriber_generic.cc) file within the `gz_transport_tutorial` folder and open it with your favorite editor:
290
+
Download the [subscriber_generic.cc](https://github.com/gazebosim/gz-transport/raw/main/example/subscriber_generic.cc) file within the `gz_transport_tutorial` folder and open it with your favorite editor:
291
291
292
292
```{.cpp}
293
293
#include <google/protobuf/message.h>
@@ -416,12 +416,12 @@ often the integration of the message generation into the build system of your
416
416
project. Next, you can find an example of a publisher and subscriber using a
417
417
custom Protobuf message integrated with CMake.
418
418
419
-
Download the [publisher_custom_msg.cc](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/publisher_custom_msg.cc)
420
-
and the [subscriber_custom_msg.cc](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/subscriber_custom_msg.cc)
419
+
Download the [publisher_custom_msg.cc](https://github.com/gazebosim/gz-transport/raw/main/example/publisher_custom_msg.cc)
420
+
and the [subscriber_custom_msg.cc](https://github.com/gazebosim/gz-transport/raw/main/example/subscriber_custom_msg.cc)
421
421
files within the `gz_transport_tutorial`. Then, create a `msgs` folder and
422
-
download the [stringmsg.proto](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/msgs/stringmsg.proto)
423
-
and the [CMakeLists.txt](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/msgs/CMakeLists.txt)
424
-
files within the `msgs` folder. Finally, we'll need the main [CMakeLists.txt](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/CMakeLists.txt)
422
+
download the [stringmsg.proto](https://github.com/gazebosim/gz-transport/raw/main/example/msgs/stringmsg.proto)
423
+
and the [CMakeLists.txt](https://github.com/gazebosim/gz-transport/raw/main/example/msgs/CMakeLists.txt)
424
+
files within the `msgs` folder. Finally, we'll need the main [CMakeLists.txt](https://github.com/gazebosim/gz-transport/raw/main/example/CMakeLists.txt)
425
425
file. You should have this file from the previous examples. Otherwise,
426
426
download and place it within the `gz_transport_tutorial` folder.
Copy file name to clipboardexpand all lines: tutorials/05_services.md
+10-10
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ cd ~/gz_transport_tutorial
25
25
26
26
## Responser
27
27
28
-
Download the [responser.cc](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/responser.cc) file within the ``gz_transport_tutorial``
28
+
Download the [responser.cc](https://github.com/gazebosim/gz-transport/raw/main/example/responser.cc) file within the ``gz_transport_tutorial``
29
29
folder and open it with your favorite editor:
30
30
31
31
```{.cpp}
@@ -133,7 +133,7 @@ until you hit *CTRL-C*. Note that this function captures the *SIGINT* and
133
133
134
134
## Synchronous requester
135
135
136
-
Download the [requester.cc](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/requester.cc) file within the ``gz_transport_tutorial``
136
+
Download the [requester.cc](https://github.com/gazebosim/gz-transport/raw/main/example/requester.cc) file within the ``gz_transport_tutorial``
137
137
folder and open it with your favorite editor:
138
138
139
139
```{.cpp}
@@ -228,7 +228,7 @@ message.
228
228
229
229
## Asynchronous requester
230
230
231
-
Download the [requester_async.cc](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/requester_async.cc) file within the
231
+
Download the [requester_async.cc](https://github.com/gazebosim/gz-transport/raw/main/example/requester_async.cc) file within the
232
232
``gz_transport_tutorial`` folder and open it with your favorite editor:
233
233
234
234
```{.cpp}
@@ -314,7 +314,7 @@ oneway service to process service requests without sending back responses.
314
314
Oneway services don't accept any output parameters nor the requests have to wait
315
315
for the response.
316
316
317
-
Download the [responser_oneway.cc](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/responser_oneway.cc) file within the
317
+
Download the [responser_oneway.cc](https://github.com/gazebosim/gz-transport/raw/main/example/responser_oneway.cc) file within the
318
318
``gz_transport_tutorial`` folder and open it with your favorite editor:
319
319
320
320
```{.cpp}
@@ -389,7 +389,7 @@ This case is similar to the oneway service provider. This code can be used for
389
389
requesting a service that does not need a response back. We don't need any
390
390
output parameters in this case nor we have to wait for the response.
391
391
392
-
Download the [requester_oneway.cc](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/requester_oneway.cc) file within the
392
+
Download the [requester_oneway.cc](https://github.com/gazebosim/gz-transport/raw/main/example/requester_oneway.cc) file within the
393
393
``gz_transport_tutorial`` folder and open it with your favorite editor:
394
394
395
395
```{.cpp}
@@ -454,7 +454,7 @@ request was already published.
454
454
Sometimes we want to receive some result but don't have any input parameter to
455
455
send.
456
456
457
-
Download the [responser_no_input.cc](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/responser_no_input.cc)
457
+
Download the [responser_no_input.cc](https://github.com/gazebosim/gz-transport/raw/main/example/responser_no_input.cc)
458
458
file within the ``gz_transport_tutorial`` folder and open it with your
459
459
favorite editor:
460
460
@@ -534,7 +534,7 @@ service requests.
534
534
This case is similar to the service without input parameter. We don't send any
535
535
request.
536
536
537
-
Download the [requester_no_input.cc](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/requester_no_input.cc)
537
+
Download the [requester_no_input.cc](https://github.com/gazebosim/gz-transport/raw/main/example/requester_no_input.cc)
538
538
file within the ``gz_transport_tutorial`` folder and open it with your
539
539
favorite editor:
540
540
@@ -577,14 +577,14 @@ request timed out or reached the service provider and ``result`` shows if the
577
577
service was successfully executed.
578
578
579
579
We also have the async version for service request without input. You should
Download the [CMakeLists.txt](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/CMakeLists.txt) file
585
+
Download the [CMakeLists.txt](https://github.com/gazebosim/gz-transport/raw/main/example/CMakeLists.txt) file
586
586
within the ``gz_transport_tutorial`` folder. Then, create a `msgs` directory
587
-
and download [CMakeLists.txt](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/msgs/CMakeLists.txt) and [stringmsg.proto](https://github.com/gazebosim/gz-transport/raw/gz-transport14/example/msgs/stringmsg.proto) inside the
587
+
and download [CMakeLists.txt](https://github.com/gazebosim/gz-transport/raw/main/example/msgs/CMakeLists.txt) and [stringmsg.proto](https://github.com/gazebosim/gz-transport/raw/main/example/msgs/stringmsg.proto) inside the
588
588
``msgs`` directory.
589
589
590
590
Once you have all your files, go ahead and create a ``build/`` folder within
Copy file name to clipboardexpand all lines: tutorials/06_python_support.md
+16-16
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ In this tutorial, we are going to show the functionalities implemented in Python
9
9
These features are brought up by creating bindings from the C++ implementation
10
10
using pybind11. It is important to note that not all of C++ features are available
11
11
yet, on this tutorial we will go over the most relevant features. For more information,
12
-
refer to the [__init__.py](https://github.com/gazebosim/gz-transport/blob/gz-transport14/python/src/__init__.py)
12
+
refer to the [__init__.py](https://github.com/gazebosim/gz-transport/blob/main/python/src/__init__.py)
13
13
file which is a wrapper for all the bindings.
14
14
15
15
For this tutorial, we will create two nodes that communicate via messages. One node
@@ -24,7 +24,7 @@ cd ~/gz_transport_tutorial
24
24
25
25
## Publisher
26
26
27
-
Download the [publisher.py](https://github.com/gazebosim/gz-transport/blob/gz-transport14/python/examples/publisher.py) file within the `gz_transport_tutorial`
27
+
Download the [publisher.py](https://github.com/gazebosim/gz-transport/blob/main/python/examples/publisher.py) file within the `gz_transport_tutorial`
28
28
folder and open it with your favorite editor:
29
29
30
30
\snippet python/examples/publisher.py complete
@@ -34,10 +34,10 @@ folder and open it with your favorite editor:
34
34
```{.py}
35
35
from gz.msgs11.stringmsg_pb2 import StringMsg
36
36
from gz.msgs11.vector3d_pb2 import Vector3d
37
-
from gz.transport14 import Node
37
+
from gz.transport15 import Node
38
38
```
39
39
40
-
The library `gz.transport14` contains all the Gazebo Transport elements that can be
40
+
The library `gz.transport15` contains all the Gazebo Transport elements that can be
41
41
used in Python. The final API we will use is contained inside the class `Node`.
42
42
43
43
The lines `from gz.msgs11.stringmsg_pb2 import StringMsg` and `from gz.msgs11.vector3d_pb2 import Vector3d`
@@ -89,7 +89,7 @@ each topic. The method *publish()* sends a message to all the subscribers.
89
89
90
90
## Subscriber
91
91
92
-
Download the [subscriber.py](https://github.com/gazebosim/gz-transport/blob/gz-transport14/python/examples/subscriber.py)
92
+
Download the [subscriber.py](https://github.com/gazebosim/gz-transport/blob/main/python/examples/subscriber.py)
93
93
file into the `gz_transport_tutorial` folder and open it with your favorite editor:
94
94
95
95
\snippet python/examples/subscriber.py complete
@@ -99,10 +99,10 @@ file into the `gz_transport_tutorial` folder and open it with your favorite edit
99
99
```{.py}
100
100
from gz.msgs11.stringmsg_pb2 import StringMsg
101
101
from gz.msgs11.vector3d_pb2 import Vector3d
102
-
from gz.transport14 import Node
102
+
from gz.transport15 import Node
103
103
```
104
104
105
-
Just as before, we are importing the `Node` class from the `gz.transport14` library
105
+
Just as before, we are importing the `Node` class from the `gz.transport15` library
106
106
and the generated code for the `StringMsg` and `Vector3d` protobuf messages.
107
107
108
108
```{.py}
@@ -240,9 +240,9 @@ in several places (publisher and subscribers).
240
240
241
241
We developed a couple of examples that demonstrate this particular issue. Take
242
242
a look at a publisher and subscriber (whithin the same node) that have race
243
-
conditions triggered in the [data_race_without_mutex.py](https://github.com/gazebosim/gz-transport/blob/gz-transport14/python/examples/data_race_without_mutex.py) file. The proposed solution to this
243
+
conditions triggered in the [data_race_without_mutex.py](https://github.com/gazebosim/gz-transport/blob/main/python/examples/data_race_without_mutex.py) file. The proposed solution to this
244
244
issue is to use the `threading` library, you can see the same example with a mutex
245
-
in the [data_race_with_mutex.py](https://github.com/gazebosim/gz-transport/blob/gz-transport14/python/examples/data_race_with_mutex.py) file.
245
+
in the [data_race_with_mutex.py](https://github.com/gazebosim/gz-transport/blob/main/python/examples/data_race_with_mutex.py) file.
246
246
247
247
You can run any of those examples by just doing the following in a terminal:
248
248
```{.sh}
@@ -266,7 +266,7 @@ We can declare the throttling option using the following code :
266
266
267
267
```{.py}
268
268
from gz.msgs11.stringmsg_pb2 import StringMsg
269
-
from gz.transport14 import Node, AdvertiseMessageOptions
269
+
from gz.transport15 import Node, AdvertiseMessageOptions
270
270
271
271
# Create a transport node and advertise a topic with throttling enabled.
272
272
node = Node()
@@ -310,7 +310,7 @@ We can declare the throttling option using the following code :
@@ -350,7 +350,7 @@ topic without having to modify the publisher and create a new log.
350
350
We can declare the topic remapping option using the following code:
351
351
352
352
```{.py}
353
-
from gz.transport14 import Node, NodeOptions
353
+
from gz.transport15 import Node, NodeOptions
354
354
355
355
# Create a transport node and remap a topic.
356
356
nodeOpts = NodeOptions()
@@ -380,7 +380,7 @@ The command `gz log playback` also supports the notion of topic remapping. Run
380
380
381
381
## Service Requester
382
382
383
-
Download the [requester.py](https://github.com/gazebosim/gz-transport/blob/gz-transport14/python/examples/requester.py)
383
+
Download the [requester.py](https://github.com/gazebosim/gz-transport/blob/main/python/examples/requester.py)
384
384
file into the `gz_transport_tutorial` folder and open it with your favorite editor:
385
385
386
386
\snippet python/examples/requester.py complete
@@ -389,10 +389,10 @@ file into the `gz_transport_tutorial` folder and open it with your favorite edit
389
389
390
390
```{.py}
391
391
from gz.msgs11.stringmsg_pb2 import StringMsg
392
-
from gz.transport14 import Node
392
+
from gz.transport15 import Node
393
393
```
394
394
395
-
Just as before, we are importing the `Node` class from the `gz.transport14`
395
+
Just as before, we are importing the `Node` class from the `gz.transport15`
396
396
library and the generated code for the `StringMsg` protobuf message.
397
397
398
398
```{.py}
@@ -421,7 +421,7 @@ result and response of the request in some variables and printing them out.
421
421
422
422
Unfortunately, this feature is not available on Python at the moment. However,
423
423
we can use a service responser created in C++ and make a request to it from a
424
-
code in Python. Taking that into account, we will use the [response.cc](https://github.com/gazebosim/gz-transport/blob/gz-transport14/example/responser.cc) file as the service responser.
424
+
code in Python. Taking that into account, we will use the [response.cc](https://github.com/gazebosim/gz-transport/blob/main/example/responser.cc) file as the service responser.
We're going to build a Docker image and run it inside your host computer.
28
-
Download the [build.bash](https://github.com/gazebosim/gz-transport/raw/gz-transport14/docker/build.bash), [run.bash](https://github.com/gazebosim/gz-transport/raw/gz-transport14/docker/run.bash) and
Download the [build.bash](https://github.com/gazebosim/gz-transport/raw/main/docker/build.bash), [run.bash](https://github.com/gazebosim/gz-transport/raw/main/docker/run.bash) and
0 commit comments