Skip to content

Add $ to Demos #5352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 30 additions & 12 deletions source/Tutorials/Demos/Action-Introspection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,19 +83,28 @@ If you want to try the C++ version, you can find the source code here: `fibonacc
Action introspection is disabled by default, so users need to enable it with ``action_server_configure_introspection`` parameter when the server starts up.
In this demo, ``FibonacciActionServer`` enables action introspection when the value of the ``action_server_configure_introspection`` parameter is ``contents``.

.. code-block:: bash
.. code-block:: console

ros2 run action_tutorials_py fibonacci_action_server --ros-args -p action_server_configure_introspection:=contents
$ ros2 run action_tutorials_py fibonacci_action_server --ros-args -p action_server_configure_introspection:=contents

To change action introspection state, we need to set the ``action_server_configure_introspection`` parameter as follows.

.. code-block:: bash
To change it to user data contents with metadata:

.. code-block:: console

### User data contents with metadata
$ ros2 param set /fibonacci_action_server action_server_configure_introspection contents
### Or only metadata

To change it to only metadata:

.. code-block:: console

$ ros2 param set /fibonacci_action_server action_server_configure_introspection metadata
### To disable

To disable:

.. code-block:: console

$ ros2 param set /fibonacci_action_server action_server_configure_introspection disabled

Action client
Expand Down Expand Up @@ -138,20 +147,29 @@ If you want to try the Python version, you can find the source code here: `fibon

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

.. code-block:: bash
.. code-block:: console

ros2 run action_tutorials_cpp fibonacci_action_client --ros-args -p action_client_configure_introspection:=contents
$ ros2 run action_tutorials_cpp fibonacci_action_client --ros-args -p action_client_configure_introspection:=contents

To change action introspection state, we need to set the ``action_client_configure_introspection`` parameter as follows.
Note that ``FibonacciActionClient`` only runs in short time, so it is recommended to set the parameter before running the client as above.

.. code-block:: bash
To change it to user data contents with metadata:

.. code-block:: console

### User data contents with metadata
$ ros2 param set /fibonacci_action_client action_client_configure_introspection contents
### Or only metadata

To change it to only metadata:

.. code-block:: console

$ ros2 param set /fibonacci_action_client action_client_configure_introspection metadata
### To disable

To disable:

.. code-block:: console

$ ros2 param set /fibonacci_action_client action_client_configure_introspection disabled

Introspect
Expand Down
6 changes: 3 additions & 3 deletions source/Tutorials/Demos/Content-Filtering-Subscription.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ The ``ContentFilteringPublisher`` node publishes simulated temperature data star

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

.. code-block:: bash
.. code-block:: console

$ ros2 run demo_nodes_cpp content_filtering_publisher
[INFO] [1651094594.822753479] [content_filtering_publisher]: Publishing: '-100.000000'
Expand Down Expand Up @@ -248,7 +248,7 @@ Applications can use the ``is_cft_enabled`` method to check if content filtering

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

.. code-block:: bash
.. code-block:: console

$ ros2 run demo_nodes_cpp content_filtering_subscriber
[INFO] [1651094590.682660703] [content_filtering_subscriber]: subscribed to topic "/temperature" with content filter options "data < %0 OR data > %1, {-30.000000, 100.000000}"
Expand Down Expand Up @@ -277,7 +277,7 @@ You should see a message showing the content filtering options used and logs for
If content filtering is not supported by the RMW implementation, the subscription will still be created without content filtering enabled.
We can try that by executing ``RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 run demo_nodes_cpp content_filtering_publisher``.

.. code-block:: bash
.. code-block:: console

$ RMW_IMPLEMENTATION=rmw_cyclonedds_cpp ros2 run demo_nodes_cpp content_filtering_subscriber
[WARN] [1651096637.893842072] [content_filtering_subscriber]: Content filter is not enabled since it is not supported
Expand Down
14 changes: 7 additions & 7 deletions source/Tutorials/Demos/Intra-Process-Communication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ This demonstrates that intra process communication is indeed working and unneces

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

.. code-block:: bash
.. code-block:: console

$ ros2 run intra_process_demo two_node_pipeline
Published message with value: 0, and address: 0x7fb02303faf0
Expand Down Expand Up @@ -263,7 +263,7 @@ Because the message is being published and subscribed to as a ``unique_ptr`` the

To test those expectations, let's run it:

.. code-block:: bash
.. code-block:: console

$ ros2 run intra_process_demo cyclic_pipeline
Published first message with value: 42, and address: 0x7fd2ce0a2bc0
Expand Down Expand Up @@ -302,7 +302,7 @@ In this demo we'll use OpenCV to capture, annotate, and then view images.

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:

.. code-block:: bash
.. code-block:: console

$ sudo sysctl -w net.inet.udp.recvspace=209715
$ sudo sysctl -w net.inet.udp.maxdgram=65500
Expand All @@ -329,9 +329,9 @@ The watermark and image view nodes are designed to modify the image without copy

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

.. code-block:: bash
.. code-block:: console

ros2 run intra_process_demo image_pipeline_all_in_one
$ ros2 run intra_process_demo image_pipeline_all_in_one

You should see something like this:

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

.. code-block:: bash
.. code-block:: console

ros2 run intra_process_demo image_pipeline_with_two_image_view
$ ros2 run intra_process_demo image_pipeline_with_two_image_view


.. image:: images/intra-process-demo-pipeline-two-windows-copy.png
Expand Down
Loading