Skip to content

Commit

Permalink
Update Use Case: How to use eProsima DDS Record and Replay (#927)
Browse files Browse the repository at this point in the history
* Update Use Cases eProsima DDS Record and Replay

Signed-off-by: Denisa <[email protected]>

* Fix documentation to pass doc8-test

Signed-off-by: Denisa <[email protected]>

* Add review comments to python_requirements.rst

Signed-off-by: Denisa <[email protected]>

---------

Signed-off-by: Denisa <[email protected]>
  • Loading branch information
depink5 authored Oct 8, 2024
1 parent 3ee0df8 commit 343836e
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 263 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion docs/04-common/python_requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ SWIG

SWIG_ is a development tool that allows connecting programs written in C/C++ with a variety of
other programming languages, among them Python.
SWIG 4.0 is required in order to build Fast DDS Python bindings.
SWIG version lower than 4.2 is required to build Fast DDS Python bindings.

.. note::

Expand All @@ -21,6 +21,14 @@ For Ubuntu, please run:
sudo apt install swig
.. warning::

For Ubuntu 24.04, SWIG_ must be installed using the following command:

.. code-block:: bash
sudo apt install swig4.1
.. end-swig
.. begin-libpython-dev
Expand Down
102 changes: 102 additions & 0 deletions docs/fastdds/use_cases/dds_record_and_replay/dds_record_and_replay.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
.. include:: ../../../03-exports/aliases.include
.. include:: ../../../03-exports/aliases-api.include
.. include:: ../../../03-exports/roles.include

.. _dds_record_and_replay:

How to use eProsima DDS Record and Replay
=========================================

`eProsima DDS Record and Replay <https://github.com/eProsima/DDS-Record-Replay>`_ is an end-user software application
that efficiently saves DDS data published into a DDS environment in a MCAP format database.
Thus, the exact playback of the recorded network events is possible as the data is linked to the
timestamp at which the original data was published. This facilitates the debugging of DDS networks.

Getting started
---------------

eProsima DDS Record & Replay includes the following tools:

- **DDS Recorder tool**: This tool's primary function is to store data in an MCAP database,
including the publication timestamp, serialized data, and its format.
The output MCAP file can be read by any compatible tool,
as it contains all necessary information for data reproduction.

- **DDS Remote Controller tool**: This application enables remote control of the recording tool,
allowing a user to start, stop, or pause data recording from another device.

- **DDS Replay tool**: This application allows replay of DDS traffic recorded with a DDS Recorder.
Users can select messages to replay by setting a time range or by blocking/whitelisting specific topics.
They can also adjust the playback rate and use different topic QoS settings from the original recording.

Prerequisites
^^^^^^^^^^^^^

`eProsima DDS Record and Replay <https://github.com/eProsima/DDS-Record-Replay>`_ depends on
eProsima Fast DDS library and certain Debian packages.
For further information, please refer to the
`installation guide <https://dds-recorder.readthedocs.io/en/latest/rst/installation/docker.html#docker>`_.

Furthermore, the example provided in this section requires
`ShapesDemo <https://eprosima-shapes-demo.readthedocs.io/en/latest/index.html>`_
to publish and subscribe shapes of different colors and sizes.

Example of usage: Recording Application
---------------------------------------

This example will serve as a hands-on tutorial, aimed at introducing some of the key concepts and
features that eProsima DDS Record & Replay recording application offers.

Start ShapesDemo
^^^^^^^^^^^^^^^^

Let us launch a ShapesDemo instance and start publishing in topics ``Square`` with default settings.

.. figure:: /01-figures/fast_dds/recorder_shapesdemo_publisher.png
:align: center
:scale: 75 %

Recorder configuration
^^^^^^^^^^^^^^^^^^^^^^

``ddsrecorder`` runs with default configuration settings.
This default configuration records all messages of all DDS Topics found in
DDS Domain ``0`` in the ``output_YYYY-MM-DD-DD_hh-mm-ss.mcap`` file.

Additionally, it is possible to change the default configuration parameters by means of a YAML configuration file.

.. note::
Please refer to `Configuration <https://dds-recorder.readthedocs.io/en/latest/rst/recording/usage/configuration.html#recorder-usage-configuration>`_
for more information on how to configure a ``ddsrecorder``.

Recorder execution
^^^^^^^^^^^^^^^^^^

To start recording, execute the following command:

.. code-block:: bash
ddsrecorder
In order to know all the possible arguments supported by this tool, use the command:

.. code-block:: bash
ddsrecorder --help
Let us launch a ShapesDemo instance and start publishing in topics ``Square`` with default settings.

.. figure:: /01-figures/fast_dds/recorder_shapesdemo_exec.png

Stop the recorder with ``Ctrl+C`` and check that the MCAP file exists.

Next Steps
==========

The usage of the DDS Remote Controller and DDS Replay tools follows
the same steps as the DDS Recorder tool.

For further information, please refer to the
`eProsima DDS Record and Replay documentation
<https://dds-recorder.readthedocs.io/en/latest/index.html>`_.
260 changes: 0 additions & 260 deletions docs/fastdds/use_cases/rosbag_capture/rosbag_capture.rst

This file was deleted.

Loading

0 comments on commit 343836e

Please sign in to comment.