Skip to content

Commit 7abe294

Browse files
Add $
1 parent 0c05a4f commit 7abe294

9 files changed

+336
-263
lines changed

source/Tutorials/Demos/Action-Introspection.rst

+31-12
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,28 @@ If you want to try the C++ version, you can find the source code here: `fibonacc
8383
Action introspection is disabled by default, so users need to enable it with ``action_server_configure_introspection`` parameter when the server starts up.
8484
In this demo, ``FibonacciActionServer`` enables action introspection when the value of the ``action_server_configure_introspection`` parameter is ``contents``.
8585

86-
.. code-block:: bash
86+
.. code-block:: console
8787
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
8989
9090
To change action introspection state, we need to set the ``action_server_configure_introspection`` parameter as follows.
9191

92-
.. code-block:: bash
92+
To change it to user data contents with metadata:
93+
94+
.. code-block:: console
9395
94-
### User data contents with metadata
9596
$ 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+
97102
$ ros2 param set /fibonacci_action_server action_server_configure_introspection metadata
98-
### To disable
103+
104+
To disable:
105+
106+
.. code-block:: console
107+
99108
$ ros2 param set /fibonacci_action_server action_server_configure_introspection disabled
100109
101110
Action client
@@ -138,22 +147,32 @@ If you want to try the Python version, you can find the source code here: `fibon
138147

139148
And then, we start and configure ``FibonacciActionClient`` in the same way.
140149

141-
.. code-block:: bash
150+
.. code-block:: console
142151
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
144153
145154
To change action introspection state, we need to set the ``action_client_configure_introspection`` parameter as follows.
146155
Note that ``FibonacciActionClient`` only runs in short time, so it is recommended to set the parameter before running the client as above.
147156

148-
.. code-block:: bash
157+
To change it to user data contents with metadata:
158+
159+
.. code-block:: console
149160
150-
### User data contents with metadata
151161
$ 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+
153167
$ ros2 param set /fibonacci_action_client action_client_configure_introspection metadata
154-
### To disable
168+
169+
To disable:
170+
171+
.. code-block:: console
172+
155173
$ ros2 param set /fibonacci_action_client action_client_configure_introspection disabled
156174
175+
157176
Introspect
158177
^^^^^^^^^^
159178

source/Tutorials/Demos/Content-Filtering-Subscription.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ The ``ContentFilteringPublisher`` node publishes simulated temperature data star
132132

133133
We can run the demo by running the ``ros2 run demo_nodes_cpp content_filtering_publisher`` executable (don't forget to source the setup file first):
134134

135-
.. code-block:: bash
135+
.. code-block:: console
136136
137137
$ ros2 run demo_nodes_cpp content_filtering_publisher
138138
[INFO] [1651094594.822753479] [content_filtering_publisher]: Publishing: '-100.000000'
@@ -248,7 +248,7 @@ Applications can use the ``is_cft_enabled`` method to check if content filtering
248248

249249
To test content filtering subscription, let's run it:
250250

251-
.. code-block:: bash
251+
.. code-block:: console
252252
253253
$ ros2 run demo_nodes_cpp content_filtering_subscriber
254254
[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
277277
If content filtering is not supported by the RMW implementation, the subscription will still be created without content filtering enabled.
278278
We can try that by executing ``RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 run demo_nodes_cpp content_filtering_publisher``.
279279

280-
.. code-block:: bash
280+
.. code-block:: console
281281
282282
$ RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 run demo_nodes_cpp content_filtering_subscriber
283283
[WARN] [1651096637.893842072] [content_filtering_subscriber]: Content filter is not enabled since it is not supported

source/Tutorials/Demos/Intra-Process-Communication.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ This demonstrates that intra process communication is indeed working and unneces
135135

136136
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):
137137

138-
.. code-block:: bash
138+
.. code-block:: console
139139
140140
$ ros2 run intra_process_demo two_node_pipeline
141141
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
263263

264264
To test those expectations, let's run it:
265265

266-
.. code-block:: bash
266+
.. code-block:: console
267267
268268
$ ros2 run intra_process_demo cyclic_pipeline
269269
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.
302302

303303
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:
304304

305-
.. code-block:: bash
305+
.. code-block:: console
306306
307307
$ sudo sysctl -w net.inet.udp.recvspace=209715
308308
$ 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
329329

330330
Let's run the demo by executing the following executable:
331331

332-
.. code-block:: bash
332+
.. code-block:: console
333333
334-
ros2 run intra_process_demo image_pipeline_all_in_one
334+
$ ros2 run intra_process_demo image_pipeline_all_in_one
335335
336336
You should see something like this:
337337

@@ -352,9 +352,9 @@ All the nodes are still in the same process, but now two image view windows shou
352352
(Note for macOS users: your image view windows might be on top of each other).
353353
Let's run it with the command:
354354

355-
.. code-block:: bash
355+
.. code-block:: console
356356
357-
ros2 run intra_process_demo image_pipeline_with_two_image_view
357+
$ ros2 run intra_process_demo image_pipeline_with_two_image_view
358358
359359
360360
.. image:: images/intra-process-demo-pipeline-two-windows-copy.png

0 commit comments

Comments
 (0)