Skip to content

Commit 2a5cc5c

Browse files
mergify[bot]Nils-ChristianIsekechristophebedard
authored
Add $ DDS-Implementations (backport #5355) (#5374)
Signed-off-by: Nils-Christian Iseke <[email protected]> (cherry picked from commit 93a7d34) Signed-off-by: Christophe Bedard <[email protected]> Co-authored-by: Nils-Christian Iseke <[email protected]> Co-authored-by: Christophe Bedard <[email protected]>
1 parent d7f1ead commit 2a5cc5c

File tree

4 files changed

+70
-71
lines changed

4 files changed

+70
-71
lines changed

source/Installation/RMW-Implementations/DDS-Implementations/Working-with-Eclipse-CycloneDDS.rst

+17-17
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ Install packages
2020

2121
The easiest way is to install from ROS 2 apt repository.
2222

23-
.. code-block:: bash
23+
.. code-block:: console
2424
25-
sudo apt install ros-{DISTRO}-rmw-cyclonedds-cpp
25+
$ sudo apt install ros-{DISTRO}-rmw-cyclonedds-cpp
2626
2727
Build from source code
2828
----------------------
@@ -31,33 +31,33 @@ Building from source code is also another way to install.
3131

3232
First, clone Cyclone DDS and rmw_cyclonedds in the ROS 2 workspace source directory.
3333

34-
.. code-block:: bash
34+
.. code-block:: console
3535
36-
cd ros2_ws/src
37-
git clone https://github.com/ros2/rmw_cyclonedds ros2/rmw_cyclonedds -b {REPOS_FILE_BRANCH}
38-
git clone https://github.com/eclipse-cyclonedds/cyclonedds eclipse-cyclonedds/cyclonedds
36+
$ cd ros2_ws/src
37+
$ git clone https://github.com/ros2/rmw_cyclonedds ros2/rmw_cyclonedds -b {REPOS_FILE_BRANCH}
38+
$ git clone https://github.com/eclipse-cyclonedds/cyclonedds eclipse-cyclonedds/cyclonedds
3939
4040
Then, install necessary packages for Cyclone DDS.
4141

42-
.. code-block:: bash
42+
.. code-block:: console
4343
44-
cd ..
45-
rosdep install --from src -i
44+
$ cd ..
45+
$ rosdep install --from src -i
4646
4747
Finally, run colcon build.
4848

49-
.. code-block:: bash
49+
.. code-block:: console
5050
51-
colcon build --symlink-install
51+
$ colcon build --symlink-install
5252
5353
Switch to rmw_cyclonedds
5454
------------------------
5555

5656
Switch from other rmw to rmw_cyclonedds by specifying the environment variable.
5757

58-
.. code-block:: bash
58+
.. code-block:: console
5959
60-
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
60+
$ export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
6161
6262
See also: :doc:`Working with multiple RMW implementations <../../../How-To-Guides/Working-with-multiple-RMW-implementations>`
6363

@@ -66,10 +66,10 @@ Run the talker and listener
6666

6767
Now run ``talker`` and ``listener`` to test Cyclone DDS.
6868

69-
.. code-block:: bash
69+
.. code-block:: console
7070
71-
ros2 run demo_nodes_cpp talker
71+
$ ros2 run demo_nodes_cpp talker
7272
73-
.. code-block:: bash
73+
.. code-block:: console
7474
75-
ros2 run demo_nodes_cpp listener
75+
$ ros2 run demo_nodes_cpp listener

source/Installation/RMW-Implementations/DDS-Implementations/Working-with-GurumNetworks-GurumDDS.rst

+16-16
Original file line numberDiff line numberDiff line change
@@ -35,56 +35,56 @@ Installation
3535
Option 1: Install from the ROS 2 apt repository (Recommended)
3636
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3737

38-
.. code-block:: bash
38+
.. code-block:: console
3939
40-
sudo apt install ros-{DISTRO}-rmw-gurumdds-cpp
40+
$ sudo apt install ros-{DISTRO}-rmw-gurumdds-cpp
4141
4242
This installs both ``rmw_gurumdds_cpp`` and ``gurumdds``.
4343

4444
Option 2: Build from source code
4545
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4646
1. Clone the repository
4747

48-
.. code-block:: bash
48+
.. code-block:: console
4949
50-
cd ros2_ws/src
51-
git clone https://github.com/ros2/rmw_gurumdds -b {DISTRO} ros2/rmw_gurumdds
50+
$ cd ros2_ws/src
51+
$ git clone https://github.com/ros2/rmw_gurumdds -b {DISTRO} ros2/rmw_gurumdds
5252
5353
2. Install dependencies:
5454

55-
.. code-block:: bash
55+
.. code-block:: console
5656
57-
cd ..
58-
rosdep install --from src -i --rosdistro {DISTRO}
57+
$ cd ..
58+
$ rosdep install --from src -i --rosdistro {DISTRO}
5959
6060
3. Build the workspace using Colcon:
6161

62-
.. code-block:: bash
62+
.. code-block:: console
6363
64-
colcon build --symlink-install
64+
$ colcon build --symlink-install
6565
6666
6767
Switch to rmw_gurumdds
6868
----------------------
6969
Switch from other RMW implementations to rmw_gurumdds by setting the environment variable:
7070

71-
.. code-block:: bash
71+
.. code-block:: console
7272
73-
export RMW_IMPLEMENTATION=rmw_gurumdds_cpp
73+
$ export RMW_IMPLEMENTATION=rmw_gurumdds_cpp
7474
7575
For more information on working with multiple RMW implementations, see :doc:`Working with multiple RMW implementations <../../../How-To-Guides/Working-with-multiple-RMW-implementations>`.
7676

7777
Testing the installation
7878
------------------------
7979
Run the ``talker`` and ``listener`` nodes to verify your installation:
8080

81-
.. code-block:: bash
81+
.. code-block:: console
8282
83-
ros2 run demo_nodes_cpp talker
83+
$ ros2 run demo_nodes_cpp talker
8484
85-
.. code-block:: bash
85+
.. code-block:: console
8686
87-
ros2 run demo_nodes_cpp listener
87+
$ ros2 run demo_nodes_cpp listener
8888
8989
If the nodes communicate successfully, your installation is working correctly.
9090

source/Installation/RMW-Implementations/DDS-Implementations/Working-with-RTI-Connext-DDS.rst

+20-20
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ RTI Connext Pro is available through a variety of channels:
3434

3535
.. group-tab:: v7.3.0
3636

37-
.. code-block:: bash
37+
.. code-block:: console
3838
39-
sudo apt update && sudo apt install -q -y rti-connext-dds-7.3.0
39+
$ sudo apt update && sudo apt install -q -y rti-connext-dds-7.3.0
4040
4141
.. group-tab:: v6.0.1
4242

4343
.. code-block:: console
4444
45-
sudo apt update && sudo apt install -q -y rti-connext-dds-6.0.1
45+
$ sudo apt update && sudo apt install -q -y rti-connext-dds-6.0.1
4646
4747
Note that this includes the RTI Connext libraries only, and does not include the full RTI Connext Pro suite of tools and services.
4848
Note also that the Connext libraries are automatically installed when installing ``rmw_connextdds`` using apt.
@@ -58,9 +58,9 @@ Install rmw_connextdds binary packages
5858

5959
To install the binary packages for ``rmw_connextdds`` and the Connext libraries from the ROS 2 apt repositories, use the following command:
6060

61-
.. code-block:: bash
61+
.. code-block:: console
6262
63-
sudo apt update && sudo apt install -q -y ros-{DISTRO}-rmw-connextdds
63+
$ sudo apt update && sudo apt install -q -y ros-{DISTRO}-rmw-connextdds
6464
6565
6666
Building rmw_connextdds from source code
@@ -72,39 +72,39 @@ pages have instructions for building for other platforms and targets, including
7272

7373
Clone the repository for ``rmw_connextdds`` into your ROS 2 workspace and select the branch that matches the ROS 2 distribution in use:
7474

75-
.. code-block:: bash
75+
.. code-block:: console
7676
77-
cd ros2_ws/src
78-
git clone https://github.com/ros2/rmw_connextdds -b {DISTRO}
77+
$ cd ros2_ws/src
78+
$ git clone https://github.com/ros2/rmw_connextdds -b {DISTRO}
7979
8080
Set up the environment to help colcon discover where RTI Connext is installed.
8181
This can be done by manually setting the environment variable ``NDDSHOME`` to the location of the RTI Connext installation, or by using a script that comes with the RTI Connext installation:
8282

83-
.. code-block:: bash
83+
.. code-block:: console
8484
85-
source ${RTI_CONNEXT_INSTALL_LOCATION}/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.bash
85+
$ source ${RTI_CONNEXT_INSTALL_LOCATION}/resource/scripts/rtisetenv_x64Linux4gcc7.3.0.bash
8686
8787
Build the RMW using colcon:
8888

89-
.. code-block:: bash
89+
.. code-block:: console
9090
91-
colcon build --symlink-install
91+
$ colcon build --symlink-install
9292
9393
After the build completes successfully, be sure to source the setup file for the workspace:
9494

95-
.. code-block:: bash
95+
.. code-block:: console
9696
97-
source install/setup.bash
97+
$ source install/setup.bash
9898
9999
100100
Use the resulting rmw_connextdds
101101
--------------------------------
102102

103103
Set the environment variable ``RMW_IMPLEMENTATION`` to tell ROS 2 which RMW to use:
104104

105-
.. code-block:: bash
105+
.. code-block:: console
106106
107-
export RMW_IMPLEMENTATION=rmw_connextdds
107+
$ export RMW_IMPLEMENTATION=rmw_connextdds
108108
109109
See also: :doc:`Working with multiple RMW implementations <../../../How-To-Guides/Working-with-multiple-RMW-implementations>`
110110

@@ -113,11 +113,11 @@ Run the talker and listener
113113

114114
Now run ``talker`` and ``listener`` to test RTI Connext DDS
115115

116-
.. code-block:: bash
116+
.. code-block:: console
117117
118-
ros2 run demo_nodes_cpp talker
118+
$ ros2 run demo_nodes_cpp talker
119119
120-
.. code-block:: bash
120+
.. code-block:: console
121121
122-
ros2 run demo_nodes_cpp listener
122+
$ ros2 run demo_nodes_cpp listener
123123

source/Installation/RMW-Implementations/DDS-Implementations/Working-with-eProsima-Fast-DDS.rst

+17-18
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Install packages
1515

1616
The easiest way is to install from ROS 2 apt repository.
1717

18-
.. code-block:: bash
18+
.. code-block:: console
1919
20-
sudo apt install ros-{DISTRO}-rmw-fastrtps-cpp
20+
$ sudo apt install ros-{DISTRO}-rmw-fastrtps-cpp
2121
2222
Build from source code
2323
----------------------
@@ -26,33 +26,33 @@ Building from source code is also another way to install.
2626

2727
First, clone Fast DDS and rmw_fastrtps in the ROS 2 workspace source directory.
2828

29-
.. code-block:: bash
29+
.. code-block:: console
3030
31-
cd ros2_ws/src
32-
git clone https://github.com/ros2/rmw_fastrtps ros2/rmw_fastrtps -b {REPOS_FILE_BRANCH}
33-
git clone https://github.com/eProsima/Fast-DDS eProsima/fastrtps
31+
$ cd ros2_ws/src
32+
$ git clone https://github.com/ros2/rmw_fastrtps ros2/rmw_fastrtps -b {REPOS_FILE_BRANCH}
33+
$ git clone https://github.com/eProsima/Fast-DDS eProsima/fastrtps
3434
3535
Then, install necessary packages for Fast DDS.
3636

37-
.. code-block:: bash
37+
.. code-block:: console
3838
39-
cd ..
40-
rosdep install --from src -i
39+
$ cd ..
40+
$ rosdep install --from src -i
4141
4242
Finally, run colcon build.
4343

44-
.. code-block:: bash
44+
.. code-block:: console
4545
46-
colcon build --symlink-install
46+
$ colcon build --symlink-install
4747
4848
Switch to rmw_fastrtps
4949
----------------------
5050

5151
The eProsima Fast DDS RMW can be selected by specifying the environment variable:
5252

53-
.. code-block:: bash
53+
.. code-block:: console
5454
55-
export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
55+
$ export RMW_IMPLEMENTATION=rmw_fastrtps_cpp
5656
5757
See also: :doc:`Working with multiple RMW implementations <../../../How-To-Guides/Working-with-multiple-RMW-implementations>`
5858

@@ -61,11 +61,10 @@ Run the talker and listener
6161

6262
Now run ``talker`` and ``listener`` to test Fast DDS.
6363

64-
.. code-block:: bash
64+
.. code-block:: console
6565
66-
ros2 run demo_nodes_cpp talker
66+
$ ros2 run demo_nodes_cpp talker
6767
68-
.. code-block:: bash
69-
70-
ros2 run demo_nodes_cpp listener
68+
.. code-block:: console
7169
70+
$ ros2 run demo_nodes_cpp listener

0 commit comments

Comments
 (0)