Skip to content

Commit 26158da

Browse files
mergify[bot]jncfa
andauthored
Indicate correct branches to checkout to build CycloneDDS from source (#5678) (#5687)
(cherry picked from commit 6987641) Signed-off-by: jncfa <[email protected]> Co-authored-by: José Faria <[email protected]>
1 parent 6d6be98 commit 26158da

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,21 @@ Build from source code
3030
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.
33+
To determine the correct branches to checkout, you need to find what versions are specified in your `ROS distribution's ros2.repos file <https://raw.githubusercontent.com/ros2/ros2/refs/heads/{DISTRO}/ros2.repos>`_.
34+
35+
Alternatively, you can run the following code to fetch the correct branch/tag needed for Cyclone DDS:
36+
37+
.. code-block:: console
38+
39+
$ CYCLONEDDS_BRANCH=$(curl -s https://raw.githubusercontent.com/ros2/ros2/refs/heads/{DISTRO}/ros2.repos | grep -A 3 "eclipse-cyclonedds/cyclonedds:" | grep "version:" | awk '{print $2}')
40+
41+
And now, clone and checkout the code:
3342

3443
.. code-block:: console
3544
3645
$ 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
46+
$ git clone https://github.com/ros2/rmw_cyclonedds ros2/rmw_cyclonedds -b {DISTRO}
47+
$ git clone https://github.com/eclipse-cyclonedds/cyclonedds eclipse-cyclonedds/cyclonedds -b ${CYCLONEDDS_BRANCH}
3948
4049
Then, install necessary packages for Cyclone DDS.
4150

0 commit comments

Comments
 (0)