Skip to content

Commit 174445f

Browse files
committed
provide helper script to determine correct versions to checkout
Signed-off-by: jncfa <[email protected]>
1 parent 3830300 commit 174445f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,20 @@ 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, which you can find in ros2/ros2 repository.
34+
Alternatively, if you have yq installed, you can run the following code to fetch the versions automatically:
35+
36+
.. code-block:: console
37+
$ RMW_CYCLONEDDS_BRANCH=$(curl -s https://raw.githubusercontent.com/ros2/ros2/refs/heads/${ROS_DISTRO}/ros2.repos | yq '.repositories."ros2/rmw_cyclonedds".version')
38+
$ CYCLONEDDS_BRANCH=$(curl -s https://raw.githubusercontent.com/ros2/ros2/refs/heads/${ROS_DISTRO}/ros2.repos | yq '.repositories."eclipse-cyclonedds/cyclonedds".version')
39+
40+
And now clone and checkout the code:
3341

3442
.. code-block:: console
3543
3644
$ 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
45+
$ git clone https://github.com/ros2/rmw_cyclonedds ros2/rmw_cyclonedds -b {RMW_CYCLONEDDS_BRANCH}
46+
$ git clone https://github.com/eclipse-cyclonedds/cyclonedds eclipse-cyclonedds/cyclonedds -b {CYCLONEDDS_BRANCH}
3947
4048
Then, install necessary packages for Cyclone DDS.
4149

0 commit comments

Comments
 (0)