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
These are based on taker-listener in [GitHub - ros2/demos at humble](https://github.com/ros2/demos/tree/humble). If you know the talker-listener well, you can also understand these sample codes. Only `intra_process_examples` is based on [demos/intra_process_demo/src/two_node_pipeline/two_node_pipeline.cpp at humble · ros2/demos](https://github.com/ros2/demos/blob/humble/intra_process_demo/src/two_node_pipeline/two_node_pipeline.cpp) exceptionally.
15
15
@@ -33,11 +33,13 @@ You need two terminals one of which is for talker and another for listener.
33
33
#### run talker
34
34
35
35
Execute command below to run talker node on a terminal.
36
+
36
37
```
37
38
ros2 run simple_examples [talker node]
38
39
```
39
40
40
41
The talker supports some additional options unlike the talker of [GitHub - ros2/demos at humble](https://github.com/ros2/demos/tree/humble). For example, you can change frequency of output of messages by `update_frequency` option as below.
42
+
41
43
```
42
44
ros2 run simple_examples talker --ros-args -p update_frequency:=2.0
43
45
```
@@ -48,7 +50,7 @@ If you want to use multiple options, you can add subsequent options as `-p optio
48
50
49
51
Below is the list of talker nodes included in simple_examples package.
50
52
51
-
*`talker`
53
+
-`talker`
52
54
- behavior overview
53
55
- output `/chatter` topic per specified frequency
54
56
- option
@@ -58,14 +60,15 @@ Below is the list of talker nodes included in simple_examples package.
58
60
-`use_transient_local` (boolean)
59
61
- enable Transient Local of Publisher
60
62
- default is false
61
-
*`serialized_message_talker`
63
+
-`serialized_message_talker`
62
64
- behavior overview
63
65
- output `/chatter` of SerializedMessage type per one second
64
66
- no option
65
67
66
68
#### run listener
67
69
68
70
Execute command below to run listener node on another terminal.
71
+
69
72
```
70
73
ros2 run simple_examples [listener node]
71
74
```
@@ -76,7 +79,7 @@ The listener of [ros2_subscription_examples/simple_examples at main · takam5f2/
76
79
77
80
Below is the list of listener nodes included in simple_examples package.
78
81
79
-
*`timer_listener`
82
+
-`timer_listener`
80
83
- behavior overview
81
84
- driven by timer periodically to execute a callback function in which a message is obtained from Subscription
82
85
- output the obtained message of `/chatter`
@@ -90,7 +93,7 @@ Below is the list of listener nodes included in simple_examples package.
90
93
-`printout_message_info` (boolean)
91
94
- enable to print MessageInfo
92
95
- default is false
93
-
*`timer_batch_listener`
96
+
-`timer_batch_listener`
94
97
- behavior overview
95
98
- driven by timer periodically to execute a callback function in which multiple messages are obtained from Subscription Queue until the queue becomes empty
96
99
- output all obtained messages
@@ -103,7 +106,7 @@ Below is the list of listener nodes included in simple_examples package.
103
106
- default is false
104
107
-`queue_size` (integer)
105
108
- specify Subscription Queue size which stores `/chatter` message
106
-
*`timer_listener_using_callback`
109
+
-`timer_listener_using_callback`
107
110
- behavior overview
108
111
- driven by timer periodically to execute a callback function in which a message is obtained from Subscription using `take_type_erased()`
109
112
- then execute a callback function which is registered to Subscription using `handle_message()`
@@ -114,7 +117,7 @@ Below is the list of listener nodes included in simple_examples package.
114
117
-`use_transient_local` (boolean)
115
118
- enable Transient Local of Subscription
116
119
- default is false
117
-
*`timer_listener_using_normal_function`
120
+
-`timer_listener_using_normal_function`
118
121
- behavior overview
119
122
- driven by timer periodically to execute a callback function in which a message is obtained from Subscription
120
123
- then execute a simple function
@@ -126,7 +129,7 @@ Below is the list of listener nodes included in simple_examples package.
126
129
-`use_transient_local` (boolean)
127
130
- enable Transient Local of Subscription
128
131
- default is false
129
-
*`timer_serialized_message_listener`
132
+
-`timer_serialized_message_listener`
130
133
- behavior overview
131
134
- driven by timer periodically to execute a callback function in which a message is obtained from Subscription
132
135
- the message is of SerializedMessage type
@@ -148,6 +151,7 @@ There is a sample code in `intra_process_talker_listener` in which a topic messa
148
151
#### run by launcher
149
152
150
153
Execute command below to run `talker_listener_intra_process.launch.py`.
@@ -164,7 +168,7 @@ If `use_intra_process_comms` is set to `false`, communication between nodes is p
164
168
165
169
Below is the list of launch files included in intra_process_talker_listener package.
166
170
167
-
* talker_listener_intra_process.launch.py
171
+
- talker_listener_intra_process.launch.py
168
172
- behavior overview
169
173
- run `talker_intra_process` and `timer_listener_intra_process`
170
174
-`talker_intra_process` publishes `/chatter` message and `timer_listener_intra_process` obtains it
@@ -183,7 +187,7 @@ Below is the list of launch files included in intra_process_talker_listener pack
183
187
-`use_transient_local` (boolean)
184
188
- enable Transient Local of Publisher and Subscription
185
189
- default is false
186
-
* talker_batch_listener_intra_process.launch.py
190
+
- talker_batch_listener_intra_process.launch.py
187
191
- behavior overview
188
192
- run `talker_intra_process` and `timer_batch_listener_intra_process`
189
193
-`talker_intra_process` publishes `/chatter` message and `timer_batch_listener_intra_process` obtains it
@@ -202,6 +206,7 @@ But intra-process communication also can be used between nodes on MultiThreadedE
202
206
#### run
203
207
204
208
Execute command below to run `two_node_pipeline_timer`.
209
+
205
210
```
206
211
ros2 run intra_process_examples two_node_pipeline_timer
207
212
```
@@ -215,6 +220,7 @@ You need two terminals one of which is for talker and another for listener.
215
220
#### run talker
216
221
217
222
Execute command below to run talker node on a terminal.
223
+
218
224
```
219
225
ros2 run waitset_examples talker_triple
220
226
```
@@ -223,7 +229,7 @@ ros2 run waitset_examples talker_triple
223
229
224
230
There is only one node as talker in waitset_examples.
225
231
226
-
*`talker_triple`
232
+
-`talker_triple`
227
233
- behavior overview
228
234
- publish `/chatter`, `/slower_chatter`, and `/slowest_chatter` topics per each specified frequency
229
235
-`/slower_chatter` and `/slowest_chatter` are not published if there is no Subscription which subscribes them
@@ -241,6 +247,7 @@ There is only one node as talker in waitset_examples.
241
247
#### run listener
242
248
243
249
Execute command below to run listener node on another terminal.
250
+
244
251
```
245
252
ros2 run simple_examples [listener node]
246
253
```
@@ -249,7 +256,7 @@ ros2 run simple_examples [listener node]
249
256
250
257
Below is the list of listener nodes included in waitset_examples.
251
258
252
-
*`timer_listener_single`
259
+
-`timer_listener_single`
253
260
- behavior overview
254
261
- driven by timer periodically to execute a callback function in which a `/chatter` message is obtained from Subscription Queue after verifying that there is a message in the queue by waitset
255
262
- print the obtained message by `RCLCPP_INFO`
@@ -260,7 +267,7 @@ Below is the list of listener nodes included in waitset_examples.
260
267
-`use_transient_local` (boolean)
261
268
- enable Transient Local of Subscription
262
269
- default is false
263
-
*`timer_listener_using_callback`
270
+
-`timer_listener_using_callback`
264
271
- behavior overview
265
272
- driven by timer periodically to execute a callback function in which a `/chatter` message is obtained from Subscription Queue after verifying that there is a message in the queue by waitset
266
273
-`take_type_erased()` and `handle_message()` are used at that time, which is ther manner performed inside Executor
@@ -271,7 +278,7 @@ Below is the list of listener nodes included in waitset_examples.
271
278
-`use_transient_local` (boolean)
272
279
- enable Transient Local of Subscription
273
280
- default is false
274
-
*`timer_listener_single_wait_some_period`
281
+
-`timer_listener_single_wait_some_period`
275
282
- behavior overview
276
283
- driven by timer periodically to execute a callback function in which a `/chatter` message is obtained from Subscription Queue after verifying that there is a message in the queue by waitset
277
284
- timeout is set when query waitset at that time
@@ -287,7 +294,7 @@ Below is the list of listener nodes included in waitset_examples.
287
294
-`waiting_time` (float)
288
295
- specify timeout value
289
296
- default is 4.0
290
-
*`timer_batch_listener_single`
297
+
-`timer_batch_listener_single`
291
298
- behavior overview
292
299
- driven by timer periodically to execute a callback function in which a `/chatter` message is obtained from Subscription Queue until the queue becomes empty after verifying that there are messages in the queue by waitset
293
300
- option
@@ -300,7 +307,7 @@ Below is the list of listener nodes included in waitset_examples.
300
307
-`queue_size` (integer)
301
308
- specify Subscription Queue size
302
309
- default is 10
303
-
*`timer_listener_triple_sync`
310
+
-`timer_listener_triple_sync`
304
311
- behavior overview
305
312
- driven by timer periodically to execute a callback function in which `/chatter`, `/slower_chatter`, and `/slowest_chatter` messages are obtained from each Subscription Queue
306
313
- the messages are obtained only when one or more messages in each Subscription Queue of `/chatter`, `/slower_chatter`, and `/slowest_chatter` get together
@@ -312,7 +319,7 @@ Below is the list of listener nodes included in waitset_examples.
312
319
-`use_transient_local` (boolean)
313
320
- enable Transient Local of Subscription
314
321
- default is false
315
-
*`timer_listener_triple_async`
322
+
-`timer_listener_triple_async`
316
323
- behavior overview
317
324
- driven by timer periodically to execute a callback function in which `/chatter`, `/slower_chatter`, and `/slowest_chatter` messages are obtained from each Subscription Queue
318
325
- the messages are obtained if one or more messages are in each Subscription Queue of `/chatter`, `/slower_chatter`, and `/slowest_chatter`
@@ -325,7 +332,7 @@ Below is the list of listener nodes included in waitset_examples.
325
332
-`use_transient_local` (boolean)
326
333
- enable Transient Local of Subscription
327
334
- default is false
328
-
*`timer_listener_triple_separated_waitset`
335
+
-`timer_listener_triple_separated_waitset`
329
336
- behavior overview
330
337
- driven by three timers periodically to execute a callback function in which `/chatter`, `/slower_chatter`, and `/slowest_chatter` messages are obtained from each Subscription Queue
331
338
- the messages are obtained if one or more messages are in each Subscription Queue of `/chatter`, `/slower_chatter`, and `/slowest_chatter`
@@ -337,7 +344,7 @@ Below is the list of listener nodes included in waitset_examples.
337
344
-`use_transient_local` (boolean)
338
345
- enable Transient Local of Subscription
339
346
- default is false
340
-
*`timer_listener_triple_sync_intra`
347
+
-`timer_listener_triple_sync_intra`
341
348
- behavior overview
342
349
- similar to `timer_listener_triple_sync`
343
350
- support intra-process communication unlike `timer_listener_triple_sync` in which only inter-process communication can be used
@@ -351,7 +358,7 @@ Below is the list of listener nodes included in waitset_examples.
351
358
-`use_transient_local` (boolean)
352
359
- enable Transient Local of Subscription
353
360
- default is false
354
-
*`timer_listener_twin_static`
361
+
-`timer_listener_twin_static`
355
362
- behavior overview
356
363
- driven by timer periodically to execute a callback function in which `/chatter` and `/slower_chatter` messages are obtained from each Subscription Queue
357
364
-`rclcpp::StaticWaitSet` is used instead of `rclcpp::WaitSet`
@@ -364,7 +371,7 @@ Below is the list of listener nodes included in waitset_examples.
364
371
-`use_transient_local` (boolean)
365
372
- enable Transient Local of Subscription
366
373
- default is false
367
-
*`timer_listener_twin_nested_waitset`
374
+
-`timer_listener_twin_nested_waitset`
368
375
- behavior overview
369
376
- run two timers one of which is `timer_` and another is `much_slower_timer_`
370
377
-`timer_` is invoked per specified frequency and execute its callback function
0 commit comments