-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new section for CLI tool and updated environment variable [8974] (
#184) * Refs #8974: Updated ROS2_AUTO_CLIENT_SERVER to ROS_DISCOVERY_SERVER Signed-off-by: imontesino <monte.igna@gmail.com> * Refs #8974: added section for CLI tools discovery and shm Signed-off-by: imontesino <monte.igna@gmail.com> * Refs #8974: Added localhost, wifi and shm to spelling Signed-off-by: imontesino <monte.igna@gmail.com> * Refs #8974: Applied suggested changes Signed-off-by: imontesino <monte.igna@gmail.com> * Refs #8974: Fixed trailing whitespace Signed-off-by: imontesino <monte.igna@gmail.com> * Refs #8974: Fixed inline literal issue Signed-off-by: imontesino <monte.igna@gmail.com> * Refs #8974: Applied suggested changes Signed-off-by: imontesino <monte.igna@gmail.com> * Refs #8974: Applied suggested changes Signed-off-by: imontesino <monte.igna@gmail.com> * Refs #8974: Applied suggested changes Signed-off-by: imontesino <monte.igna@gmail.com>
- Loading branch information
1 parent
c4069a5
commit 8cfb268
Showing
4 changed files
with
195 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
.. include:: ../../03-exports/roles.include | ||
|
||
.. _ffastddscli_cli: | ||
|
||
CLI | ||
=== | ||
|
||
The *Fast DDS* command line interface provides a set commands and sub-commands to perform, *Fast DDS* | ||
related, maintenance and configuration tasks. | ||
|
||
An executable file for Linux and Windows that runs the *Fast DDS CLI* application is | ||
available in the `tools` folder. | ||
If the `tools/fastdds` folder path is added to the ``PATH``, or by sourcing the `<path/to/fastdds>/install/setup.bash` | ||
configuration file, *Fast DDS CLI* can be executed running the following commands: | ||
|
||
- Linux: | ||
|
||
.. code-block:: bash | ||
$ fastdds <command> [<command-args>] | ||
- Windows: | ||
|
||
.. code-block:: bash | ||
> fastdds.bat <command> [<command-args>] | ||
There are two verbs whose functionality is described in the following table: | ||
|
||
+--------------------------+-------------------------------------------------------------------------------------------+ | ||
| Verbs | Description | | ||
+==========================+===========================================================================================+ | ||
| ``discovery`` | Launches a server for :ref:`Server-Client Discovery<discovery_server>`. | | ||
+--------------------------+-------------------------------------------------------------------------------------------+ | ||
| ``shm`` | Allows manual cleaning of garbage files that may be generated by | | ||
| | :ref:`transport_sharedMemory_sharedMemory` | | ||
+--------------------------+-------------------------------------------------------------------------------------------+ | ||
|
||
.. _cli_discovery: | ||
|
||
discovery | ||
--------- | ||
|
||
Launches a server for :ref:`Server-Client Discovery<discovery_server>`. This server will manage the messages of the | ||
clients which are pointed to its IP address. | ||
Clients must be aware of how to reach the server by specifying an IP address and a transport protocol like UDP | ||
or TCP. | ||
Servers do not need any knowledge of their clients beforehand, but require the listening IP address, where they | ||
may be reached. | ||
For more information on how to configure the discovery mechanism in *Fast DDS*, please refer to :ref:`discovery`. | ||
|
||
.. code-block:: bash | ||
fastdds discovery -i {0-255} [optional parameters] | ||
Where the parameters are: | ||
|
||
+--------------------------+-------------------------------------------------------------------------------------------+ | ||
| Option | Description | | ||
+==========================+===========================================================================================+ | ||
| ``-i --server-id`` | **Mandatory** unique server identifier. Specifies zero based server position in |br| | | ||
| | ``ROS_DISCOVERY_SERVER`` environment variable. | | ||
+--------------------------+-------------------------------------------------------------------------------------------+ | ||
| ``-h -help`` | Produce help message. | | ||
+--------------------------+-------------------------------------------------------------------------------------------+ | ||
| ``-l --ip-address`` | IP address chosen to listen the clients. Defaults to any (0.0.0.0). | | ||
+--------------------------+-------------------------------------------------------------------------------------------+ | ||
| ``-p --port`` | UDP port chosen to listen the clients. Defaults to '11811'. | | ||
+--------------------------+-------------------------------------------------------------------------------------------+ | ||
| ``-b --backup`` | Creates a server with a backup file associated. | | ||
+--------------------------+-------------------------------------------------------------------------------------------+ | ||
|
||
Examples | ||
^^^^^^^^ | ||
|
||
1. Launch a default server with id 0 (first on ``ROS_DISCOVERY_SERVER``) | ||
listening on all available interfaces on UDP port '11811'. Only one | ||
server can use default values per machine. | ||
|
||
.. code-block:: bash | ||
fastdds discovery -i 0 | ||
2. Launch a default server with id 1 (second on ``ROS_DISCOVERY_SERVER``) | ||
listening on localhost with UDP port 14520. Only localhost clients | ||
can reach the server defining as `ROS_DISCOVERY_SERVER=;127.0.0.1:14520` . | ||
|
||
.. code-block:: bash | ||
fastdds discovery -i 1 -l 127.0.0.1 -p 14520 | ||
3. Launch a default server with id 3 (third on ``ROS_DISCOVERY_SERVER``) | ||
listening on WiFi (192.168.36.34) and Ethernet (172.20.96.1) local | ||
interfaces with UDP ports 8783 and 51083 respectively | ||
(addresses and ports are made up for the example). | ||
|
||
.. code-block:: bash | ||
fastdds discovery -i 1 -l 192.168.36.34 -p 14520 -l 172.20.96.1 -p 51083 | ||
4. Launch a default server with id 4 (fourth on ``ROS_DISCOVERY_SERVER``) | ||
listening on 172.30.144.1 with UDP port 12345 and provided with a | ||
backup file. If the server crashes it will automatically restore its | ||
previous state when re-enacted. | ||
|
||
|
||
.. code-block:: bash | ||
fastdds discovery -i 1 -l 172.30.144.1 -p 12345 -b | ||
.. _cli_shm: | ||
|
||
shm | ||
--- | ||
|
||
Provides maintenance tasks related with :ref:`transport_sharedMemory_sharedMemory`. Shared Memory transport creates | ||
:ref:`Segments<transport_sharedMemory_concepts_segment>`, blocks of memory accessible from different processes. | ||
Zombie files are memory blocks that were reserved by shared memory and are no longer in use which take up valuable | ||
memory resources. | ||
This tool finds and frees those memory allocations. | ||
|
||
.. code-block:: bash | ||
fastdds shm [<shm-command>] | ||
+--------------------------+-------------------------------------------------------------------------------------------+ | ||
| Sub-command | Description | | ||
+==========================+===========================================================================================+ | ||
| ``clean`` | Cleans SHM zombie files. | | ||
+--------------------------+-------------------------------------------------------------------------------------------+ | ||
|
||
+--------------------------+-------------------------------------------------------------------------------------------+ | ||
| Option | Description | | ||
+==========================+===========================================================================================+ | ||
| ``-h -help`` | Produce help message. | | ||
+--------------------------+-------------------------------------------------------------------------------------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters