Skip to content

Commit 17afade

Browse files
Nils-ChristianIsekemergify[bot]
authored andcommitted
Add $ to Installation/Alternatives (#5354)
Signed-off-by: Nils-Christian Iseke <[email protected]> Signed-off-by: Nils-Christian Iseke <[email protected]> Co-authored-by: Christophe Bedard <[email protected]> (cherry picked from commit 2901e65) # Conflicts: # source/Installation/Alternatives/RHEL-Development-Setup.rst # source/Installation/Alternatives/RHEL-Install-Binary.rst # source/Installation/Alternatives/Ubuntu-Development-Setup.rst # source/Installation/Alternatives/Ubuntu-Install-Binary.rst # source/Installation/Alternatives/Windows-Development-Setup.rst # source/Installation/Alternatives/macOS-Development-Setup.rst
1 parent d2bbbe1 commit 17afade

6 files changed

+479
-128
lines changed

source/Installation/Alternatives/RHEL-Development-Setup.rst

+67-28
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,30 @@ They can be enabled by running:
3939
sudo dnf install 'dnf-command(config-manager)' epel-release -y
4040
sudo dnf config-manager --set-enabled powertools
4141
42+
<<<<<<< HEAD
4243
.. note:: This step may be slightly different depending on the distribution you are using.
4344
`Check the EPEL documentation <https://docs.fedoraproject.org/en-US/epel/#_quickstart>`_
45+
=======
46+
.. code-block:: console
47+
48+
$ sudo dnf install 'dnf-command(config-manager)' epel-release -y
49+
$ sudo dnf config-manager --set-enabled crb
50+
51+
.. note:: This step may be slightly different depending on the distribution you are using.
52+
`Check the EPEL documentation <https://docs.fedoraproject.org/en-US/epel/#_quickstart>`_
53+
54+
.. group-tab:: Fedora
55+
56+
No additional setup required.
57+
>>>>>>> 2901e65 (Add $ to Installation/Alternatives (#5354))
4458

4559

4660
Install development tools and ROS tools
4761
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4862

49-
.. code-block:: bash
63+
.. code-block:: console
5064
51-
sudo dnf install -y \
65+
$ sudo dnf install -y \
5266
cmake \
5367
gcc-c++ \
5468
git \
@@ -64,9 +78,9 @@ Install development tools and ROS tools
6478
python3-setuptools \
6579
python3-vcstool
6680
67-
# install some pip packages needed for testing and
68-
# not available as RPMs
69-
python3 -m pip install -U --user \
81+
~ install some pip packages needed for testing and
82+
~ not available as RPMs
83+
$ python3 -m pip install -U --user \
7084
flake8-blind-except==0.1.1 \
7185
flake8-builtins \
7286
flake8-class-newline \
@@ -84,11 +98,11 @@ Get ROS 2 code
8498

8599
Create a workspace and clone all repos:
86100

87-
.. code-block:: bash
101+
.. code-block:: console
88102
89-
mkdir -p ~/ros2_{DISTRO}/src
90-
cd ~/ros2_{DISTRO}
91-
vcs import --input https://raw.githubusercontent.com/ros2/ros2/{REPOS_FILE_BRANCH}/ros2.repos src
103+
$ mkdir -p ~/ros2_{DISTRO}/src
104+
$ cd ~/ros2_{DISTRO}
105+
$ vcs import --input https://raw.githubusercontent.com/ros2/ros2/{REPOS_FILE_BRANCH}/ros2.repos src
92106
93107
.. _rhel-development-setup-install-dependencies-using-rosdep:
94108

@@ -97,11 +111,17 @@ Install dependencies using rosdep
97111

98112
.. include:: ../_Dnf-Update-Admonition.rst
99113

100-
.. code-block:: bash
114+
.. code-block:: console
101115
116+
<<<<<<< HEAD
102117
sudo rosdep init
103118
rosdep update
104119
rosdep install --from-paths src --ignore-src -y --skip-keys "asio cyclonedds fastcdr fastrtps ignition-cmake2 ignition-math6 python3-babeltrace python3-mypy rti-connext-dds-6.0.1 urdfdom_headers"
120+
=======
121+
$ sudo rosdep init
122+
$ rosdep update
123+
$ rosdep install --from-paths src --ignore-src -y --skip-keys "fastcdr rti-connext-dds-7.3.0 urdfdom_headers"
124+
>>>>>>> 2901e65 (Add $ to Installation/Alternatives (#5354))
105125

106126
Install additional DDS implementations (optional)
107127
-------------------------------------------------
@@ -118,28 +138,47 @@ The output should be empty.
118138

119139
More info on working with a ROS workspace can be found in :doc:`this tutorial <../../Tutorials/Beginner-Client-Libraries/Colcon-Tutorial>`.
120140

121-
.. code-block:: bash
141+
.. code-block:: console
122142
143+
<<<<<<< HEAD
123144
cd ~/ros2_{DISTRO}/
124145
colcon build --symlink-install --cmake-args -DTHIRDPARTY_Asio=ON -DPython3_EXECUTABLE=/usr/bin/python3 --no-warn-unused-cli
146+
=======
147+
$ cd ~/ros2_{DISTRO}/
148+
$ colcon build --symlink-install
149+
>>>>>>> 2901e65 (Add $ to Installation/Alternatives (#5354))
125150

126151
Note: if you are having trouble compiling all examples and this is preventing you from completing a successful build, you can use ``COLCON_IGNORE`` in the same manner as `CATKIN_IGNORE <https://github.com/ros-infrastructure/rep/blob/master/rep-0128.rst>`__ to ignore the subtree or remove the folder from the workspace.
127152
Take for instance: you would like to avoid installing the large OpenCV library.
128153
Well then simply run ``touch COLCON_IGNORE`` in the ``cam2image`` demo directory to leave it out of the build process.
129154

155+
<<<<<<< HEAD
130156
Environment setup
157+
=======
158+
If you are having trouble compiling all examples and this is preventing you from completing a successful build, you can use the ``--packages-skip`` colcon flag to ignore the package that is causing problems.
159+
For instance, if you don't want to install the large OpenCV library, you could skip building the packages that depend on it using the command:
160+
161+
.. code-block:: console
162+
163+
$ colcon build --symlink-install --packages-skip image_tools intra_process_demo
164+
165+
Setup environment
166+
>>>>>>> 2901e65 (Add $ to Installation/Alternatives (#5354))
131167
-----------------
132168

133169
Source the setup script
134170
^^^^^^^^^^^^^^^^^^^^^^^
135171

136172
Set up your environment by sourcing the following file.
137173

138-
.. code-block:: bash
174+
.. code-block:: console
175+
176+
$ . ~/ros2_{DISTRO}/install/local_setup.bash
139177
140-
# Replace ".bash" with your shell if you're not using bash
141-
# Possible values are: setup.bash, setup.sh, setup.zsh
142-
. ~/ros2_{DISTRO}/install/local_setup.bash
178+
.. note::
179+
180+
Replace ``.bash`` with your shell if you're not using bash.
181+
Possible values are: ``setup.bash``, ``setup.sh``, ``setup.zsh``.
143182

144183
.. _rhel_talker-listener:
145184

@@ -148,17 +187,17 @@ Try some examples
148187

149188
In one terminal, source the setup file and then run a C++ ``talker``\ :
150189

151-
.. code-block:: bash
190+
.. code-block:: console
152191
153-
. ~/ros2_{DISTRO}/install/local_setup.bash
154-
ros2 run demo_nodes_cpp talker
192+
$ . ~/ros2_{DISTRO}/install/local_setup.bash
193+
$ ros2 run demo_nodes_cpp talker
155194
156195
In another terminal source the setup file and then run a Python ``listener``\ :
157196

158-
.. code-block:: bash
197+
.. code-block:: console
159198
160-
. ~/ros2_{DISTRO}/install/local_setup.bash
161-
ros2 run demo_nodes_py listener
199+
$ . ~/ros2_{DISTRO}/install/local_setup.bash
200+
$ ros2 run demo_nodes_py listener
162201
163202
You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages.
164203
This verifies both the C++ and Python APIs are working properly.
@@ -184,12 +223,12 @@ Clang
184223

185224
To configure CMake to detect and use Clang:
186225

187-
.. code-block:: bash
226+
.. code-block:: console
188227
189-
sudo dnf install clang
190-
export CC=clang
191-
export CXX=clang++
192-
colcon build --cmake-force-configure
228+
$ sudo dnf install clang
229+
$ export CC=clang
230+
$ export CXX=clang++
231+
$ colcon build --cmake-force-configure
193232
194233
Stay up to date
195234
---------------
@@ -209,6 +248,6 @@ Uninstall
209248

210249
2. If you're also trying to free up space, you can delete the entire workspace directory with:
211250

212-
.. code-block:: bash
251+
.. code-block:: console
213252
214-
rm -rf ~/ros2_{DISTRO}
253+
$ rm -rf ~/ros2_{DISTRO}

source/Installation/Alternatives/RHEL-Install-Binary.rst

+82-13
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@ Enable required repositories
2626
The rosdep database contains packages from the EPEL and PowerTools repositories, which are not enabled by default.
2727
They can be enabled by running:
2828

29-
.. code-block:: bash
29+
.. code-block:: console
3030
31+
<<<<<<< HEAD
3132
sudo dnf install 'dnf-command(config-manager)' epel-release -y
3233
sudo dnf config-manager --set-enabled powertools
34+
=======
35+
$ sudo dnf install 'dnf-command(config-manager)' epel-release -y
36+
$ sudo dnf config-manager --set-enabled crb
37+
>>>>>>> 2901e65 (Add $ to Installation/Alternatives (#5354))
3338

3439
.. note:: This step may be slightly different depending on the distribution you are using.
3540
`Check the EPEL documentation <https://docs.fedoraproject.org/en-US/epel/#_quickstart>`_
@@ -39,12 +44,51 @@ Installing prerequisites
3944

4045
There are a few packages that must be installed in order to get and unpack the binary release.
4146

42-
.. code-block:: bash
47+
.. code-block:: console
4348
44-
sudo dnf install tar bzip2 wget -y
49+
$ sudo dnf install tar bzip2 wget -y
4550
51+
<<<<<<< HEAD
4652
Downloading ROS 2
4753
-----------------
54+
=======
55+
Install development tools (optional)
56+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
57+
58+
If you are going to build ROS packages or otherwise do development, you can also install the development tools:
59+
60+
.. code-block:: console
61+
62+
$ sudo dnf install -y \
63+
cmake \
64+
gcc-c++ \
65+
git \
66+
make \
67+
patch \
68+
python3-colcon-common-extensions \
69+
python3-mypy \
70+
python3-pip \
71+
python3-pytest \
72+
python3-pytest-repeat \
73+
python3-pytest-rerunfailures \
74+
python3-rosdep \
75+
python3-setuptools \
76+
python3-vcstool \
77+
wget
78+
79+
~ install some pip packages needed for testing and
80+
~ not available as RPMs
81+
$ python3 -m pip install -U --user \
82+
flake8-blind-except==0.1.1 \
83+
flake8-class-newline \
84+
flake8-deprecated
85+
86+
Install ROS 2
87+
-------------
88+
89+
Binary releases of Rolling Ridley are not provided.
90+
Instead you may download nightly :ref:`prerelease binaries <Prerelease_binaries>`.
91+
>>>>>>> 2901e65 (Add $ to Installation/Alternatives (#5354))
4892

4993
* Go to the `releases page <https://github.com/ros2/ros2/releases>`_
5094
* Download the latest package for RHEL; let's assume that it ends up at ``~/Downloads/ros2-package-linux-x86_64.tar.bz2``.
@@ -53,20 +97,32 @@ Downloading ROS 2
5397

5498
* Unpack it:
5599

56-
.. code-block:: bash
100+
.. code-block:: console
57101
102+
<<<<<<< HEAD
58103
mkdir -p ~/ros2_{DISTRO}
59104
cd ~/ros2_{DISTRO}
60105
tar xf ~/Downloads/ros2-package-linux-x86_64.tar.bz2
106+
=======
107+
$ mkdir -p ~/ros2_{DISTRO}
108+
$ cd ~/ros2_{DISTRO}
109+
$ tar xf ~/Downloads/ros2-package-linux-x86_64.tar.bz2
110+
>>>>>>> 2901e65 (Add $ to Installation/Alternatives (#5354))
61111

62112
Installing and initializing rosdep
63113
----------------------------------
64114

65-
.. code-block:: bash
115+
.. code-block:: console
66116
117+
<<<<<<< HEAD
67118
sudo dnf install -y python3-rosdep
68119
sudo rosdep init
69120
rosdep update
121+
=======
122+
$ sudo rosdep init
123+
$ rosdep update
124+
$ rosdep install --from-paths ~/ros2_{DISTRO}/ros2-linux/share --ignore-src -y --skip-keys "cyclonedds fastcdr fastrtps iceoryx_binding_c rti-connext-dds-7.3.0 urdfdom_headers"
125+
>>>>>>> 2901e65 (Add $ to Installation/Alternatives (#5354))
70126

71127
.. _rhel-install-binary-install-missing-dependencies:
72128

@@ -94,28 +150,37 @@ Source the setup script
94150

95151
Set up your environment by sourcing the following file.
96152

97-
.. code-block:: bash
153+
.. code-block:: console
98154
155+
<<<<<<< HEAD
99156
# Replace ".bash" with your shell if you're not using bash
100157
# Possible values are: setup.bash, setup.sh, setup.zsh
101158
. ~/ros2_{DISTRO}/ros2-linux/setup.bash
159+
=======
160+
$ . ~/ros2_{DISTRO}/ros2-linux/setup.bash
161+
162+
.. note::
163+
164+
Replace ``.bash`` with your shell if you're not using bash.
165+
Possible values are: ``setup.bash``, ``setup.sh``, ``setup.zsh``.
166+
>>>>>>> 2901e65 (Add $ to Installation/Alternatives (#5354))
102167

103168
Try some examples
104169
-----------------
105170

106171
In one terminal, source the setup file and then run a C++ ``talker``:
107172

108-
.. code-block:: bash
173+
.. code-block:: console
109174
110-
. ~/ros2_{DISTRO}/ros2-linux/setup.bash
111-
ros2 run demo_nodes_cpp talker
175+
$ . ~/ros2_{DISTRO}/ros2-linux/setup.bash
176+
$ ros2 run demo_nodes_cpp talker
112177
113178
In another terminal source the setup file and then run a Python ``listener``:
114179

115-
.. code-block:: bash
180+
.. code-block:: console
116181
117-
. ~/ros2_{DISTRO}/ros2-linux/setup.bash
118-
ros2 run demo_nodes_py listener
182+
$ . ~/ros2_{DISTRO}/ros2-linux/setup.bash
183+
$ ros2 run demo_nodes_py listener
119184
120185
You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages.
121186
This verifies both the C++ and Python APIs are working properly.
@@ -143,6 +208,10 @@ Uninstall
143208

144209
2. If you're also trying to free up space, you can delete the entire workspace directory with:
145210

146-
.. code-block:: bash
211+
.. code-block:: console
147212
213+
<<<<<<< HEAD
148214
rm -rf ~/ros2_{DISTRO}
215+
=======
216+
$ rm -rf ~/ros2_{DISTRO}
217+
>>>>>>> 2901e65 (Add $ to Installation/Alternatives (#5354))

0 commit comments

Comments
 (0)