@@ -32,7 +32,7 @@ Install additional prerequisites from Chocolatey
3232
3333.. code-block :: bash
3434
35- > choco install -y cppcheck curl git winflexbison3
35+ choco install -y cppcheck curl git winflexbison3
3636
3737 You will need to append the Git cmd folder ``C:\Program Files\Git\cmd `` to the PATH (you can do this by clicking the Windows icon, typing "Environment Variables", then clicking on "Edit the system environment variables".
3838In the resulting dialog, click "Environment Variables", the click "Path" on the bottom pane, then click "Edit" and add the path).
@@ -45,7 +45,7 @@ Installing additional Python dependencies:
4545
4646.. code-block :: bash
4747
48- > pip install -U colcon-common-extensions coverage flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes mock mypy==0.761 pep8 pydocstyle pytest pytest-mock vcstool
48+ pip install -U colcon-common-extensions coverage flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes mock mypy==0.761 pep8 pydocstyle pytest pytest-mock vcstool
4949
5050 Install miscellaneous prerequisites
5151^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -65,28 +65,28 @@ First setup a development folder, for example ``C:\dev\ros2_{DISTRO}``:
6565
6666.. code-block :: bash
6767
68- > md \d ev\r os2_{DISTRO}\s rc
69- > cd \d ev\r os2_{DISTRO}
68+ md \d ev\r os2_{DISTRO}\s rc
69+ cd \d ev\r os2_{DISTRO}
7070
7171 Get the ``ros2.repos `` file which defines the repositories to clone from:
7272
7373.. code-block :: bash
7474
7575 # CMD
76- > curl -sk https://raw.githubusercontent.com/ros2/ros2/{REPOS_FILE_BRANCH}/ros2.repos -o ros2.repos
76+ curl -sk https://raw.githubusercontent.com/ros2/ros2/{REPOS_FILE_BRANCH}/ros2.repos -o ros2.repos
7777
7878 # PowerShell
79- > curl https://raw.githubusercontent.com/ros2/ros2/{REPOS_FILE_BRANCH}/ros2.repos -o ros2.repos
79+ curl https://raw.githubusercontent.com/ros2/ros2/{REPOS_FILE_BRANCH}/ros2.repos -o ros2.repos
8080
8181 Next you can use ``vcs `` to import the repositories listed in the ``ros2.repos `` file:
8282
8383.. code-block :: bash
8484
8585 # CMD
86- > vcs import src < ros2.repos
86+ vcs import src < ros2.repos
8787
8888 # PowerShell
89- > vcs import --input ros2.repos src
89+ vcs import --input ros2.repos src
9090
9191 Install additional DDS implementations (optional)
9292^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -106,7 +106,7 @@ To build the ``\dev\ros2_{DISTRO}`` folder tree:
106106
107107.. code-block :: bash
108108
109- > colcon build --merge-install
109+ colcon build --merge-install
110110
111111 .. note ::
112112
@@ -125,7 +125,7 @@ Start a command shell and source the ROS 2 setup file to set up the workspace:
125125
126126.. code-block :: bash
127127
128- > call C:\d ev\r os2_{DISTRO}\i nstall\l ocal_setup.bat
128+ call C:\d ev\r os2_{DISTRO}\i nstall\l ocal_setup.bat
129129
130130 This will automatically set up the environment for any DDS vendors that support was built for.
131131
@@ -140,7 +140,7 @@ You can run the tests using this command:
140140
141141.. code-block :: bash
142142
143- > colcon test --merge-install
143+ colcon test --merge-install
144144
145145 .. note ::
146146
@@ -150,22 +150,22 @@ Afterwards you can get a summary of the tests using this command:
150150
151151.. code-block :: bash
152152
153- > colcon test-result
153+ colcon test-result
154154
155155 To run the examples, first open a clean new ``cmd.exe `` and set up the workspace by sourcing the ``local_setup.bat `` file.
156156Then, run a C++ ``talker ``\ :
157157
158158.. code-block :: bash
159159
160- > call install\l ocal_setup.bat
161- > ros2 run demo_nodes_cpp talker
160+ call install\l ocal_setup.bat
161+ ros2 run demo_nodes_cpp talker
162162
163163 In a separate shell you can do the same, but instead run a Python ``listener ``\ :
164164
165165.. code-block :: bash
166166
167- > call install\l ocal_setup.bat
168- > ros2 run demo_nodes_py listener
167+ call install\l ocal_setup.bat
168+ ros2 run demo_nodes_py listener
169169
170170 You should see the ``talker `` saying that it's ``Publishing `` messages and the ``listener `` saying ``I heard `` those messages.
171171This verifies both the C++ and Python APIs are working properly.
@@ -200,14 +200,14 @@ If you want to be able to run all the tests in Debug mode, you'll need to instal
200200
201201.. code-block :: bash
202202
203- > choco install -y peazip
203+ choco install -y peazip
204204
205205
206206 * You'll also need SVN, since some of the Python source-build dependencies are checked out via SVN:
207207
208208.. code-block :: bash
209209
210- > choco install -y svn hg
210+ choco install -y svn hg
211211
212212
213213 * You'll need to quit and restart the command prompt after installing the above.
@@ -220,59 +220,55 @@ If you want to be able to run all the tests in Debug mode, you'll need to instal
220220
221221.. code-block :: bash
222222
223- > cd C:\d ev\P ython-3.8.3\P Cbuild
224- > get_externals.bat
225- > build.bat -p x64 -d
223+ cd C:\d ev\P ython-3.8.3\P Cbuild
224+ get_externals.bat
225+ build.bat -p x64 -d
226226
227227
228228 * Finally, copy the build products into the Python38 installation directories, next to the Release-mode Python executable and DLL's:
229229
230230.. code-block :: bash
231231
232- > cd C:\d ev\P ython-3.8.3\P Cbuild\a md64
233- > copy python_d.exe C:\P ython38 /Y
234- > copy python38_d.dll C:\P ython38 /Y
235- > copy python3_d.dll C:\P ython38 /Y
236- > copy python38_d.lib C:\P ython38\l ibs /Y
237- > copy python3_d.lib C:\P ython38\l ibs /Y
238- > for %I in (* _d.pyd) do copy %I C:\P ython38\D LLs /Y
232+ cd C:\d ev\P ython-3.8.3\P Cbuild\a md64
233+ copy python_d.exe C:\P ython38 /Y
234+ copy python38_d.dll C:\P ython38 /Y
235+ copy python3_d.dll C:\P ython38 /Y
236+ copy python38_d.lib C:\P ython38\l ibs /Y
237+ copy python3_d.lib C:\P ython38\l ibs /Y
238+ for %I in (* _d.pyd) do copy %I C:\P ython38\D LLs /Y
239239
240240
241241* Now, from a fresh command prompt, make sure that ` ` python_d` ` works:
242242
243243.. code-block:: bash
244244
245- > python_d
246- > import _ctypes
245+ python_d -c " import _ctypes"
247246
248247* Once you have verified the operation of ` ` python_d` ` , it is necessary to reinstall a few dependencies with the debug-enabled libraries:
249248
250249.. code-block:: bash
251250
252- > python_d -m pip install --force-reinstall https://github.com/ros2/ros2/releases/download/numpy-archives/numpy-1.18.4-cp38-cp38d-win_amd64.whl
253- > python_d -m pip install --force-reinstall https://github.com/ros2/ros2/releases/download/lxml-archives/lxml-4.5.1-cp38-cp38d-win_amd64.whl
251+ python_d -m pip install --force-reinstall https://github.com/ros2/ros2/releases/download/numpy-archives/numpy-1.18.4-cp38-cp38d-win_amd64.whl
252+ python_d -m pip install --force-reinstall https://github.com/ros2/ros2/releases/download/lxml-archives/lxml-4.5.1-cp38-cp38d-win_amd64.whl
254253
255254* To verify the installation of these dependencies:
256255
257256.. code-block:: bash
258257
259- > python_d
260- # No import errors should appear when executing the following lines
261- > from lxml import etree
262- > import numpy
258+ python_d -c " from lxml import etree ; import numpy"
263259
264260* When you wish to return to building release binaries, it is necessary to uninstall the debug variants and use the release variants:
265261
266262.. code-block:: bash
267263
268- > python -m pip uninstall numpy lxml
269- > python -m pip install numpy lxml
264+ python -m pip uninstall numpy lxml
265+ python -m pip install numpy lxml
270266
271267* To create executables python scripts(.exe), python_d should be used to invoke colcon
272268
273269.. code-block:: bash
274270
275- > python_d path\t o\c olcon_executable build
271+ python_d path\t o\c olcon_executable build
276272
277273* Hooray, you' re done!
278274
@@ -296,4 +292,4 @@ Uninstall
296292
297293 .. code-block:: bash
298294
299- rmdir /s /q \ros2_{DISTRO}
295+ rmdir /s /q \ros2_{DISTRO}
0 commit comments