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: source/Tutorials/Demos/Action-Introspection.rst
+31-12
Original file line number
Diff line number
Diff line change
@@ -83,19 +83,28 @@ If you want to try the C++ version, you can find the source code here: `fibonacc
83
83
Action introspection is disabled by default, so users need to enable it with ``action_server_configure_introspection`` parameter when the server starts up.
84
84
In this demo, ``FibonacciActionServer`` enables action introspection when the value of the ``action_server_configure_introspection`` parameter is ``contents``.
85
85
86
-
.. code-block:: bash
86
+
.. code-block:: console
87
87
88
-
ros2 run action_tutorials_py fibonacci_action_server --ros-args -p action_server_configure_introspection:=contents
88
+
$ ros2 run action_tutorials_py fibonacci_action_server --ros-args -p action_server_configure_introspection:=contents
89
89
90
90
To change action introspection state, we need to set the ``action_server_configure_introspection`` parameter as follows.
91
91
92
-
.. code-block:: bash
92
+
To change it to user data contents with metadata:
93
+
94
+
.. code-block:: console
93
95
94
-
### User data contents with metadata
95
96
$ ros2 param set /fibonacci_action_server action_server_configure_introspection contents
96
-
### Or only metadata
97
+
98
+
To change it to only metadata:
99
+
100
+
.. code-block:: console
101
+
97
102
$ ros2 param set /fibonacci_action_server action_server_configure_introspection metadata
98
-
### To disable
103
+
104
+
To disable:
105
+
106
+
.. code-block:: console
107
+
99
108
$ ros2 param set /fibonacci_action_server action_server_configure_introspection disabled
100
109
101
110
Action client
@@ -138,22 +147,32 @@ If you want to try the Python version, you can find the source code here: `fibon
138
147
139
148
And then, we start and configure ``FibonacciActionClient`` in the same way.
140
149
141
-
.. code-block:: bash
150
+
.. code-block:: console
142
151
143
-
ros2 run action_tutorials_cpp fibonacci_action_client --ros-args -p action_client_configure_introspection:=contents
152
+
$ ros2 run action_tutorials_cpp fibonacci_action_client --ros-args -p action_client_configure_introspection:=contents
144
153
145
154
To change action introspection state, we need to set the ``action_client_configure_introspection`` parameter as follows.
146
155
Note that ``FibonacciActionClient`` only runs in short time, so it is recommended to set the parameter before running the client as above.
147
156
148
-
.. code-block:: bash
157
+
To change it to user data contents with metadata:
158
+
159
+
.. code-block:: console
149
160
150
-
### User data contents with metadata
151
161
$ ros2 param set /fibonacci_action_client action_client_configure_introspection contents
152
-
### Or only metadata
162
+
163
+
To change it to only metadata:
164
+
165
+
.. code-block:: console
166
+
153
167
$ ros2 param set /fibonacci_action_client action_client_configure_introspection metadata
154
-
### To disable
168
+
169
+
To disable:
170
+
171
+
.. code-block:: console
172
+
155
173
$ ros2 param set /fibonacci_action_client action_client_configure_introspection disabled
@@ -248,7 +248,7 @@ Applications can use the ``is_cft_enabled`` method to check if content filtering
248
248
249
249
To test content filtering subscription, let's run it:
250
250
251
-
.. code-block:: bash
251
+
.. code-block:: console
252
252
253
253
$ ros2 run demo_nodes_cpp content_filtering_subscriber
254
254
[INFO] [1651094590.682660703] [content_filtering_subscriber]: subscribed to topic "/temperature" with content filter options "data < %0 OR data > %1, {-30.000000, 100.000000}"
@@ -277,7 +277,7 @@ You should see a message showing the content filtering options used and logs for
277
277
If content filtering is not supported by the RMW implementation, the subscription will still be created without content filtering enabled.
278
278
We can try that by executing ``RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 run demo_nodes_cpp content_filtering_publisher``.
279
279
280
-
.. code-block:: bash
280
+
.. code-block:: console
281
281
282
282
$ RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 run demo_nodes_cpp content_filtering_subscriber
283
283
[WARN] [1651096637.893842072] [content_filtering_subscriber]: Content filter is not enabled since it is not supported
Copy file name to clipboardExpand all lines: source/Tutorials/Demos/Intra-Process-Communication.rst
+7-7
Original file line number
Diff line number
Diff line change
@@ -135,7 +135,7 @@ This demonstrates that intra process communication is indeed working and unneces
135
135
136
136
Let's run the demo by executing ``ros2 run intra_process_demo two_node_pipeline`` executable (don't forget to source the setup file first):
137
137
138
-
.. code-block:: bash
138
+
.. code-block:: console
139
139
140
140
$ ros2 run intra_process_demo two_node_pipeline
141
141
Published message with value: 0, and address: 0x7fb02303faf0
@@ -263,7 +263,7 @@ Because the message is being published and subscribed to as a ``unique_ptr`` the
263
263
264
264
To test those expectations, let's run it:
265
265
266
-
.. code-block:: bash
266
+
.. code-block:: console
267
267
268
268
$ ros2 run intra_process_demo cyclic_pipeline
269
269
Published first message with value: 42, and address: 0x7fd2ce0a2bc0
@@ -302,7 +302,7 @@ In this demo we'll use OpenCV to capture, annotate, and then view images.
302
302
303
303
If you are on macOS and these examples do not work or you receive an error like ``ddsi_conn_write failed -1``, then you'll need to increase your system wide UDP packet size:
304
304
305
-
.. code-block:: bash
305
+
.. code-block:: console
306
306
307
307
$ sudo sysctl -w net.inet.udp.recvspace=209715
308
308
$ sudo sysctl -w net.inet.udp.maxdgram=65500
@@ -329,9 +329,9 @@ The watermark and image view nodes are designed to modify the image without copy
329
329
330
330
Let's run the demo by executing the following executable:
331
331
332
-
.. code-block:: bash
332
+
.. code-block:: console
333
333
334
-
ros2 run intra_process_demo image_pipeline_all_in_one
334
+
$ ros2 run intra_process_demo image_pipeline_all_in_one
335
335
336
336
You should see something like this:
337
337
@@ -352,9 +352,9 @@ All the nodes are still in the same process, but now two image view windows shou
352
352
(Note for macOS users: your image view windows might be on top of each other).
353
353
Let's run it with the command:
354
354
355
-
.. code-block:: bash
355
+
.. code-block:: console
356
356
357
-
ros2 run intra_process_demo image_pipeline_with_two_image_view
357
+
$ ros2 run intra_process_demo image_pipeline_with_two_image_view
0 commit comments