From 5a8499aaf8017ddd25f56973869a6a5214322a85 Mon Sep 17 00:00:00 2001 From: Marya Belanger Date: Thu, 3 Dec 2020 04:34:06 -0800 Subject: [PATCH] Versioned Rolling branch (#907) * committing version test * remove tags Signed-off-by: maryaB-osr * adding whitelists and trying released/in-development Signed-off-by: maryaB-osr * comment out unused config with wrong type causing warning * Enable pulling from origin and released flag * Example warning banner * reverse order and move version list below navigation Signed-off-by: maryaB-osr * reorder version list Signed-off-by: maryaB-osr * refactored after separating versions Signed-off-by: maryaB-osr * lowercase branch names, add dashing Signed-off-by: maryaB-osr * fixing branch versioning Signed-off-by: maryaB-osr * travis.yml: pip3 install sphinx_multiversion Signed-off-by: maryaB-osr * remove missing-reference function Signed-off-by: maryaB-osr * fix typo Signed-off-by: maryaB-osr * no env config video for rolling Signed-off-by: maryaB-osr Co-authored-by: Tully Foote --- .travis.yml | 1 + conf.py | 31 +- setup.py | 30 ++ source/Concepts.rst | 2 +- .../Build-Cop-and-Build-Farmer-Guide.rst | 8 +- source/Installation.rst | 29 +- source/Installation/Crystal.rst | 36 -- .../Crystal/Fedora-Development-Setup.rst | 19 - .../Crystal/Linux-Development-Setup.rst | 231 ---------- .../Crystal/Linux-Install-Binary.rst | 174 -------- .../Crystal/Linux-Install-Debians.rst | 178 -------- .../Crystal/Windows-Development-Setup.rst | 378 ----------------- .../Crystal/Windows-Install-Binary.rst | 236 ----------- .../Crystal/macOS-Development-Setup.rst | 193 --------- .../Crystal/macOS-Install-Binary.rst | 171 -------- source/Installation/DDS-Implementations.rst | 105 +---- .../Working-with-Eclipse-CycloneDDS.rst | 3 +- source/Installation/Dashing.rst | 36 -- .../Dashing/Fedora-Development-Setup.rst | 56 --- .../Dashing/Linux-Development-Setup.rst | 214 ---------- .../Dashing/Linux-Install-Binary.rst | 146 ------- .../Dashing/Linux-Install-Debians.rst | 122 ------ .../Dashing/Windows-Development-Setup.rst | 385 ----------------- .../Dashing/Windows-Install-Binary.rst | 278 ------------ .../Dashing/macOS-Development-Setup.rst | 215 ---------- .../Dashing/macOS-Install-Binary.rst | 200 --------- source/Installation/Eloquent.rst | 38 -- .../Eloquent/Fedora-Development-Setup.rst | 62 --- .../Eloquent/Linux-Development-Setup.rst | 221 ---------- .../Eloquent/Linux-Install-Binary.rst | 152 ------- .../Eloquent/Linux-Install-Debians.rst | 131 ------ .../Eloquent/Windows-Development-Setup.rst | 399 ------------------ .../Eloquent/Windows-Install-Binary.rst | 236 ----------- .../Eloquent/macOS-Development-Setup.rst | 225 ---------- .../Eloquent/macOS-Install-Binary.rst | 206 --------- .../Fedora-Development-Setup.rst | 0 source/Installation/Foxy.rst | 38 -- .../Foxy/Fedora-Development-Setup.rst | 57 --- .../Foxy/Linux-Development-Setup.rst | 217 ---------- .../Foxy/Linux-Install-Binary.rst | 143 ------- .../Foxy/Linux-Install-Debians.rst | 125 ------ .../Foxy/Windows-Development-Setup.rst | 374 ---------------- .../Foxy/Windows-Install-Binary.rst | 303 ------------- .../Foxy/macOS-Development-Setup.rst | 224 ---------- .../Foxy/macOS-Install-Binary.rst | 204 --------- .../Installation/Latest-Development-Setup.rst | 6 +- .../{Rolling => }/Linux-Development-Setup.rst | 10 +- .../{Rolling => }/Linux-Install-Binary.rst | 5 +- .../{Rolling => }/Linux-Install-Debians.rst | 8 +- .../Maintaining-a-Source-Checkout.rst | 71 ---- source/Installation/Prerelease-Testing.rst | 2 +- source/Installation/Rolling.rst | 40 -- .../{_Install-Types.rst => Summary.rst} | 36 +- .../Windows-Development-Setup.rst | 4 +- .../{Rolling => }/Windows-Install-Binary.rst | 4 +- .../{Rolling => }/macOS-Development-Setup.rst | 2 +- .../{Rolling => }/macOS-Install-Binary.rst | 2 +- source/Releases/Beta2-Overview.rst | 2 +- source/Releases/Release-Dashing-Diademata.rst | 2 +- source/Releases/Release-Eloquent-Elusor.rst | 2 +- source/Releases/Release-Foxy-Fitzroy.rst | 2 +- source/Releases/Release-Rolling-Ridley.rst | 2 +- .../Installation-Troubleshooting.rst | 49 +-- source/Tutorials.rst | 7 +- .../Tutorials/Actions/Creating-an-Action.rst | 24 +- .../Tutorials/Ament-CMake-Documentation.rst | 56 +-- source/Tutorials/Colcon-Tutorial.rst | 2 +- .../Configuring-ROS2-Environment.rst | 35 +- source/Tutorials/Custom-ROS2-Interfaces.rst | 27 +- .../Tutorials/Developing-a-ROS-2-Package.rst | 2 +- .../Getting-Started-With-Ros2doctor.rst | 4 +- .../Launch-Files/Creating-Launch-Files.rst | 179 +++----- source/Tutorials/Launch-system.rst | 54 +-- .../Logging-and-logger-configuration.rst | 52 +-- source/Tutorials/Node-arguments.rst | 114 ++--- .../Understanding-ROS2-Parameters.rst | 87 ++-- source/Tutorials/Quality-of-Service.rst | 35 +- source/Tutorials/RQt-Overview-Usage.rst | 2 +- .../Recording-And-Playing-Back-Data.rst | 6 +- source/Tutorials/Rosbag-with-ROS1-Bridge.rst | 2 +- .../Rqt-Console/Using-Rqt-Console.rst | 14 +- ...n-2-nodes-in-a-single-docker-container.rst | 6 +- ...odes-in-two-separate-docker-containers.rst | 8 +- .../Services/Understanding-ROS2-Services.rst | 44 +- .../Topics/Understanding-ROS2-Topics.rst | 34 +- .../Turtlesim/Introducing-Turtlesim.rst | 25 +- .../Tutorials/Understanding-ROS2-Actions.rst | 15 +- source/Tutorials/Understanding-ROS2-Nodes.rst | 14 +- .../Using-Parameters-In-A-Class-CPP.rst | 84 +--- .../Using-Parameters-In-A-Class-Python.rst | 86 +--- ...king-with-multiple-RMW-implementations.rst | 2 +- .../Workspace/Creating-A-Workspace.rst | 18 +- ...-A-Simple-Cpp-Publisher-And-Subscriber.rst | 7 +- ...riting-A-Simple-Cpp-Service-And-Client.rst | 135 ++---- ...g-A-Simple-Py-Publisher-And-Subscriber.rst | 8 +- source/Tutorials/dummy-robot-demo.rst | 2 - source/_templates/page.html | 17 + source/_templates/versioning.html | 20 + 98 files changed, 480 insertions(+), 7828 deletions(-) create mode 100755 setup.py delete mode 100644 source/Installation/Crystal.rst delete mode 100644 source/Installation/Crystal/Fedora-Development-Setup.rst delete mode 100644 source/Installation/Crystal/Linux-Development-Setup.rst delete mode 100644 source/Installation/Crystal/Linux-Install-Binary.rst delete mode 100644 source/Installation/Crystal/Linux-Install-Debians.rst delete mode 100644 source/Installation/Crystal/Windows-Development-Setup.rst delete mode 100644 source/Installation/Crystal/Windows-Install-Binary.rst delete mode 100644 source/Installation/Crystal/macOS-Development-Setup.rst delete mode 100644 source/Installation/Crystal/macOS-Install-Binary.rst delete mode 100644 source/Installation/Dashing.rst delete mode 100644 source/Installation/Dashing/Fedora-Development-Setup.rst delete mode 100644 source/Installation/Dashing/Linux-Development-Setup.rst delete mode 100644 source/Installation/Dashing/Linux-Install-Binary.rst delete mode 100644 source/Installation/Dashing/Linux-Install-Debians.rst delete mode 100644 source/Installation/Dashing/Windows-Development-Setup.rst delete mode 100644 source/Installation/Dashing/Windows-Install-Binary.rst delete mode 100644 source/Installation/Dashing/macOS-Development-Setup.rst delete mode 100644 source/Installation/Dashing/macOS-Install-Binary.rst delete mode 100644 source/Installation/Eloquent.rst delete mode 100644 source/Installation/Eloquent/Fedora-Development-Setup.rst delete mode 100644 source/Installation/Eloquent/Linux-Development-Setup.rst delete mode 100644 source/Installation/Eloquent/Linux-Install-Binary.rst delete mode 100644 source/Installation/Eloquent/Linux-Install-Debians.rst delete mode 100644 source/Installation/Eloquent/Windows-Development-Setup.rst delete mode 100644 source/Installation/Eloquent/Windows-Install-Binary.rst delete mode 100644 source/Installation/Eloquent/macOS-Development-Setup.rst delete mode 100644 source/Installation/Eloquent/macOS-Install-Binary.rst rename source/Installation/{Rolling => }/Fedora-Development-Setup.rst (100%) delete mode 100644 source/Installation/Foxy.rst delete mode 100644 source/Installation/Foxy/Fedora-Development-Setup.rst delete mode 100644 source/Installation/Foxy/Linux-Development-Setup.rst delete mode 100644 source/Installation/Foxy/Linux-Install-Binary.rst delete mode 100644 source/Installation/Foxy/Linux-Install-Debians.rst delete mode 100644 source/Installation/Foxy/Windows-Development-Setup.rst delete mode 100644 source/Installation/Foxy/Windows-Install-Binary.rst delete mode 100644 source/Installation/Foxy/macOS-Development-Setup.rst delete mode 100644 source/Installation/Foxy/macOS-Install-Binary.rst rename source/Installation/{Rolling => }/Linux-Development-Setup.rst (97%) rename source/Installation/{Rolling => }/Linux-Install-Binary.rst (97%) rename source/Installation/{Rolling => }/Linux-Install-Debians.rst (95%) delete mode 100644 source/Installation/Rolling.rst rename source/Installation/{_Install-Types.rst => Summary.rst} (64%) rename source/Installation/{Rolling => }/Windows-Development-Setup.rst (98%) rename source/Installation/{Rolling => }/Windows-Install-Binary.rst (99%) rename source/Installation/{Rolling => }/macOS-Development-Setup.rst (99%) rename source/Installation/{Rolling => }/macOS-Install-Binary.rst (99%) create mode 100644 source/_templates/page.html create mode 100644 source/_templates/versioning.html diff --git a/.travis.yml b/.travis.yml index c17f235418b..77571f37793 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ os: linux install: - pip3 install doc8 sphinx - pip3 install git+https://github.com/osrf/sphinx-tabs + - pip3 install sphinx_multiversion script: - make html 2> stderr.log diff --git a/conf.py b/conf.py index fed9b8ad373..8406be95b76 100644 --- a/conf.py +++ b/conf.py @@ -16,10 +16,13 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -import os +import sys, os import itertools from docutils.parsers.rst import Directive +sys.path.append(os.path.abspath('./sphinx-multiversion')) + + # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # @@ -66,7 +69,7 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -extensions = ['sphinx.ext.intersphinx', 'sphinx_tabs.tabs'] +extensions = ['sphinx.ext.intersphinx', 'sphinx_tabs.tabs', "sphinx_multiversion"] # Intersphinx mapping @@ -85,7 +88,26 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +#html_theme = 'alabaster' + +templates_path = [ + "source/_templates", +] + +html_sidebars = { + '**': ['navigation.html', 'versioning.html'], +} + +# smv_tag_whitelist = None + +smv_branch_whitelist = r'^(rolling|foxy|eloquent|dashing)$' + + +smv_released_pattern = r'^refs/(heads|remotes/[^/]+)/(foxy|eloquent|dashing).*$' +smv_remote_whitelist = r'^(origin)$' +smv_latest_version = 'foxy' + + html_favicon = 'favicon.ico' @@ -206,6 +228,3 @@ def _missing_reference(app, env, node, contnode): def setup(app): RedirectFrom.register(app) - app.connect('missing-reference', make_router( - 'Installation', 'Installation/Eloquent' - )) diff --git a/setup.py b/setup.py new file mode 100755 index 00000000000..fc4b225fc44 --- /dev/null +++ b/setup.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +import os.path +from setuptools import setup + +with open(os.path.join(os.path.dirname(__file__), "README.md")) as f: + readme = f.read() + +setup( + name="sphinx-multiversion", + description="Add support for multiple versions to sphinx", + long_description=readme, + long_description_content_type="text/markdown", + classifiers=[ + "License :: OSI Approved :: BSD License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + ], + author="Jan Holthuis", + author_email="holthuis.jan@googlemail.com", + url="https://holzhaus.github.io/sphinx-multiversion/", + version="0.2.4", + install_requires=["sphinx >= 2.1"], + license="BSD", + packages=["sphinx_multiversion"], + entry_points={ + "console_scripts": ["sphinx-multiversion=sphinx_multiversion:main",], + }, +) diff --git a/source/Concepts.rst b/source/Concepts.rst index e5d80c879a8..fd9a0c7d465 100644 --- a/source/Concepts.rst +++ b/source/Concepts.rst @@ -80,7 +80,7 @@ It can be summarized as follows: Nodes will only establish connections with other nodes if they have compatible `Quality of Service <../Tutorials/Quality-of-Service>` settings. -Take the `talker-listener demo ` for example. +Take the `talker-listener demo ` for example. Running the C++ talker node in one terminal will publish messages on a topic, and the Python listener node running in another terminal will subscribe to messages on the same topic. diff --git a/source/Contributing/Build-Cop-and-Build-Farmer-Guide.rst b/source/Contributing/Build-Cop-and-Build-Farmer-Guide.rst index 9b2020e7b1f..a93c0839415 100644 --- a/source/Contributing/Build-Cop-and-Build-Farmer-Guide.rst +++ b/source/Contributing/Build-Cop-and-Build-Farmer-Guide.rst @@ -133,7 +133,7 @@ In each case different actions should be taken by the build cop: * Important failures: - * Failure should be reported on the PR introducing it by tagging the submitter + the reviewer the +1’d it. + * Failure should be reported on the PR introducing it by tagging the submitter + the reviewer that +1’d it. * Submitter has to either: * Address it the same week @@ -152,7 +152,7 @@ Tips * This is particularly useful for external repos such as Fast RTPS where old commits may get pushed to the master branch overnight, and are difficult to spot in the GitHub UI. -* Times displayed at the top of jenkins jobs are in UTC. You can convert the times with e.g.: +* Times displayed at the top of Jenkins jobs are in UTC. You can convert the times with e.g.: * https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=when+it's+9:25:12+PM+UTC+time+pst @@ -210,7 +210,7 @@ Build Farmer Tasks * Rationale - * Anybody logging into the machine need to know that no one is working on it + * Anybody logging into the machine needs to know that no one is working on it * If the machine reboots the machine needs to be in an operational state without local changes * Making sure install instructions are up to date @@ -250,7 +250,7 @@ If a node goes off-line: * For machines with VNC, you should try that first because many failures can be due to pop-up windows or required updates -* If you don’t have any pop-ups and relaunching the jenkins client doesn’t fix it, then you'll have to start troubleshooting. +* If you don’t have any pop-ups and relaunching the Jenkins client doesn’t fix it, then you'll have to start troubleshooting. * Looking at configuration difference between the nodes may be useful (java version, pip freeze, etc.) * For Linux nodes that have gone off-line (e.g. because of a reboot), they can be reconnected through the Jenkins web interface of that node diff --git a/source/Installation.rst b/source/Installation.rst index 79fb12009fa..029331657df 100644 --- a/source/Installation.rst +++ b/source/Installation.rst @@ -7,11 +7,15 @@ Installation :hidden: :glob: - Installation/Crystal - Installation/Dashing - Installation/Eloquent - Installation/Foxy - Installation/Rolling + Installation/Summary + Installation/Linux-Development-Setup + Installation/Linux-Install-Binary + Installation/Linux-Install-Debians + Installation/macOS-Development-Setup + Installation/macOS-Install-Binary + Installation/Windows-Development-Setup + Installation/Windows-Install-Binary + Installation/Fedora-Development-Setup Installation/Latest-Development-Setup Installation/Maintaining-a-Source-Checkout Installation/Prerelease-Testing @@ -26,13 +30,13 @@ We recommend using the most recent release available when possible. Select your ROS distribution ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -+---------------------------------------------------+--------------------------------------------------+------------------------------------------+ -| `ROS 2 Dashing Diademata ` | `ROS 2 Eloquent Elusor ` | `ROS 2 Foxy Fitzroy ` | -+---------------------------------------------------+--------------------------------------------------+------------------------------------------+ -| Released May 2019 | Released November 2019 | Released June 2020 | -+---------------------------------------------------+--------------------------------------------------+------------------------------------------+ -| Supported until May 2021 | Supported until November 2020 | Supported until May 2023 | -+---------------------------------------------------+--------------------------------------------------+------------------------------------------+ ++---------------------------------------------------------------------+--------------------------------------------------------------------+------------------------------------------------------------+ +| `ROS 2 Dashing Diademata <../dashing/Installation/Summary.html>`__ | `ROS 2 Eloquent Elusor <../eloquent/Installation/Summary.html>`__ | `ROS 2 Foxy Fitzroy <../foxy/Installation/Summary.html>`__ | ++---------------------------------------------------------------------+--------------------------------------------------------------------+------------------------------------------------------------+ +| Released May 2019 | Released November 2019 | Released June 2020 | ++---------------------------------------------------------------------+--------------------------------------------------------------------+------------------------------------------------------------+ +| Supported until May 2021 | Supported until November 2020 | Supported until May 2023 | ++---------------------------------------------------------------------+--------------------------------------------------------------------+------------------------------------------------------------+ For more detailed descriptions of each release see `REP-2000 `_ @@ -50,4 +54,3 @@ General users with no special considerations should use the most recent release Contributing to ROS 2 core? ^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you plan to contribute directly to ROS 2 core packages, you can install the `latest development from source ` which shares installation instructions with the `Rolling distribution `. - diff --git a/source/Installation/Crystal.rst b/source/Installation/Crystal.rst deleted file mode 100644 index 1f65479d70e..00000000000 --- a/source/Installation/Crystal.rst +++ /dev/null @@ -1,36 +0,0 @@ -Installing ROS 2 Crystal and earlier -==================================== - -.. toctree:: - :hidden: - :glob: - - Crystal/* - -Binary packages ---------------- - -We provide ROS 2 binary packages for the following platforms: - -* Linux (Ubuntu Xenial(16.04) and Ubuntu Bionic(18.04)) - - * `Debian packages ` - * `"fat" archive ` - -* `macOS ` -* `Windows ` - - -.. _building-from-source: - -Building from source --------------------- - -We support building ROS 2 from source on the following platforms: - - -* `Linux ` -* `macOS ` -* `Windows ` - -.. include:: _Install-Types.rst diff --git a/source/Installation/Crystal/Fedora-Development-Setup.rst b/source/Installation/Crystal/Fedora-Development-Setup.rst deleted file mode 100644 index 53bc24833b3..00000000000 --- a/source/Installation/Crystal/Fedora-Development-Setup.rst +++ /dev/null @@ -1,19 +0,0 @@ -Building ROS 2 on Fedora Linux -============================== - -How to setup the development environment? ------------------------------------------ - -First install a bunch of dependencies: - -.. code-block:: bash - - $ sudo dnf install cppcheck cmake libXaw-devel opencv-devel poco-devel poco-foundation python3-empy python3-devel python3-nose python3-pip python3-pyparsing python3-pytest python3-pytest-cov python3-pytest-runner python3-setuptools python3-yaml tinyxml-devel eigen3-devel python3-pydocstyle python3-pyflakes python3-coverage python3-mock python3-pep8 uncrustify python3-argcomplete python3-flake8 python3-flake8-import-order asio-devel tinyxml2-devel libyaml-devel python3-lxml - -Then install vcstool from pip: - -.. code-block:: bash - - $ pip3 install vcstool - -With this done, you can follow the rest of the `instructions ` to fetch and build ROS 2. diff --git a/source/Installation/Crystal/Linux-Development-Setup.rst b/source/Installation/Crystal/Linux-Development-Setup.rst deleted file mode 100644 index 34c0897222c..00000000000 --- a/source/Installation/Crystal/Linux-Development-Setup.rst +++ /dev/null @@ -1,231 +0,0 @@ -Building ROS 2 on Linux -======================= - -.. contents:: Table of Contents - :depth: 2 - :local: - - -System requirements -------------------- -Target platforms for Crystal Clemmys are (see `REP 2000 `__): - -- Tier 1: Ubuntu Linux - Bionic Beaver (18.04) 64-bit -- Tier 2: Ubuntu Linux - Xenial Xerus (16.04) 64-bit - -Tier 3 platforms (not actively tested or supported) include: - -- Debian Linux - Stretch (9) -- Fedora 26, see `alternate instructions ` -- Arch Linux, see `alternate instructions `__ -- OpenEmbedded / webOS OSE, see `alternate instructions `__ - -System setup ------------- - -Set locale -^^^^^^^^^^ -Make sure to set a locale that supports UTF-8. -If you are in a minimal environment such as a Docker container, the locale may be set to something minimal like POSIX. - -The following is an example for setting locale. -However, it should be fine if you're using a different UTF-8 supported locale. - -.. code-block:: bash - - sudo locale-gen en_US en_US.UTF-8 - sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 - export LANG=en_US.UTF-8 - -Add the ROS 2 apt repository -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. include:: ../_Apt-Repositories.rst - -Install development tools and ROS tools -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: bash - - sudo apt update && sudo apt install -y \ - build-essential \ - cmake \ - git \ - python3-colcon-common-extensions \ - python3-lark-parser \ - python3-pip \ - python-rosdep \ - python3-vcstool \ - wget - # install some pip packages needed for testing - python3 -m pip install -U \ - argcomplete \ - flake8 \ - flake8-blind-except \ - flake8-builtins \ - flake8-class-newline \ - flake8-comprehensions \ - flake8-deprecated \ - flake8-docstrings \ - flake8-import-order \ - flake8-quotes \ - pytest-repeat \ - pytest-rerunfailures \ - pytest \ - pytest-cov \ - pytest-runner \ - setuptools - # install Fast-RTPS dependencies - sudo apt install --no-install-recommends -y \ - libasio-dev \ - libtinyxml2-dev - -.. _linux-dev-get-ros2-code: - -Get ROS 2 code --------------- - -Create a workspace and clone all repos: - -.. code-block:: bash - - mkdir -p ~/ros2_crystal/src - cd ~/ros2_crystal - wget https://raw.githubusercontent.com/ros2/ros2/crystal/ros2.repos - vcs import src < ros2.repos - - -Install dependencies using rosdep ---------------------------------- - -.. code-block:: bash - - sudo rosdep init - rosdep update - # [Ubuntu 18.04] - rosdep install --from-paths src --ignore-src --rosdistro crystal -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 rti-connext-dds-5.3.1 urdfdom_headers" - # [Ubuntu 16.04] - rosdep install --from-paths src --ignore-src --rosdistro crystal -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 python3-lark-parser rti-connext-dds-5.3.1 urdfdom_headers" - python3 -m pip install -U lark-parser - -Install additional DDS implementations (optional) -------------------------------------------------- - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Build the code in the workspace -------------------------------- - -Note: to build the ROS 1 bridge, read the `ros1_bridge instructions `__. - -More info on working with a ROS workspace can be found in `this tutorial `. - -.. code-block:: bash - - cd ~/ros2_crystal/ - # On Ubuntu Linux Bionic Beaver 18.04 - colcon build --symlink-install - # On Ubuntu Linux Xenial Xerus 16.04 - colcon build --symlink-install --packages-ignore qt_gui_cpp rqt_gui_cpp - -Note: if you are having trouble compiling all examples and this is preventing you from completing a successful build, you can use ``AMENT_IGNORE`` in the same manner as `CATKIN_IGNORE `__ to ignore the subtree or remove the folder from the workspace. -Take for instance: you would like to avoid installing the large OpenCV library. -Well then simply ``$ touch AMENT_IGNORE`` in the ``cam2image`` demo directory to leave it out of the build process. - -Optionally install all packages into a combined directory (rather than each package in a separate subdirectory). -On Windows due to limitations of the length of environment variables you should use this option when building workspaces with many (~ >> 100 packages). - -Also, if you have already installed ROS 2 from Debian make sure that you run the ``build`` command in a fresh environment. You may want to make sure that you do not have ``source /opt/ros/${ROS_DISTRO}/setup.bash`` in your ``.bashrc``. - - -.. code-block:: bash - - colcon build --symlink-install --merge-install - -Afterwards source the ``local_setup.*`` from the ``install`` folder. - -Environment setup ------------------ - -Source the setup script -^^^^^^^^^^^^^^^^^^^^^^^ - -Set up your environment by sourcing the following file. - -.. code-block:: bash - - . ~/ros2_crystal/install/setup.bash - -Install argcomplete (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -ROS 2 command line tools use argcomplete to autocompletion. - -So if you want autocompletion, installing argcomplete is necessary. - -.. code-block:: bash - - sudo apt install python3-argcomplete - -Try some examples ------------------ - -In one terminal, source the setup file and then run a C++ ``talker``\ : - -.. code-block:: bash - - . ~/ros2_crystal/install/local_setup.bash - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``\ : - -.. code-block:: bash - - . ~/ros2_crystal/install/local_setup.bash - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -See the `tutorials and demos ` for other things to try. - -Alternate compilers -------------------- - -Using a different compiler besides gcc to compile ROS 2 is easy. If you set the environment variables ``CC`` and ``CXX`` to executables for a working C and C++ compiler, respectively, and retrigger CMake configuration (by using ``--force-cmake-config`` or by deleting the packages you want to be affected), CMake will reconfigure and use the different compiler. - -Clang -^^^^^ - -To configure CMake to detect and use Clang: - -.. code-block:: bash - - sudo apt install clang - export CC=clang - export CXX=clang++ - colcon build --cmake-force-configure - -TODO: using ThreadSanitizer, MemorySanitizer - -Stay up to date ---------------- - -See :ref:`MaintainingSource` to periodically refresh your source installation. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Crystal install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_crystal diff --git a/source/Installation/Crystal/Linux-Install-Binary.rst b/source/Installation/Crystal/Linux-Install-Binary.rst deleted file mode 100644 index c4029558c56..00000000000 --- a/source/Installation/Crystal/Linux-Install-Binary.rst +++ /dev/null @@ -1,174 +0,0 @@ -Installing ROS 2 on Linux -========================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -This page explains how to install ROS 2 on Linux from a pre-built binary package. - -There are also `Debian packages ` available. - -System Requirements -------------------- - -We support Ubuntu Linux Bionic Beaver (18.04) and Ubuntu Xenial Xerus (16.04) on 64-bit x86 and 64-bit ARM. - -Note: Ardent and beta versions supported Ubuntu Xenial Xerus 16.04. - -Add the ROS 2 apt repository ----------------------------- - -.. include:: ../_Apt-Repositories.rst - -Downloading ROS 2 ------------------ - - -* Go `the releases page `_ -* Download the latest package for Linux; let's assume that it ends up at ``~/Downloads/ros2-crystal-linux-x86_64.tar.bz2``. - - * Note: there may be more than one binary download option which might cause the file name to differ. - -* - Unpack it: - - .. code-block:: bash - - mkdir -p ~/ros2_crystal - cd ~/ros2_crystal - tar xf ~/Downloads/ros2-crystal-linux-x86_64.tar.bz2 - -Installing and initializing rosdep ----------------------------------- - -.. code-block:: bash - - sudo apt update - sudo apt install -y python-rosdep - sudo rosdep init # if already initialized you may continue - rosdep update - - -Installing the missing dependencies ------------------------------------ - -Set your rosdistro according to the release you downloaded. - -.. code-block:: bash - - CHOOSE_ROS_DISTRO=crystal # or bouncy - rosdep install --from-paths ros2-linux/share --ignore-src --rosdistro $CHOOSE_ROS_DISTRO -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 osrf_testing_tools_cpp poco_vendor rmw_connext_cpp rosidl_typesupport_connext_c rosidl_typesupport_connext_cpp rti-connext-dds-5.3.1 tinyxml_vendor tinyxml2_vendor urdfdom urdfdom_headers" - -#. *Optional*\ : if you want to use the ROS 1<->2 bridge, then you must also install ROS 1. - Follow the normal install instructions: https://wiki.ros.org/kinetic/Installation/Ubuntu - -Installing the python3 libraries -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: bash - - sudo apt install -y libpython3-dev - -Install additional DDS implementations (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Environment setup ------------------ - -Sourcing the setup script -^^^^^^^^^^^^^^^^^^^^^^^^^ - -Set up your environment by sourcing the following file. - -.. code-block:: bash - - . ~/ros2_crystal/ros2-linux/setup.bash - -Install argcomplete (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -ROS 2 command line tools use argcomplete to autocompletion. So if you want autocompletion, installing argcomplete is necessary. - -Ubuntu 18.04 -~~~~~~~~~~~~ - -.. code-block:: bash - - sudo apt install python3-argcomplete - -Ubuntu 16.04 (argcomplete >= 0.8.5) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To install ``argcomplete`` on Ubuntu 16.04 (Xenial), you'll need to use pip, because the version available through ``apt`` will not work due to a bug in that version of ``argcomplete``: - -.. code-block:: bash - - sudo apt install python3-pip - sudo pip3 install argcomplete - -Try some examples ------------------ - -In one terminal, source the setup file and then run a C++ ``talker``: - -.. code-block:: bash - - . ~/ros2_crystal/ros2-linux/setup.bash - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``: - -.. code-block:: bash - - . ~/ros2_crystal/ros2-linux/setup.bash - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -See the `tutorials and demos ` for other things to try. - -Using the ROS 1 bridge ----------------------- - -If you have ROS 1 installed, you can try the ROS 1 bridge, by first sourcing your ROS 1 setup file. -We'll assume that it is ``/opt/ros/melodic/setup.bash`` in the following. - -If you haven't already, start a roscore: - -.. code-block:: bash - - . /opt/ros/melodic/setup.bash - roscore - - -In another terminal, start the bridge: - -.. code-block:: bash - - . /opt/ros/melodic/setup.bash - . ~/ros2_crystal/ros2-linux/setup.bash - ros2 run ros1_bridge dynamic_bridge - -For more information on the bridge, read the `tutorial `__. - -Build your own packages ------------------------ - -If you would like to build your own packages, refer to the tutorial `"Using Colcon to build packages" `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Crystal install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_crystal diff --git a/source/Installation/Crystal/Linux-Install-Debians.rst b/source/Installation/Crystal/Linux-Install-Debians.rst deleted file mode 100644 index 0dbe2983bd6..00000000000 --- a/source/Installation/Crystal/Linux-Install-Debians.rst +++ /dev/null @@ -1,178 +0,0 @@ -Installing ROS 2 via Debian Packages -==================================== - -.. contents:: Table of Contents - :depth: 2 - :local: - -Debian packages for ROS 2 Crystal (the latest release) and ROS 2 Bouncy are available for Ubuntu Bionic; packages for ROS 2 Ardent are available for Ubuntu Xenial. - -Resources ---------- - -* Status Pages: - - * ROS 2 Crystal (Ubuntu Bionic): `amd64 `__\ , `arm64 `__ - * ROS 2 Bouncy (Ubuntu Bionic): `amd64 `__\ , `arm64 `__ - * ROS 2 Ardent (Ubuntu Xenial): `amd64 `__\ , `arm64 `__ -* `Jenkins Instance `__ -* `Repositories `__ - -.. _linux-install-debians-setup-sources: - -Setup Locale ------------- -Make sure you have a locale which supports ``UTF-8``. -If you are in a minimal environment, such as a docker container, the locale may be something minimal like POSIX. -We test with the following settings. -It should be fine if you're using a different UTF-8 supported locale. - -.. code-block:: bash - - sudo locale-gen en_US en_US.UTF-8 - sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 - export LANG=en_US.UTF-8 - -Setup Sources -------------- - -.. include:: ../_Apt-Repositories.rst - -Install ROS 2 packages ----------------------- - -First set an environment variable for the ROS 2 release you want to install so it can be used in other commands. - -.. code-block:: bash - - export CHOOSE_ROS_DISTRO=crystal # or bouncy or ardent - sudo apt update - -Desktop Install (Recommended): ROS, RViz, demos, tutorials. - -.. code-block:: bash - - sudo apt install ros-$CHOOSE_ROS_DISTRO-desktop - -ROS-Base Install (Bare Bones): Communication libraries, message packages, command line tools. No GUI tools. - -.. code-block:: bash - - sudo apt install ros-$CHOOSE_ROS_DISTRO-ros-base - -See specific sections below for how to also install the :ref:`ros1_bridge `, :ref:`TurtleBot packages `, or :ref:`alternative RMW packages `. - -Environment setup ------------------ - -Sourcing the setup script -^^^^^^^^^^^^^^^^^^^^^^^^^ - -Set up your environment by sourcing the following file. - -.. code-block:: bash - - source /opt/ros/crystal/setup.bash - -Install argcomplete (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -ROS 2 command line tools use argcomplete to autocompletion. So if you want autocompletion, installing argcomplete is necessary. - -Ubuntu 18.04 -~~~~~~~~~~~~ - -.. code-block:: bash - - sudo apt install python3-argcomplete - -Ubuntu 16.04 (argcomplete >= 0.8.5) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -To install ``argcomplete`` on Ubuntu 16.04 (Xenial), you'll need to use pip, because the version available through ``apt`` will not work due to a bug in that version of ``argcomplete``: - -.. code-block:: bash - - sudo apt install python3-pip - sudo pip3 install argcomplete - -Try some examples ------------------ - -In one terminal, set up the ROS 2 environment as described above and then run a C++ ``talker``: - -.. code-block:: bash - - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``: - -.. code-block:: bash - - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -See the `tutorials and demos ` for other things to try. - -.. _linux-install-additional-rmw-implementations: - -Install additional RMW implementations (optional) -------------------------------------------------- - -By default the RMW implementation ``Fast RTPS`` is used. -If using Ardent OpenSplice is also installed. - -To install support for OpenSplice or RTI Connext on Bouncy: - -.. code-block:: bash - - sudo apt update - sudo apt install ros-$CHOOSE_ROS_DISTRO-rmw-opensplice-cpp # for OpenSplice - sudo apt install ros-$CHOOSE_ROS_DISTRO-rmw-connext-cpp # for RTI Connext (requires license agreement) - -By setting the environment variable ``RMW_IMPLEMENTATION=rmw_opensplice_cpp`` you can switch to use OpenSplice instead. -For ROS 2 releases Bouncy and newer, ``RMW_IMPLEMENTATION=rmw_connext_cpp`` can also be selected to use RTI Connext. - -You can also install `the Connext DDS-Security plugins <../DDS-Implementations/Install-Connext-Security-Plugins>` or use the `University, purchase or evaluation <../DDS-Implementations/Install-Connext-University-Eval>` options for RTI Connext. - -.. _linux-ros1-add-pkgs: - -Install additional packages using ROS 1 packages ------------------------------------------------- - -The ``ros1_bridge`` as well as the TurtleBot demos are using ROS 1 packages. -To be able to install them please start by adding the ROS 1 sources as documented `here `__. - -If you're using Docker for isolation you can start with the image ``ros:melodic`` or ``osrf/ros:melodic-desktop`` (or Kinetic if using Ardent). -This will also avoid the need to setup the ROS sources as they will already be integrated. - -Now you can install the remaining packages: - -.. code-block:: bash - - sudo apt update - sudo apt install ros-$CHOOSE_ROS_DISTRO-ros1-bridge - -The turtlebot2 packages are available in Bouncy but not Crystal. - -.. code-block:: bash - - sudo apt install ros-$CHOOSE_ROS_DISTRO-turtlebot2-* - -Build your own packages ------------------------ - -If you would like to build your own packages, refer to the tutorial `"Using Colcon to build packages" `. - -Uninstall ---------- - -If you need to uninstall ROS 2 or switch to a source-based install once you -have already installed from binaries, run the following command: - -.. code-block:: bash - - sudo apt remove ros-crystal-* && sudo apt autoremove diff --git a/source/Installation/Crystal/Windows-Development-Setup.rst b/source/Installation/Crystal/Windows-Development-Setup.rst deleted file mode 100644 index 99aa4486106..00000000000 --- a/source/Installation/Crystal/Windows-Development-Setup.rst +++ /dev/null @@ -1,378 +0,0 @@ -Building ROS 2 on Windows -========================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -This guide is about how to setup a development environment for ROS 2 on Windows. - -Prerequisites -------------- - -First follow the steps for `Installing Prerequisites ` on the Binary Installation page. - -Stop and return here when you reach the "Downloading ROS 2" section. - -Additional prerequisites -^^^^^^^^^^^^^^^^^^^^^^^^ - -When building from source you'll need a few additional prerequisites installed. - -Install additional prerequisites from Chocolatey -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -First install git: - -.. code-block:: bash - - > choco install -y git - -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". -In the resulting dialog, click "Environment Variables", the click "Path" on the bottom pane, then click "Edit" and add the path). - -Then install ``patch``: - -.. code-block:: bash - - > choco install -y patch - -You may need to close the cmd prompt and open a new one, but at this point you should be able to run ``git``\ , ``python``\ , ``cmake``\ , and ``patch.exe --version``. - -Install developer tools ------------------------ - -Now we are ready to install some our tools that we use to help in developing ROS 2. - -Let's start with ``vcstool``: - -.. code-block:: bash - - > pip install -U vcstool - -You can test it out by just running ``vcs`` (you should be able to do this in the same cmd prompt). - -Next, install ``colcon``: - -.. code-block:: bash - - > pip install -U colcon-common-extensions - -You can test it out by just running ``colcon`` (you should be able to do this in the same cmd prompt). - -Also, you should install ``curl``: - -.. code-block:: bash - - > choco install -y curl - -Install dependencies --------------------- - -Next install the latest version of ``setuptools`` and ``pip``: - -.. code-block:: bash - - > -m pip install -U setuptools pip - -Where ``PATH_TO_PYTHON_EXECUTABLE`` looks like: ``c:\python37\python.exe`` - -Then you can continue installing other Python dependencies: - -.. code-block:: bash - - > pip install -U catkin_pkg EmPy lark-parser pyparsing pyyaml - -Next install testing tools like ``pytest`` and others: - -.. code-block:: bash - - > pip install -U pytest coverage mock - -Next install linters and checkers like ``flake8`` and others: - -.. code-block:: bash - - > pip install -U flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes pep8 pydocstyle - -Next install cppcheck: - -.. code-block:: bash - - > choco install -y cppcheck - -You will need to add ``C:\Program Files\Cppcheck`` to the ``PATH``. - -Next install xmllint: - -* Download the `64 bit binary archives `__ of ``libxml2`` (and its dependencies ``iconv`` and ``zlib``) from https://www.zlatkovic.com/projects/libxml/ -* Unpack all archives into e.g. ``C:\xmllint`` -* Add ``C:\xmllint\bin`` to the ``PATH``. - -Install Qt5 -^^^^^^^^^^^ - -This section is only required if you are building rviz, but it comes with our default set of sources, so if you don't know, then assume you are building it. - -First get the installer from Qt's website: - -https://www.qt.io/download - -Select the Open Source version and then the ``Qt Online Installer for Windows``. - -Run the installer and install Qt5. -We recommend you install it to the default location of ``C:\Qt``, but if you choose somewhere else, make sure to update the paths below accordingly. -When selecting components to install, the only thing you absolutely need for bouncy and later is the appropriate MSVC 64-bit component under the ``Qt`` -> ``Qt 5.10.0`` tree. -We're using ``5.10.0`` as of the writing of this document and that's what we recommend since that's all we test on Windows, but later version will probably work too. -For bouncy and later, be sure to select ``MSVC 2017 64-bit``. For ardent use ``MSVC 2015 64-bit``. -After that, the default settings are fine. - -Finally, set the ``Qt5_DIR`` environment variable in the ``cmd.exe`` where you intend to build so that CMake can find it: - -.. code-block:: bash - - > set Qt5_DIR=C:\Qt\5.10.0\msvc2017_64 - : You could set it permanently with ``setx -m Qt5_DIR C:\Qt\5.10.0\msvc2017_64`` instead, but that requires Administrator. - -.. note:: - - This path might change based on which MSVC version you're using or if you installed it to a different directory. - -RQt dependencies -~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - > pip install -U pydot PyQt5 - -Get the ROS 2 code ------------------- - -Now that we have the development tools we can get the ROS 2 source code. - -First setup a development folder, for example ``C:\dev\ros2_crystal``: - -.. code-block:: bash - - > md \dev\ros2_crystal\src - > cd \dev\ros2_crystal - -Get the ``ros2.repos`` file which defines the repositories to clone from: - -.. code-block:: bash - - # CMD - > curl -sk https://raw.githubusercontent.com/ros2/ros2/crystal/ros2.repos -o ros2.repos - - # PowerShell - > curl https://raw.githubusercontent.com/ros2/ros2/crystal/ros2.repos -o ros2.repos - -Next you can use ``vcs`` to import the repositories listed in the ``ros2.repos`` file: - -.. code-block:: bash - - # CMD - > vcs import src < ros2.repos - - # PowerShell - > vcs import --input ros2.repos src - -Install additional DDS implementations (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Build the ROS 2 Code --------------------- - -.. _windows-dev-build-ros2: - -To build ROS 2 you will need a Visual Studio Command Prompt (usually titled "x64 Native Tools Command Prompt for VS 2017" for bouncy and later or "x64 Native Tools Command Prompt for VS 2015" for ardent and earlier) running as Administrator. - -Fast RTPS is bundled with the ROS 2 source and will always be built unless you put an ``AMENT_IGNORE`` file in the ``src\eProsima`` folder. - -To build the ``\dev\ros2_crystal`` folder tree: - -.. code-block:: bash - - > colcon build --merge-install - -.. note:: - - We're using ``--merge-install`` here to avoid a ``PATH`` variable that is too long at the end of the build. If you're adapting these instructions to build a smaller workspace then you might be able to use the default behavior which is isolated install, i.e. where each package is installed to a different folder. - -.. note:: - - If you are doing a debug build use ``python_d path\to\colcon_executable`` ``colcon``. - See `Extra stuff for debug mode`_ for more info on running Python code in debug builds on Windows. - -Environment setup ------------------ - -Start a command shell and source the ROS 2 setup file to set up the workspace: - -.. code-block:: bash - - > call C:\dev\ros2_crystal\install\local_setup.bat - -This will automatically set up the environment for any DDS vendors that support was built for. - -It is normal that the previous command, if nothing else went wrong, outputs "The system cannot find the path specified." exactly once. - -Test and run ------------- - -Note that the first time you run any executable you will have to allow access to the network through a Windows Firewall popup. - -You can run the tests using this command: - -.. code-block:: bash - - > colcon test --merge-install - -.. note:: - - ``--merge-install`` should only be used if it was also used in the build step. - -Afterwards you can get a summary of the tests using this command: - -.. code-block:: bash - - > colcon test-result - -To run the examples, first open a clean new ``cmd.exe`` and set up the workspace by sourcing the ``local_setup.bat`` file. -Then, run a C++ ``talker``\ : - -.. code-block:: bash - - > call install\local_setup.bat - > ros2 run demo_nodes_cpp talker - -In a separate shell you can do the same, but instead run a Python ``listener``\ : - -.. code-block:: bash - - > call install\local_setup.bat - > ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -See the `tutorials and demos ` for other things to try. - -.. note:: - - It is not recommended to build in the same cmd prompt that you've sourced the ``local_setup.bat``. - -Extra stuff for Debug mode --------------------------- - -If you want to be able to run all the tests in Debug mode, you'll need to install a few more things: - - -* To be able to extract the Python source tarball, you can use PeaZip: - -.. code-block:: bash - - > choco install -y peazip - - -* You'll also need SVN, since some of the Python source-build dependencies are checked out via SVN: - -.. code-block:: bash - - > choco install -y svn hg - - -* You'll need to quit and restart the command prompt after installing the above. -* Get and extract the Python 3.7.4 source from the ``tgz``: - - * https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz - * To keep these instructions concise, please extract it to ``C:\dev\Python-3.7.4`` - -* Now, build the Python source in debug mode from a Visual Studio command prompt: - -.. code-block:: bash - - > cd C:\dev\Python-3.7.4\PCbuild - > get_externals.bat - > build.bat -p x64 -d - - -* Finally, copy the build products into the Python37 installation directories, next to the Release-mode Python executable and DLL's: - -.. code-block:: bash - - > cd C:\dev\Python-3.7.4\PCbuild\amd64 - > copy python_d.exe C:\Python37 /Y - > copy python37_d.dll C:\Python37 /Y - > copy python3_d.dll C:\Python37 /Y - > copy python37_d.lib C:\Python37\libs /Y - > copy python3_d.lib C:\Python37\libs /Y - > for %I in (*_d.pyd) do copy %I C:\Python37\DLLs /Y - - -* Now, from a fresh command prompt, make sure that ``python_d`` works: - -.. code-block:: bash - - > python_d - > import _ctypes - - -* To create executables python scripts(.exe), python_d should be used to invoke colcon - -.. code-block:: bash - - > python_d path\to\colcon_executable build - -* Hooray, you're done! - -SROS2 Debug Mode -^^^^^^^^^^^^^^^^ - -In order to use SROS2 in Debug mode on Windows, a corresponding debug build for ``lxml`` must be installed. - -* A pre-built Python wheel binary for ``lxml`` debug is provided, to install: - -.. code-block:: bash - - > pip install https://github.com/ros2/ros2/releases/download/lxml-archives/lxml-4.3.2-cp37-cp37dm-win_amd64.whl - -* To verify installation - -.. code-block:: bash - - > python_d - > from lxml import etree - -* No import errors should appear. - -* Note, in order to switch back to release, reinstall the release wheel of lxml via pip: - -.. code-block:: bash - - > pip install lxml - -Stay up to date ---------------- - -See :ref:`MaintainingSource` to periodically refresh your source installation. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Crystal install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rmdir /s /q \ros2_crystal diff --git a/source/Installation/Crystal/Windows-Install-Binary.rst b/source/Installation/Crystal/Windows-Install-Binary.rst deleted file mode 100644 index 4eb51c32409..00000000000 --- a/source/Installation/Crystal/Windows-Install-Binary.rst +++ /dev/null @@ -1,236 +0,0 @@ -Installing ROS 2 on Windows -=========================== - -.. contents:: Table of Contents - :depth: 2 - :local: - -This page explains how to install ROS 2 on Windows from a pre-built binary package. - -System requirements -------------------- - -Only Windows 10 is supported. - -.. _windows-install-binary-installing-prerequisites: - -Installing prerequisites ------------------------- - -Install Chocolatey -^^^^^^^^^^^^^^^^^^ - -Chocolatey is a package manager for Windows, install it by following their installation instructions: - -https://chocolatey.org/ - -You'll use Chocolatey to install some other developer tools. - -Install Python -^^^^^^^^^^^^^^ - -Open a Command Prompt and type the following to install Python via Chocolatey: - -.. code-block:: bash - - > choco install -y python - -Install OpenSSL -^^^^^^^^^^^^^^^ - -Download an OpenSSL installer from `this page `__. Scroll to the bottom of the page and download *Win64 OpenSSL v1.0.2*. Don't download the Win32 or Light versions. - -Run the installer with default parameters. The following commands assume you used the default installation directory: - -* ``setx -m OPENSSL_CONF C:\OpenSSL-Win64\bin\openssl.cfg`` - -You will need to append the OpenSSL-Win64 bin folder to your PATH. -You can do this by clicking the Windows icon, typing "Environment Variables", then clicking on "Edit the system environment variables". -In the resulting dialog, click "Environment Variables", then click "Path" on the bottom pane, finally click "Edit" and add the path below. - -* ``C:\OpenSSL-Win64\bin\`` - -Install Visual Studio -^^^^^^^^^^^^^^^^^^^^^ - -**A. Install Visual Studio 2015 if using Ardent or earlier** - - If you already have a paid version of Visual Studio 2015 (Professional, Enterprise), skip this step. - - Microsoft provides a free of charge version of Visual Studio 2015, named Community, which can be used to build applications that use ROS 2: - - https://www.visualstudio.com/vs/older-downloads/ - - Make sure that the Visual C++ features are installed. First choose 'Custom installation': - - .. image:: https://i.imgur.com/tUcOMOA.png - - Next check Visual C++: - - .. image:: https://i.imgur.com/yWVEUkm.png - - Ensure that the correct features will be installed: - - .. image:: https://i.imgur.com/VxdbA7G.png - - -**B. Install Visual Studio 2017 if using Bouncy or a nightly** - - If you already have a paid version of Visual Studio 2017 (Professional, Enterprise), skip this step. - -.. warning:: Visual Studio 2017 v15.8 seems to have a compiler bug preventing from building some ROS 2 packages. Please try installing an older version of Visual Studio 2017. - - Microsoft provides a free of charge version of Visual Studio 2017, named Community, which can be used to build applications that use ROS 2: - - https://visualstudio.microsoft.com/downloads/ - - Make sure that the Visual C++ features are installed. - An easy way to make sure they're installed is to select the ``Desktop development with C++`` workflow during the install. - - .. image:: https://i.imgur.com/2h0IxCk.png - - -Install additional DDS implementations (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Install OpenCV -^^^^^^^^^^^^^^ - -Some of the examples require OpenCV to be installed. - -You can download a precompiled version of OpenCV 3.4.1 from https://github.com/ros2/ros2/releases/download/opencv-archives/opencv-3.4.1-vc15.VS2017.zip - -Assuming you unpacked it to ``C:\opencv``\ , type the following on a Command Prompt (requires Admin privileges): - -.. code-block:: bash - - setx -m OpenCV_DIR C:\opencv - -Since you are using a precompiled ROS version, we have to tell it where to find the OpenCV libraries. You have to extend the ``PATH`` variable to ``c:\opencv\x64\vc15\bin`` - -In ardent and earlier -~~~~~~~~~~~~~~~~~~~~~ - -These releases used OpenCV 2. You can download a precompiled version of OpenCV 2.4.13.2 from https://github.com/ros2/ros2/releases/download/release-beta2/opencv-2.4.13.2-vc14.VS2015.zip - -Since you are using a precompiled ROS version, we have to tell it where to find the OpenCV libraries. Assuming you were extracting OpenCV to ``c:\`` you have to extend your ``PATH`` variable to ``c:\opencv-2.4.13.2-vc14.VS2015\x64\vc14\bin`` - -Install dependencies -^^^^^^^^^^^^^^^^^^^^ - -There are a few dependencies not available in the Chocolatey package database. In order to ease the manual installation process, we provide the necessary Chocolatey packages. - -As some chocolatey packages rely on it, we start by installing CMake - -.. code-block:: bash - - > choco install -y cmake - -You will need to append the CMake bin folder ``C:\Program Files\CMake\bin`` to your PATH. - -Please download these packages from `this `__ GitHub repository. - - -* asio.1.12.1.nupkg -* eigen-3.3.4.nupkg -* tinyxml-usestl.2.6.2.nupkg -* tinyxml2.6.0.0.nupkg -* log4cxx.0.10.0.nupkg - -Once these packages are downloaded, open an administrative shell and execute the following command: - -.. code-block:: bash - - > choco install -y -s asio eigen tinyxml-usestl tinyxml2 log4cxx - -Please replace ```` with the folder you downloaded the packages to. - -You must also install some python dependencies for command-line tools: - -.. code-block:: bash - - python -m pip install -U catkin_pkg empy lark-parser opencv-python pyparsing pyyaml setuptools - -RQt dependencies -~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - python -m pip install -U pydot PyQt5 - -SROS2 dependencies -~~~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - python -m pip install -U lxml - -Downloading ROS 2 ------------------ - - -* Go the releases page: https://github.com/ros2/ros2/releases -* Download the latest package for Windows, e.g., ``ros2-package-windows-AMD64.zip``. - - * Notes: - - * there may be more than one binary download option which might cause the file name to differ. - * [ROS Bouncy only] To download the ROS 2 debug libraries you'll need to download ``ros2-bouncy-windows-Debug-AMD64.zip`` - -* Unpack the zip file somewhere (we'll assume ``C:\dev\ros2_crystal``\ ). - - * Note (Ardent and earlier): There seems to be an issue where extracting the zip file with 7zip causes RViz to crash on startup. Extract the zip file using the Windows explorer to prevent this. - -Environment setup ------------------ - -Start a command shell and source the ROS 2 setup file to set up the workspace: - -.. code-block:: bash - - > call C:\dev\ros2_crystal\local_setup.bat - -Try some examples ------------------ - -In a command shell, set up the ROS 2 environment as described above and then run a C++ ``talker``\ : - -.. code-block:: bash - - > ros2 run demo_nodes_cpp talker - -Start another command shell and run a Python ``listener``\ : - -.. code-block:: bash - - > ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -See the `tutorials and demos ` for other things to try. - -Build your own packages ------------------------ - -If you would like to build your own packages, refer to the tutorial `"Using Colcon to build packages" `. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Crystal install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rmdir /s /q \ros2_crystal diff --git a/source/Installation/Crystal/macOS-Development-Setup.rst b/source/Installation/Crystal/macOS-Development-Setup.rst deleted file mode 100644 index 8ad51e6a82b..00000000000 --- a/source/Installation/Crystal/macOS-Development-Setup.rst +++ /dev/null @@ -1,193 +0,0 @@ -.. redirect-from:: - - Installation/Crystal/OSX-Development-Setup - -Building ROS 2 on macOS -======================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -System requirements -------------------- - -We support macOS 10.12.x. - -However, some new versions like 10.13.x and some older versions like 10.11.x and 10.10.x are known to work as well. - -Install prerequisites ---------------------- - -You need the following things installed to build ROS 2: - - -#. - **Xcode** - - - * - If you don't already have it installed, install Xcode and the Command Line Tools: - - .. code-block:: bash - - xcode-select --install - -#. - **brew** *(needed to install more stuff; you probably already have this)*: - - - * Follow installation instructions at http://brew.sh/ - * - *Optional*: Check that ``brew`` is happy with your system configuration by running: - - .. code-block:: bash - - brew doctor - - Fix any problems that it identifies. - -#. - You also need a Java runtime installed, which you can get `here `__. - - -#. - Use ``brew`` to install more stuff: - - .. code-block:: bash - - brew install cmake cppcheck eigen pcre poco python3 tinyxml wget - - # install dependencies for Fast-RTPS if you are using it - brew install asio tinyxml2 - - brew install opencv - - # install dependencies for rcl_logging_log4cxx - brew install log4cxx - -#. - Install rviz dependencies - - .. code-block:: bash - - # install dependencies for Rviz - brew install qt freetype assimp - - # Add the Qt directory to the PATH and CMAKE_PREFIX_PATH - export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/usr/local/opt/qt - export PATH=$PATH:/usr/local/opt/qt/bin - -#. - Use ``python3 -m pip`` (just ``pip`` may install Python3 or Python2) to install more stuff: - - .. code-block:: bash - - python3 -m pip install argcomplete catkin_pkg colcon-common-extensions coverage empy flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes lark-parser mock nose pep8 pydocstyle pyparsing setuptools vcstool - -#. - *Optional*: if you want to build the ROS 1<->2 bridge, then you must also install ROS 1: - - - * Start with the normal install instructions: https://wiki.ros.org/kinetic/Installation/OSX/Homebrew/Source - * - When you get to the step where you call ``rosinstall_generator`` to get the source code, here's an alternate invocation that brings in just the minimum required to produce a useful bridge: - - .. code-block:: bash - - rosinstall_generator catkin common_msgs roscpp rosmsg --rosdistro kinetic --deps --wet-only --tar > kinetic-ros2-bridge-deps.rosinstall - wstool init -j8 src kinetic-ros2-bridge-deps.rosinstall - - - Otherwise, just follow the normal instructions, then source the resulting ``install_isolated/setup.bash`` before proceeding here to build ROS 2. - -Disable System Integrity Protection (SIP) ------------------------------------------ - -macOS/OS X versions >=10.11 have System Integrity Protection enabled by default. -So that SIP doesn't prevent processes from inheriting dynamic linker environment variables, such as ``DYLD_LIBRARY_PATH``, you'll need to disable it `following these instructions `__. - -Get the ROS 2 code ------------------- - -Create a workspace and clone all repos: - -.. code-block:: bash - - mkdir -p ~/ros2_crystal/src - cd ~/ros2_crystal - wget https://raw.githubusercontent.com/ros2/ros2/crystal/ros2.repos - vcs import src < ros2.repos - -Install additional DDS vendors (optional) ------------------------------------------ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Build the ROS 2 code --------------------- - -**Note**\ : if you are trying to build the ROS 1 <-> ROS 2 bridge, follow instead these `modified instructions `__. - -Run the ``colcon`` tool to build everything (more on using ``colcon`` in `this tutorial `): - -.. code-block:: bash - - cd ~/ros2_crystal/ - colcon build --symlink-install - -Environment setup ------------------ - -Source the ROS 2 setup file: - -.. code-block:: bash - - . ~/ros2_crystal/install/setup.bash - -This will automatically set up the environment for any DDS vendors that support was built for. - -Try some examples ------------------ - -In one terminal, set up the ROS 2 environment as described above and then run a C++ ``talker``: - -.. code-block:: bash - - . ~/ros2_crystal/install/setup.bash - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``: - -.. code-block:: bash - - . ~/ros2_crystal/install/setup.bash - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -See the `tutorials and demos ` for other things to try. - -Stay up to date ---------------- - -See :ref:`MaintainingSource` to periodically refresh your source installation. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Crystal install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_crystal diff --git a/source/Installation/Crystal/macOS-Install-Binary.rst b/source/Installation/Crystal/macOS-Install-Binary.rst deleted file mode 100644 index c1d7beaeb76..00000000000 --- a/source/Installation/Crystal/macOS-Install-Binary.rst +++ /dev/null @@ -1,171 +0,0 @@ -.. redirect-from:: - - Installation/Crystal/OSX-Install-Binary - -Installing ROS 2 on macOS -========================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -This page explains how to install ROS 2 on macOS from a pre-built binary package. - -System requirements -------------------- - -We support OS X El Capitan and macOS Sierra (10.11.x and 10.12.x). - -.. _osx-install-binary-installling-prerequisites: - -Installing prerequisites ------------------------- - -You need the following things installed before installing ROS 2. - - -* - **brew** *(needed to install more stuff; you probably already have this)*: - - - * Follow installation instructions at http://brew.sh/ - * - *Optional*: Check that ``brew`` is happy with your system configuration by running: - - .. code-block:: bash - - brew doctor - - - Fix any problems that it identifies. - -* - Use ``brew`` to install more stuff: - - .. code-block:: bash - - brew install python3 - - # install asio and tinyxml2 for Fast-RTPS - brew install asio tinyxml2 - - # install dependencies for robot state publisher - brew install tinyxml eigen pcre poco - - # OpenCV isn't a dependency of ROS 2, but it is used by some demos. - brew install opencv - - # install OpenSSL for DDS-Security - brew install openssl - - # install Qt for RViz - brew install qt freetype assimp - - # install dependencies for rcl_logging_log4cxx - brew install log4cxx - -* - Install rqt dependencies - - ``brew install sip pyqt5`` - - Fix some path names when looking for sip stuff during install (see `ROS 1 wiki `__): - - ``ln -s /usr/local/share/sip/Qt5 /usr/local/share/sip/PyQt5`` - - ``brew install graphviz`` - - ``python3 -m pip install pygraphviz pydot`` - -* - Install SROS2 dependencies - - ``python3 -m pip install lxml`` - -* - Install additional runtime dependencies for command-line tools: - - .. code-block:: bash - - python3 -m pip install catkin_pkg empy lark-parser pyparsing pyyaml setuptools argcomplete - -Disable System Integrity Protection (SIP) ------------------------------------------ - -macOS/OS X versions >=10.11 have System Integrity Protection enabled by default. -So that SIP doesn't prevent processes from inheriting dynamic linker environment variables, such as ``DYLD_LIBRARY_PATH``, you'll need to disable it `following these instructions `__. - -Downloading ROS 2 ------------------ - - -* Go to the releases page: https://github.com/ros2/ros2/releases -* Download the latest package for macOS; let's assume that it ends up at ``~/Downloads/ros2-release-distro-date-macos-amd64.tar.bz2``. - - * Note: there may be more than one binary download option which might cause the file name to differ. - -* - Unpack it: - - .. code-block:: bash - - mkdir -p ~/ros2_crystal - cd ~/ros2_crystal - tar xf ~/Downloads/ros2-release-distro-date-macos-amd64.tar.bz2 - -Install additional DDS implementations (optional) -------------------------------------------------- - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Environment setup ------------------ - -Source the ROS 2 setup file: - -.. code-block:: bash - - . ~/ros2_crystal/ros2-osx/setup.bash - -Try some examples ------------------ - -In one terminal, set up the ROS 2 environment as described above and then run a C++ ``talker``: - -.. code-block:: bash - - ros2 run demo_nodes_cpp talker - -In another terminal, set up the ROS 2 environment and then run a Python ``listener``: - -.. code-block:: bash - - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -See the `tutorials and demos ` for other things to try. - -Build your own packages ------------------------ - -If you would like to build your own packages, refer to the tutorial `"Using Colcon to build packages" `. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Crystal install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_crystal diff --git a/source/Installation/DDS-Implementations.rst b/source/Installation/DDS-Implementations.rst index 15a62335873..74d5edfd096 100644 --- a/source/Installation/DDS-Implementations.rst +++ b/source/Installation/DDS-Implementations.rst @@ -1,9 +1,11 @@ -Install DDS implementations -=========================== +Installing DDS implementations +============================== By default, ROS 2 uses DDS as its `middleware `__. It is compatible with multiple DDS or RTPS (the DDS wire protocol) vendors. -There is currently support for eProsima Fast RTPS, ADLINK's OpenSplice, RTI's Connext DDS and Eclipse Cyclone DDS. +There is currently support for eProsima's Fast RTPS, RTI's Connext DDS and Eclipse Cyclone DDS. +ADLINK's OpenSplice is no longer supported as of Foxy. +See https://ros.org/reps/rep-2000.html for supported DDS vendors by distribution. For distros before Eloquent, the only bundled vendor is eProsima's Fast RTPS. Since Eloquent, both Fast RTPS and Cyclone DDS are bundled, but Fast RTPS is still the default. @@ -29,21 +31,6 @@ Detailed instructions for installing other DDS vendors are provided below. Linux source install -------------------- -ADLINK OpenSplice Debian Packages built by OSRF -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. tabs:: - - .. group-tab:: Foxy and newer - - OpenSplice is no longer supported as of Foxy. See https://ros.org/reps/rep-2000.html for supported DDS vendors. - - .. group-tab:: Eloquent and older - - .. code-block:: bash - - sudo apt install libopensplice69 # from packages.ros.org/ros2/ubuntu - RTI Connext (version 5.3.1, amd64 only) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -97,21 +84,6 @@ Now you can build as normal and support for RTI will be built as well. Linux binary install -------------------- -ADLINK OpenSplice -^^^^^^^^^^^^^^^^^ - -.. tabs:: - - .. group-tab:: Foxy and newer - - OpenSplice is no longer supported as of Foxy. See https://ros.org/reps/rep-2000.html for supported DDS vendors. - - .. group-tab:: Eloquent and older - - .. code-block:: bash - - sudo apt install libopensplice69 # from packages.ros.org/ros2/ubuntu - RTI Connext (version 5.3.1, amd64 only) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -146,25 +118,6 @@ If you want to install the Connext DDS-Security plugins please refer to `this pa OSX source install ------------------ -ADLINK OpenSplice -^^^^^^^^^^^^^^^^^ - -.. tabs:: - - .. group-tab:: Foxy and newer - - OpenSplice is no longer supported as of Foxy. See https://ros.org/reps/rep-2000.html for supported DDS vendors. - - .. group-tab:: Eloquent and older - - To install OpenSplice, download the latest supported release from https://github.com/ADLINK-IST/opensplice/releases and unpack it. - - Source the ``release.com`` file provided to set up the environment before building your ROS 2 workspace, e.g.: - - .. code-block:: bash - - source /x86_64.darwin10_clang/release.com - RTI Connext (5.3) ^^^^^^^^^^^^^^^^^ @@ -192,19 +145,6 @@ If you want to install the Connext DDS-Security plugins please refer to `this pa OSX binary install ------------------ -Enable OpenSplice support -^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. tabs:: - - .. group-tab:: Foxy and newer - - OpenSplice is no longer supported as of Foxy. See https://ros.org/reps/rep-2000.html for supported DDS vendors. - - .. group-tab:: Eloquent and older - - Download the latest release from https://github.com/ADLINK-IST/opensplice/releases and unpack it. - Set the ``OSPL_HOME`` environment variable to the unpacked directory that contains the ``release.com`` script. Enable Connext support ^^^^^^^^^^^^^^^^^^^^^^ @@ -226,26 +166,6 @@ If you want to install the Connext DDS-Security plugins please refer to `this pa Windows source install ---------------------- -ADLINK OpenSplice -^^^^^^^^^^^^^^^^^ - -.. tabs:: - - .. group-tab:: Foxy and newer - - OpenSplice is no longer supported as of Foxy. See https://ros.org/reps/rep-2000.html for supported DDS vendors. - - .. group-tab:: Eloquent and older - - If you would like to also build against OpenSplice, you will need to first download the latest version of `OpenSplice `__. - Then run something like the following command before building ROS 2, to set up the OpenSplice environment: - - .. code-block:: bash - - call "C:\opensplice69\HDE\x86_64.win64\release.bat" - - Where the exact paths may need to be slightly altered depending on where you selected to install OpenSplice. - RTI Connext 5.3 ^^^^^^^^^^^^^^^ @@ -267,21 +187,6 @@ If you want to install the Connext DDS-Security plugins please refer to `this pa Windows binary install ---------------------- -ADLINK OpenSplice -^^^^^^^^^^^^^^^^^ - -.. tabs:: - - .. group-tab:: Foxy and newer - - OpenSplice is no longer supported as of Foxy. See https://ros.org/reps/rep-2000.html for supported DDS vendors. - - .. group-tab:: Eloquent and older - - If you want to use OpenSplice, you will need to download the `latest supported version `__. - Version 6.9.190403OSS-HDE-x86_64.win-vs2017 or later is required. - - After unpacking, set the ``OSPL_HOME`` environment variable so that it points to the directory that contains the ``release.bat`` script. RTI Connext ^^^^^^^^^^^ diff --git a/source/Installation/DDS-Implementations/Working-with-Eclipse-CycloneDDS.rst b/source/Installation/DDS-Implementations/Working-with-Eclipse-CycloneDDS.rst index 9eec3025c50..7e7c076eb79 100644 --- a/source/Installation/DDS-Implementations/Working-with-Eclipse-CycloneDDS.rst +++ b/source/Installation/DDS-Implementations/Working-with-Eclipse-CycloneDDS.rst @@ -19,11 +19,10 @@ Install packages ---------------- The easiest way is to install from ROS 2 apt repository. -``${ROS_DISTRO}`` should be your ROS 2 version. .. code-block:: bash - sudo apt install ros-${ROS_DISTRO}-rmw-cyclonedds-cpp + sudo apt install ros-rolling-rmw-cyclonedds-cpp Build from source code ---------------------- diff --git a/source/Installation/Dashing.rst b/source/Installation/Dashing.rst deleted file mode 100644 index 31031f265fb..00000000000 --- a/source/Installation/Dashing.rst +++ /dev/null @@ -1,36 +0,0 @@ -Installing ROS 2 Dashing Diademata -================================== - -.. toctree:: - :hidden: - :glob: - - Dashing/* - -Binary packages ---------------- - -We provide ROS 2 binary packages for the following platforms: - -* Linux (Ubuntu Bionic(18.04)) - - * `Debian packages ` - * `"fat" archive ` - -* `macOS ` -* `Windows ` - - -.. _Dashing_building-from-source: - -Building from source --------------------- - -We support building ROS 2 from source on the following platforms: - - -* `Linux ` -* `macOS ` -* `Windows ` - -.. include:: _Install-Types.rst diff --git a/source/Installation/Dashing/Fedora-Development-Setup.rst b/source/Installation/Dashing/Fedora-Development-Setup.rst deleted file mode 100644 index c8efabfe692..00000000000 --- a/source/Installation/Dashing/Fedora-Development-Setup.rst +++ /dev/null @@ -1,56 +0,0 @@ -Building ROS 2 on Fedora Linux -============================== - -How to setup the development environment? ------------------------------------------ - -The following system dependencies are required to build ROS 2 on Fedora. They can be installed with ``dnf`` as follows: - -.. code-block:: bash - - $ sudo dnf install \ - asio-devel \ - cmake \ - cppcheck \ - eigen3-devel \ - gcc-c++ \ - liblsan \ - libXaw-devel \ - libyaml-devel \ - make \ - opencv-devel \ - patch \ - python3-argcomplete \ - python3-colcon-common-extensions \ - python3-coverage \ - python3-devel \ - python3-empy \ - python3-lark-parser \ - python3-lxml \ - python3-mock \ - python3-nose \ - python3-pep8 \ - python3-pip \ - python3-pydocstyle \ - python3-pyflakes \ - python3-pyparsing \ - python3-pytest \ - python3-pytest-cov \ - python3-pytest-runner \ - python3-rosdep \ - python3-setuptools \ - python3-vcstool \ - python3-yaml \ - poco-devel \ - poco-foundation \ - python3-flake8 \ - python3-flake8-import-order \ - redhat-rpm-config \ - tinyxml-devel \ - tinyxml2-devel \ - uncrustify \ - wget - - -With this done, you can follow the rest of the `instructions ` to fetch and build ROS 2. - diff --git a/source/Installation/Dashing/Linux-Development-Setup.rst b/source/Installation/Dashing/Linux-Development-Setup.rst deleted file mode 100644 index 80eb15a1974..00000000000 --- a/source/Installation/Dashing/Linux-Development-Setup.rst +++ /dev/null @@ -1,214 +0,0 @@ -Building ROS 2 on Linux -======================= - -.. contents:: Table of Contents - :depth: 2 - :local: - - -System requirements -------------------- -Target platforms for Dashing Diademata are (see `REP 2000 `__): - -- Tier 1: Ubuntu Linux - Bionic Beaver (18.04) 64-bit - -Tier 3 platforms (not actively tested or supported) include: - -- Debian Linux - Stretch (9) -- Fedora 30, see `alternate instructions ` -- Arch Linux, see `alternate instructions `__ -- OpenEmbedded / webOS OSE, see `alternate instructions `__ - -System setup ------------- - -Set locale -^^^^^^^^^^ - -.. include:: ../_Linux-Set-Locale.rst - -Add the ROS 2 apt repository -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. include:: ../_Apt-Repositories.rst - -Install development tools and ROS tools -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: bash - - sudo apt update && sudo apt install -y \ - build-essential \ - cmake \ - git \ - python3-colcon-common-extensions \ - python3-pip \ - python-rosdep \ - python3-vcstool \ - wget - # install some pip packages needed for testing - python3 -m pip install -U \ - argcomplete \ - flake8 \ - flake8-blind-except \ - flake8-builtins \ - flake8-class-newline \ - flake8-comprehensions \ - flake8-deprecated \ - flake8-docstrings \ - flake8-import-order \ - flake8-quotes \ - pytest-repeat \ - pytest-rerunfailures \ - pytest \ - pytest-cov \ - pytest-runner \ - setuptools - # install Fast-RTPS dependencies - sudo apt install --no-install-recommends -y \ - libasio-dev \ - libtinyxml2-dev - # install Cyclone DDS dependencies - sudo apt install --no-install-recommends -y \ - libcunit1-dev - -.. _Dashing_linux-dev-get-ros2-code: - -Get ROS 2 code --------------- - -Create a workspace and clone all repos: - -.. code-block:: bash - - mkdir -p ~/ros2_dashing/src - cd ~/ros2_dashing - wget https://raw.githubusercontent.com/ros2/ros2/dashing/ros2.repos - vcs import src < ros2.repos - -Install dependencies using rosdep ---------------------------------- - -.. code-block:: bash - - sudo rosdep init - rosdep update - rosdep install --from-paths src --ignore-src --rosdistro dashing -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 rti-connext-dds-5.3.1 urdfdom_headers" - -Install additional DDS implementations (optional) -------------------------------------------------- - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Build the code in the workspace -------------------------------- -More info on working with a ROS workspace can be found in `this tutorial `. - -.. code-block:: bash - - cd ~/ros2_dashing/ - colcon build --symlink-install - -Note: if you are having trouble compiling all examples and this is preventing you from completing a successful build, you can use ``AMENT_IGNORE`` in the same manner as `CATKIN_IGNORE `__ to ignore the subtree or remove the folder from the workspace. -Take for instance: you would like to avoid installing the large OpenCV library. -Well then simply ``$ touch AMENT_IGNORE`` in the ``cam2image`` demo directory to leave it out of the build process. - -Optionally install all packages into a combined directory (rather than each package in a separate subdirectory). -On Windows due to limitations of the length of environment variables you should use this option when building workspaces with many (~ >> 100 packages). - -Also, if you have already installed ROS 2 from Debian make sure that you run the ``build`` command in a fresh environment. -You may want to make sure that you do not have ``source /opt/ros/${ROS_DISTRO}/setup.bash`` in your ``.bashrc``. - - -.. code-block:: bash - - colcon build --symlink-install --merge-install - -Afterwards source the ``local_setup.*`` from the ``install`` folder. - -Environment setup ------------------ - -Source the setup script -^^^^^^^^^^^^^^^^^^^^^^^ - -Set up your environment by sourcing the following file. - -.. code-block:: bash - - . ~/ros2_dashing/install/setup.bash - -Try some examples ------------------ - -In one terminal, source the setup file and then run a C++ ``talker``\ : - -.. code-block:: bash - - . ~/ros2_dashing/install/local_setup.bash - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``\ : - -.. code-block:: bash - - . ~/ros2_dashing/install/local_setup.bash - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Alternate compilers -------------------- - -Using a different compiler besides gcc to compile ROS 2 is easy. If you set the environment variables ``CC`` and ``CXX`` to executables for a working C and C++ compiler, respectively, and retrigger CMake configuration (by using ``--force-cmake-config`` or by deleting the packages you want to be affected), CMake will reconfigure and use the different compiler. - -Clang -^^^^^ - -To configure CMake to detect and use Clang: - -.. code-block:: bash - - sudo apt install clang - export CC=clang - export CXX=clang++ - colcon build --cmake-force-configure - -TODO: using ThreadSanitizer, MemorySanitizer - -Stay up to date ---------------- - -See :ref:`MaintainingSource` to periodically refresh your source installation. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Dashing install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_dashing diff --git a/source/Installation/Dashing/Linux-Install-Binary.rst b/source/Installation/Dashing/Linux-Install-Binary.rst deleted file mode 100644 index 19ef57d3be6..00000000000 --- a/source/Installation/Dashing/Linux-Install-Binary.rst +++ /dev/null @@ -1,146 +0,0 @@ -Installing ROS 2 on Linux -========================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -This page explains how to install ROS 2 on Linux from a pre-built binary package. - -.. note:: - - The pre-built binary does not include all ROS 2 packages. - All packages in the `ROS base variant `_ are included, and only a subset of packages in the `ROS desktop variant `_ are included. - The exact list of packages are described by the repositories listed in `this ros2.repos file `_. - -There are also `Debian packages ` available. - -System Requirements -------------------- - -We support Ubuntu Linux Bionic Beaver (18.04) and Ubuntu Xenial Xerus (16.04) on 64-bit x86 and 64-bit ARM. - -Note: Ardent and beta versions supported Ubuntu Xenial Xerus 16.04. - -Add the ROS 2 apt repository ----------------------------- - -.. include:: ../_Apt-Repositories.rst - -Downloading ROS 2 ------------------ - - -* Go to `the releases page `_ -* Download the latest package for Linux; let's assume that it ends up at ``~/Downloads/ros2-dashing-linux-x86_64.tar.bz2``. - - * Note: there may be more than one binary download option which might cause the file name to differ. - -* - Unpack it: - - .. code-block:: bash - - mkdir -p ~/ros2_dashing - cd ~/ros2_dashing - tar xf ~/Downloads/ros2-dashing-linux-x86_64.tar.bz2 - -Installing and initializing rosdep ----------------------------------- - -.. code-block:: bash - - sudo apt update - sudo apt install -y python-rosdep - sudo rosdep init - rosdep update - - -Installing the missing dependencies ------------------------------------ - -Set your rosdistro according to the release you downloaded. - -.. code-block:: bash - - rosdep install --from-paths ros2-linux/share --ignore-src --rosdistro dashing -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 osrf_testing_tools_cpp poco_vendor rmw_connext_cpp rosidl_typesupport_connext_c rosidl_typesupport_connext_cpp rti-connext-dds-5.3.1 tinyxml_vendor tinyxml2_vendor urdfdom urdfdom_headers" - -#. *Optional*\ : if you want to use the ROS 1<->2 bridge, then you must also install ROS 1. - Follow the normal install instructions: https://wiki.ros.org/melodic/Installation/Ubuntu - - -Installing the python3 libraries -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: bash - - sudo apt install -y libpython3-dev python3-pip - pip3 install -U argcomplete - -Install additional DDS implementations (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Environment setup ------------------ - -Sourcing the setup script -^^^^^^^^^^^^^^^^^^^^^^^^^ - -Set up your environment by sourcing the following file. - -.. code-block:: bash - - . ~/ros2_dashing/ros2-linux/setup.bash - -Try some examples ------------------ - -In one terminal, source the setup file and then run a C++ ``talker``: - -.. code-block:: bash - - . ~/ros2_dashing/ros2-linux/setup.bash - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``: - -.. code-block:: bash - - . ~/ros2_dashing/ros2-linux/setup.bash - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found `here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Dashing install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_dashing diff --git a/source/Installation/Dashing/Linux-Install-Debians.rst b/source/Installation/Dashing/Linux-Install-Debians.rst deleted file mode 100644 index a47ec7f9f99..00000000000 --- a/source/Installation/Dashing/Linux-Install-Debians.rst +++ /dev/null @@ -1,122 +0,0 @@ -Installing ROS 2 via Debian Packages -==================================== - -.. contents:: Table of Contents - :depth: 2 - :local: - -Debian packages for ROS 2 Dashing Diademata are available for Ubuntu Bionic. - -Resources ---------- - -* Status Page: - - * ROS 2 Dashing (Ubuntu Bionic): `amd64 `__\ , `arm64 `__ -* `Jenkins Instance `__ -* `Repositories `__ - - -Set locale ----------- - -.. include:: ../_Linux-Set-Locale.rst - -Setup Sources -------------- - -.. include:: ../_Apt-Repositories.rst - -.. _Dashing_linux-install-debians-install-ros-2-packages: - -Install ROS 2 packages ----------------------- - -Update your apt repository caches after setting up the repositories. - -.. code-block:: bash - - sudo apt update - -Desktop Install (Recommended): ROS, RViz, demos, tutorials. - -.. code-block:: bash - - sudo apt install ros-dashing-desktop - -ROS-Base Install (Bare Bones): Communication libraries, message packages, command line tools. -No GUI tools. - -.. code-block:: bash - - sudo apt install ros-dashing-ros-base - -Environment setup ------------------ - -Sourcing the setup script -^^^^^^^^^^^^^^^^^^^^^^^^^ - -Set up your environment by sourcing the following file. - -.. code-block:: bash - - source /opt/ros/dashing/setup.bash - -Install argcomplete (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -ROS 2 command line tools use argcomplete to autocompletion. -So if you want autocompletion, installing argcomplete is necessary. - -.. code-block:: bash - - sudo apt install -y python3-pip - pip3 install -U argcomplete - -Try some examples ------------------ - -In one terminal, set up the ROS 2 environment as described above and then run a C++ ``talker``: - -.. code-block:: bash - - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``: - -.. code-block:: bash - - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found `here `. - -Uninstall ---------- - -If you need to uninstall ROS 2 or switch to a source-based install once you -have already installed from binaries, run the following command: - -.. code-block:: bash - - sudo apt remove ros-dashing-* && sudo apt autoremove diff --git a/source/Installation/Dashing/Windows-Development-Setup.rst b/source/Installation/Dashing/Windows-Development-Setup.rst deleted file mode 100644 index a824f25ca9b..00000000000 --- a/source/Installation/Dashing/Windows-Development-Setup.rst +++ /dev/null @@ -1,385 +0,0 @@ -Building ROS 2 on Windows -========================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -This guide is about how to setup a development environment for ROS 2 on Windows. - -Prerequisites -------------- - -First follow the steps for `Installing Prerequisites ` on the Binary Installation page. - -Stop and return here when you reach the "Downloading ROS 2" section. - -Additional prerequisites -^^^^^^^^^^^^^^^^^^^^^^^^ - -When building from source you'll need a few additional prerequisites installed. - -Install additional prerequisites from Chocolatey -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -First install git: - -.. code-block:: bash - - > choco install -y git - -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". -In the resulting dialog, click "Environment Variables", the click "Path" on the bottom pane, then click "Edit" and add the path). - -Then install ``patch``: - -.. code-block:: bash - - > choco install -y patch - -You may need to close the cmd prompt and open a new one, but at this point you should be able to run ``git``\ , ``python``\ , ``cmake``\ , and ``patch.exe --version``. - -Install developer tools ------------------------ - -Now we are ready to install some our tools that we use to help in developing ROS 2. - -Let's start with ``vcstool``: - -.. code-block:: bash - - > pip install -U vcstool - -You can test it out by just running ``vcs`` (you should be able to do this in the same cmd prompt). - -Next, install ``colcon``: - -.. code-block:: bash - - > pip install -U colcon-common-extensions - -You can test it out by just running ``colcon`` (you should be able to do this in the same cmd prompt). - -Also, you should install ``curl``: - -.. code-block:: bash - - > choco install -y curl - -Install dependencies --------------------- - -Next install the latest version of ``setuptools`` and ``pip``: - -.. code-block:: bash - - > -m pip install -U setuptools pip - -Where ``PATH_TO_PYTHON_EXECUTABLE`` looks like: ``c:\python37\python.exe`` - -Then you can continue installing other Python dependencies: - -.. code-block:: bash - - > pip install -U catkin_pkg EmPy lark-parser lxml numpy pyparsing pyyaml - -Next install testing tools like ``pytest`` and others: - -.. code-block:: bash - - > pip install -U pytest coverage mock - -Next install linters and checkers like ``flake8`` and others: - -.. code-block:: bash - - > pip install -U flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes pep8 pydocstyle - -Next install cppcheck: - -.. code-block:: bash - - > choco install -y cppcheck - -Next install xmllint: - -* Download the `64 bit binary archives `__ of ``libxml2`` (and its dependencies ``iconv`` and ``zlib``) from https://www.zlatkovic.com/projects/libxml/ -* Unpack all archives into e.g. ``C:\xmllint`` -* Add ``C:\xmllint\bin`` to the ``PATH``. - -Install Qt5 -^^^^^^^^^^^ - -This section is only required if you are building rviz, but it comes with our default set of sources, so if you don't know, then assume you are building it. - -First get the installer from Qt's website: - -https://www.qt.io/download - -Select the Open Source version and then the ``Qt Online Installer for Windows``. - -Run the installer and install Qt5. -We recommend you install it to the default location of ``C:\Qt``, but if you choose somewhere else, make sure to update the paths below accordingly. -When selecting components to install, the only thing you absolutely need for bouncy and later is the appropriate MSVC 64-bit component under the ``Qt`` -> ``Qt 5.10.0`` tree. -We're using ``5.10.0`` as of the writing of this document and that's what we recommend since that's all we test on Windows, but later version will probably work too. -For bouncy and later, be sure to select ``MSVC 2017 64-bit``. For ardent use ``MSVC 2015 64-bit``. -After that, the default settings are fine. - -Finally, set the ``Qt5_DIR`` environment variable in the ``cmd.exe`` where you intend to build so that CMake can find it: - -.. code-block:: bash - - > set Qt5_DIR=C:\Qt\5.10.0\msvc2017_64 - : You could set it permanently with ``setx -m Qt5_DIR C:\Qt\5.10.0\msvc2017_64`` instead, but that requires Administrator. - -.. note:: - - This path might change based on which MSVC version you're using or if you installed it to a different directory. - -RQt dependencies -~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - > pip install -U pydot PyQt5 - -Get the ROS 2 code ------------------- - -Now that we have the development tools we can get the ROS 2 source code. - -First setup a development folder, for example ``C:\dev\ros2_dashing``: - -.. code-block:: bash - - > md \dev\ros2_dashing\src - > cd \dev\ros2_dashing - -Get the ``ros2.repos`` file which defines the repositories to clone from: - -.. code-block:: bash - - # CMD - > curl -sk https://raw.githubusercontent.com/ros2/ros2/dashing/ros2.repos -o ros2.repos - - # PowerShell - > curl https://raw.githubusercontent.com/ros2/ros2/dashing/ros2.repos -o ros2.repos - -Next you can use ``vcs`` to import the repositories listed in the ``ros2.repos`` file: - -.. code-block:: bash - - # CMD - > vcs import src < ros2.repos - - # PowerShell - > vcs import --input ros2.repos src - -Install additional DDS implementations (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Build the ROS 2 code --------------------- - -.. _windows-dev-build-ros2: - -To build ROS 2 you will need a Visual Studio Command Prompt ("x64 Native Tools Command Prompt for VS 2019") running as Administrator. - -Fast RTPS is bundled with the ROS 2 source and will always be built unless you put an ``AMENT_IGNORE`` file in the ``src\eProsima`` folder. - -To build the ``\dev\ros2_dashing`` folder tree: - -.. code-block:: bash - - > colcon build --merge-install - -.. note:: - - We're using ``--merge-install`` here to avoid a ``PATH`` variable that is too long at the end of the build. - If you're adapting these instructions to build a smaller workspace then you might be able to use the default behavior which is isolated install, i.e. where each package is installed to a different folder. - -.. note:: - - If you are doing a debug build use ``python_d path\to\colcon_executable`` ``colcon``. - See `Extra stuff for debug mode`_ for more info on running Python code in debug builds on Windows. - -Environment setup ------------------ - -Start a command shell and source the ROS 2 setup file to set up the workspace: - -.. code-block:: bash - - > call C:\dev\ros2_dashing\install\local_setup.bat - -This will automatically set up the environment for any DDS vendors that support was built for. - -It is normal that the previous command, if nothing else went wrong, outputs "The system cannot find the path specified." exactly once. - -Test and run ------------- - -Note that the first time you run any executable you will have to allow access to the network through a Windows Firewall popup. - -You can run the tests using this command: - -.. code-block:: bash - - > colcon test --merge-install - -.. note:: - - ``--merge-install`` should only be used if it was also used in the build step. - -Afterwards you can get a summary of the tests using this command: - -.. code-block:: bash - - > colcon test-result - -To run the examples, first open a clean new ``cmd.exe`` and set up the workspace by sourcing the ``local_setup.bat`` file. -Then, run a C++ ``talker``\ : - -.. code-block:: bash - - > call install\local_setup.bat - > ros2 run demo_nodes_cpp talker - -In a separate shell you can do the same, but instead run a Python ``listener``\ : - -.. code-block:: bash - - > call install\local_setup.bat - > ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -.. note:: - - It is not recommended to build in the same cmd prompt that you've sourced the ``local_setup.bat``. - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - - -Extra stuff for Debug mode --------------------------- - -If you want to be able to run all the tests in Debug mode, you'll need to install a few more things: - - -* To be able to extract the Python source tarball, you can use PeaZip: - -.. code-block:: bash - - > choco install -y peazip - - -* You'll also need SVN, since some of the Python source-build dependencies are checked out via SVN: - -.. code-block:: bash - - > choco install -y svn hg - - -* You'll need to quit and restart the command prompt after installing the above. -* Get and extract the Python 3.7.3 source from the ``tgz``: - - * https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz - * To keep these instructions concise, please extract it to ``C:\dev\Python-3.7.3`` - -* Now, build the Python source in debug mode from a Visual Studio command prompt: - -.. code-block:: bash - - > cd C:\dev\Python-3.7.3\PCbuild - > get_externals.bat - > build.bat -p x64 -d - - -* Finally, copy the build products into the Python37 installation directories, next to the Release-mode Python executable and DLL's: - -.. code-block:: bash - - > cd C:\dev\Python-3.7.3\PCbuild\amd64 - > copy python_d.exe C:\Python37 /Y - > copy python37_d.dll C:\Python37 /Y - > copy python3_d.dll C:\Python37 /Y - > copy python37_d.lib C:\Python37\libs /Y - > copy python3_d.lib C:\Python37\libs /Y - > for %I in (*_d.pyd) do copy %I C:\Python37\DLLs /Y - - -* Now, from a fresh command prompt, make sure that ``python_d`` works: - -.. code-block:: bash - - > python_d - > import _ctypes - -* Once you have verified the operation of ``python_d``, it is necessary to reinstall a few dependencies with the debug-enabled libraries: - -.. code-block:: bash - - > python_d -m pip install --force-reinstall https://github.com/ros2/ros2/releases/download/numpy-archives/numpy-1.16.2-cp37-cp37dm-win_amd64.whl - > python_d -m pip install --force-reinstall https://github.com/ros2/ros2/releases/download/lxml-archives/lxml-4.3.2-cp37-cp37dm-win_amd64.whl - -* To verify the installation of these dependencies: - -.. code-block:: bash - - > python_d - # No import errors should appear when executing the following lines - > from lxml import etree - > import numpy - -* When you wish to return to building release binaries, it is necessary to uninstall the debug variants and use the release variants: - -.. code-block:: bash - - > python -m pip uninstall numpy lxml - > python -m pip install numpy lxml - -* To create executables python scripts(.exe), python_d should be used to invoke colcon - -.. code-block:: bash - - > python_d path\to\colcon_executable build - -* Hooray, you're done! - -Stay up to date ---------------- - -See :ref:`MaintainingSource` to periodically refresh your source installation. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Dashing install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rmdir /s /q \ros2_dashing diff --git a/source/Installation/Dashing/Windows-Install-Binary.rst b/source/Installation/Dashing/Windows-Install-Binary.rst deleted file mode 100644 index dee1d8f7c56..00000000000 --- a/source/Installation/Dashing/Windows-Install-Binary.rst +++ /dev/null @@ -1,278 +0,0 @@ -Installing ROS 2 on Windows -=========================== - -.. contents:: Table of Contents - :depth: 2 - :local: - -This page explains how to install ROS 2 on Windows from a pre-built binary package. - -.. note:: - - The pre-built binary does not include all ROS 2 packages. - All packages in the `ROS base variant `_ are included, and only a subset of packages in the `ROS desktop variant `_ are included. - The exact list of packages are described by the repositories listed in `this ros2.repos file `_. - -System requirements -------------------- - -Only Windows 10 is supported. - -.. _Dashing_windows-install-binary-installing-prerequisites: - -Installing prerequisites ------------------------- - -Install Chocolatey -^^^^^^^^^^^^^^^^^^ - -Chocolatey is a package manager for Windows, install it by following their installation instructions: - -https://chocolatey.org/ - -You'll use Chocolatey to install some other developer tools. - -Install Python -^^^^^^^^^^^^^^ - -Open a Command Prompt and type the following to install Python via Chocolatey: - -.. code-block:: bash - - > choco install -y python --version 3.7.5 - -Install Visual C++ Redistributables -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Open a Command Prompt and type the following to install them via Chocolatey: - -.. code-block:: bash - - > choco install -y vcredist2013 vcredist140 - -Install OpenSSL -^^^^^^^^^^^^^^^ - -Download the *Win64 OpenSSL v1.0.2u* OpenSSL installer from `this page `__. -Scroll to the bottom of the page and download *Win64 OpenSSL v1.0.2u*. -Don't download the Win32 or Light versions or version 1.1.0 or newer. - -Run the installer with default parameters. -The following commands assume you used the default installation directory: - -* ``setx -m OPENSSL_CONF C:\OpenSSL-Win64\bin\openssl.cfg`` - -You will need to append the OpenSSL-Win64 bin folder to your PATH. -You can do this by clicking the Windows icon, typing "Environment Variables", then clicking on "Edit the system environment variables". -In the resulting dialog, click "Environment Variables", then click "Path" on the bottom pane, finally click "Edit" and add the path below. - -* ``C:\OpenSSL-Win64\bin\`` - -Install Visual Studio -^^^^^^^^^^^^^^^^^^^^^ - -Install Visual Studio 2019. - -If you already have a paid version of Visual Studio 2019 (Professional, Enterprise), skip this step. - -Microsoft provides a free of charge version of Visual Studio 2019, named Community, which can be used to build applications that use ROS 2: - - https://visualstudio.microsoft.com/downloads/ - -Make sure that the Visual C++ features are installed. - -An easy way to make sure they're installed is to select the ``Desktop development with C++`` workflow during the install. - - .. image:: https://i.imgur.com/2h0IxCk.png - -Make sure that no C++ CMake tools are installed by unselecting them in the list of components to be installed. - -Install additional DDS implementations (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Install OpenCV -^^^^^^^^^^^^^^ - -Some of the examples require OpenCV to be installed. - -You can download a precompiled version of OpenCV 3.4.6 from https://github.com/ros2/ros2/releases/download/opencv-archives/opencv-3.4.6-vc16.VS2019.zip . - -Assuming you unpacked it to ``C:\opencv``\ , type the following on a Command Prompt (requires Admin privileges): - -.. code-block:: bash - - setx -m OpenCV_DIR C:\opencv - -Since you are using a precompiled ROS version, we have to tell it where to find the OpenCV libraries. -You have to extend the ``PATH`` variable to ``C:\opencv\x64\vc16\bin``. - -Install dependencies -^^^^^^^^^^^^^^^^^^^^ - -There are a few dependencies not available in the Chocolatey package database. -In order to ease the manual installation process, we provide the necessary Chocolatey packages. - -As some chocolatey packages rely on it, we start by installing CMake - -.. code-block:: bash - - > choco install -y cmake - -You will need to append the CMake bin folder ``C:\Program Files\CMake\bin`` to your PATH. - -Please download these packages from `this `__ GitHub repository. - -* asio.1.12.1.nupkg -* cunit.2.1.3.nupkg -* eigen-3.3.4.nupkg -* tinyxml-usestl.2.6.2.nupkg -* tinyxml2.6.0.0.nupkg -* log4cxx.0.10.0.nupkg - -Once these packages are downloaded, open an administrative shell and execute the following command: - -.. code-block:: bash - - > choco install -y -s asio cunit eigen tinyxml-usestl tinyxml2 log4cxx - -Please replace ```` with the folder you downloaded the packages to. - -You must also install some python dependencies for command-line tools: - -.. code-block:: bash - - python -m pip install -U catkin_pkg empy lark-parser lxml numpy opencv-python pyparsing pyyaml setuptools - -RQt dependencies -~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - python -m pip install -U pydot PyQt5 - -Downloading ROS 2 ------------------ - -* Go the releases page: https://github.com/ros2/ros2/releases -* Download the latest package for Windows, e.g., ``ros2-dashing-*-windows-AMD64.zip``. - -.. note:: - - There may be more than one binary download option which might cause the file name to differ. - -.. note:: - - To download the ROS 2 debug libraries you'll need to download ``ros2-dashing-*-windows-debug-AMD64.zip`` - -* Unpack the zip file somewhere (we'll assume ``C:\dev\ros2_dashing``\ ). - - -Environment setup ------------------ - -Start a command shell and source the ROS 2 setup file to set up the workspace: - -.. code-block:: bash - - > call C:\dev\ros2_dashing\local_setup.bat - -It is normal that the previous command, if nothing else went wrong, outputs "The system cannot find the path specified." exactly once. - -Try some examples ------------------ - -In a command shell, set up the ROS 2 environment as described above and then run a C++ ``talker``\ : - -.. code-block:: bash - - > ros2 run demo_nodes_cpp talker - -Start another command shell and run a Python ``listener``\ : - -.. code-block:: bash - - > ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Dashing install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rmdir /s /q \ros2_dashing - -(Alternative) ROS 2 Build Installation from aka.ms/ros --------------------------------------------------------- - -https://aka.ms/ros project hosts ROS 2 builds against the release snapshots. -This section explains how to install ROS 2 from this channel. - -Install ROS 2 builds -^^^^^^^^^^^^^^^^^^^^ - -In an administrative command prompt, run the following commands. - -.. code-block:: bash - - > mkdir c:\opt\chocolatey - > set PYTHONNOUSERSITE=1 - > set ChocolateyInstall=c:\opt\chocolatey - > choco source add -n=ros-win -s="https://aka.ms/ros/public" --priority=1 - > choco upgrade ros-dashing-desktop -y --execution-timeout=0 - -Environment setup -^^^^^^^^^^^^^^^^^^ - -Start an administrative command prompt and source the ROS 2 setup file to set up the workspace: - -.. code-block:: bash - - > call C:\opt\ros\dashing\x64\local_setup.bat - -Stay up-to-date -^^^^^^^^^^^^^^^ - -To keep up-to-date with the latest builds, run: - -.. code-block:: bash - - > set ChocolateyInstall=c:\opt\chocolatey - > choco upgrade all -y --execution-timeout=0 - -Uninstall -^^^^^^^^^ - -If you want to completely remove the environment downloaded above, run this command: - -.. code-block:: bash - - > rmdir /s /q C:\opt\ diff --git a/source/Installation/Dashing/macOS-Development-Setup.rst b/source/Installation/Dashing/macOS-Development-Setup.rst deleted file mode 100644 index 12260256741..00000000000 --- a/source/Installation/Dashing/macOS-Development-Setup.rst +++ /dev/null @@ -1,215 +0,0 @@ -.. redirect-from:: - - Installation/Dashing/OSX-Development-Setup - -Building ROS 2 on macOS -======================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -System requirements -------------------- - -We support macOS 10.12.x. - -However, some new versions like 10.13.x and some older versions like 10.11.x and 10.10.x are known to work as well. - -Install prerequisites ---------------------- - -You need the following things installed to build ROS 2: - - -#. - **Xcode** - - - * - If you don't already have it installed, install Xcode and the Command Line Tools: - - .. code-block:: bash - - xcode-select --install - -#. - **brew** *(needed to install more stuff; you probably already have this)*: - - - * Follow installation instructions at http://brew.sh/ - * - *Optional*: Check that ``brew`` is happy with your system configuration by running: - - .. code-block:: bash - - brew doctor - - Fix any problems that it identifies. - -#. - Use ``brew`` to install more stuff: - - .. code-block:: bash - - brew install cmake cppcheck eigen pcre poco python3 tinyxml wget - - # install dependencies for Fast-RTPS if you are using it - brew install asio tinyxml2 - - brew install opencv - - # install console_bridge for rosbag2 - brew install console_bridge - - # install OpenSSL for DDS-Security - brew install openssl - # if you are using ZSH, then replace '.bashrc' with '.zshrc' - echo "export OPENSSL_ROOT_DIR=$(brew --prefix openssl)" >> ~/.bashrc - - # install dependencies for rcl_logging_log4cxx - brew install log4cxx - - # install CUnit for Cyclone DDS - brew install cunit - -#. - Install rviz dependencies - - .. code-block:: bash - - # install dependencies for Rviz - brew install qt freetype assimp - - # Add the Qt directory to the PATH and CMAKE_PREFIX_PATH - export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/usr/local/opt/qt - export PATH=$PATH:/usr/local/opt/qt/bin - -#. - Install rqt dependencies - - ``brew install graphviz pyqt5 sip`` - - Fix some path names when looking for sip stuff during install (see `ROS 1 wiki `__): - - ``ln -s /usr/local/share/sip/Qt5 /usr/local/share/sip/PyQt5`` - -#. - Use ``python3 -m pip`` (just ``pip`` may install Python3 or Python2) to install more stuff: - - .. code-block:: bash - - python3 -m pip install -U argcomplete catkin_pkg colcon-common-extensions coverage empy flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes lark-parser mock nose pep8 pydocstyle pydot pygraphviz pyparsing setuptools vcstool - -#. - *Optional*: if you want to build the ROS 1<->2 bridge, then you must also install ROS 1: - - - * Start with the normal install instructions: https://wiki.ros.org/kinetic/Installation/OSX/Homebrew/Source - * - When you get to the step where you call ``rosinstall_generator`` to get the source code, here's an alternate invocation that brings in just the minimum required to produce a useful bridge: - - .. code-block:: bash - - rosinstall_generator catkin common_msgs roscpp rosmsg --rosdistro kinetic --deps --wet-only --tar > kinetic-ros2-bridge-deps.rosinstall - wstool init -j8 src kinetic-ros2-bridge-deps.rosinstall - - - Otherwise, just follow the normal instructions, then source the resulting ``install_isolated/setup.bash`` before proceeding here to build ROS 2. - -Disable System Integrity Protection (SIP) ------------------------------------------ - -macOS/OS X versions >=10.11 have System Integrity Protection enabled by default. -So that SIP doesn't prevent processes from inheriting dynamic linker environment variables, such as ``DYLD_LIBRARY_PATH``, you'll need to disable it `following these instructions `__. - -Get the ROS 2 code ------------------- - -Create a workspace and clone all repos: - -.. code-block:: bash - - mkdir -p ~/ros2_dashing/src - cd ~/ros2_dashing - wget https://raw.githubusercontent.com/ros2/ros2/dashing/ros2.repos - vcs import src < ros2.repos - -Install additional DDS vendors (optional) ------------------------------------------ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Build the ROS 2 code --------------------- -Run the ``colcon`` tool to build everything (more on using ``colcon`` in `this tutorial `): - -.. code-block:: bash - - cd ~/ros2_dashing/ - colcon build --symlink-install - -Environment setup ------------------ - -Source the ROS 2 setup file: - -.. code-block:: bash - - . ~/ros2_dashing/install/setup.bash - -This will automatically set up the environment for any DDS vendors that support was built for. - -Try some examples ------------------ - -In one terminal, set up the ROS 2 environment as described above and then run a C++ ``talker``: - -.. code-block:: bash - - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``: - -.. code-block:: bash - - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Stay up to date ---------------- - -See :ref:`MaintainingSource` to periodically refresh your source installation. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Dashing install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_dashing diff --git a/source/Installation/Dashing/macOS-Install-Binary.rst b/source/Installation/Dashing/macOS-Install-Binary.rst deleted file mode 100644 index e21968659c1..00000000000 --- a/source/Installation/Dashing/macOS-Install-Binary.rst +++ /dev/null @@ -1,200 +0,0 @@ -.. redirect-from:: - - Installation/Dashing/OSX-Install-Binary - -Installing ROS 2 on macOS -========================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -This page explains how to install ROS 2 on macOS from a pre-built binary package. - -.. note:: - - The pre-built binary does not include all ROS 2 packages. - All packages in the `ROS base variant `_ are included, and only a subset of packages in the `ROS desktop variant `_ are included. - The exact list of packages are described by the repositories listed in `this ros2.repos file `_. - -System requirements -------------------- - -We support macOS Sierra (10.12.x). - -.. _Dashing_osx-install-binary-installling-prerequisites: - -Installing prerequisites ------------------------- - -You need the following things installed before installing ROS 2. - - -* - **brew** *(needed to install more stuff; you probably already have this)*: - - - * Follow installation instructions at http://brew.sh/ - * - *Optional*: Check that ``brew`` is happy with your system configuration by running: - - .. code-block:: bash - - brew doctor - - - Fix any problems that it identifies. - -* - Use ``brew`` to install more stuff: - - .. code-block:: bash - - brew install python3 - - # install asio and tinyxml2 for Fast-RTPS - brew install asio tinyxml2 - - # install dependencies for robot state publisher - brew install tinyxml eigen pcre poco - - # OpenCV isn't a dependency of ROS 2, but it is used by some demos. - brew install opencv - - # install OpenSSL for DDS-Security - brew install openssl - # if you are using ZSH, then replace '.bashrc' with '.zshrc' - echo "export OPENSSL_ROOT_DIR=$(brew --prefix openssl)" >> ~/.bashrc - - # install Qt for RViz - brew install qt freetype assimp - - # install console_bridge for rosbag2 - brew install console_bridge - - # install dependencies for rcl_logging_log4cxx - brew install log4cxx - - # install CUnit for Cyclone DDS - brew install cunit - -* - Install rqt dependencies - - ``brew install sip pyqt5`` - - Fix some path names when looking for sip stuff during install (see `ROS 1 wiki `__): - - ``ln -s /usr/local/share/sip/Qt5 /usr/local/share/sip/PyQt5`` - - ``brew install graphviz`` - - ``python3 -m pip install pygraphviz pydot`` - - .. note:: - - You may run into an issue installing ``pygraphviz``, "error: Error locating graphviz". - Try the following install command instead: - - .. code-block:: bash - - python3 -m pip install --install-option="--include-path=/usr/local/include/" --install-option="--library-path=/usr/local/lib/" pygraphviz - -* - Install SROS2 dependencies - - ``python3 -m pip install lxml`` - -* - Install additional runtime dependencies for command-line tools: - - .. code-block:: bash - - python3 -m pip install catkin_pkg empy lark-parser lxml numpy pyparsing pyyaml setuptools argcomplete - -Disable System Integrity Protection (SIP) ------------------------------------------ - -macOS/OS X versions >=10.11 have System Integrity Protection enabled by default. -So that SIP doesn't prevent processes from inheriting dynamic linker environment variables, such as ``DYLD_LIBRARY_PATH``, you'll need to disable it `following these instructions `__. - -Downloading ROS 2 ------------------ - -* Download `ROS 2 Dashing Diademata - Patch Release 4 `_ for macOS; let's assume that it ends up at ``~/Downloads/ros2-release-distro-date-macos-amd64.tar.bz2``. - - * Note: OSX binary builds are only provided for Dashing up until `ROS 2 Dashing Diademata - Patch Release 4 `_ due to changes with OSX and/or homebrew that made it difficult to target OSX Sierra. - * Note: there may be more than one binary download option which might cause the file name to differ. - -* - Unpack it: - - .. code-block:: bash - - mkdir -p ~/ros2_dashing - cd ~/ros2_dashing - tar xf ~/Downloads/ros2-release-distro-date-macos-amd64.tar.bz2 - -Install additional DDS implementations (optional) -------------------------------------------------- - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Environment setup ------------------ - -Source the ROS 2 setup file: - -.. code-block:: bash - - . ~/ros2_dashing/ros2-osx/setup.bash - -Try some examples ------------------ - -In one terminal, set up the ROS 2 environment as described above and then run a C++ ``talker``: - -.. code-block:: bash - - ros2 run demo_nodes_cpp talker - -In another terminal, set up the ROS 2 environment and then run a Python ``listener``: - -.. code-block:: bash - - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Dashing install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_dashing diff --git a/source/Installation/Eloquent.rst b/source/Installation/Eloquent.rst deleted file mode 100644 index e81182a232c..00000000000 --- a/source/Installation/Eloquent.rst +++ /dev/null @@ -1,38 +0,0 @@ -.. _EloquentInstall: - -Installing ROS 2 Eloquent Elusor -================================ - -.. toctree:: - :hidden: - :glob: - - Eloquent/* - -Binary packages ---------------- - -We provide ROS 2 binary packages for the following platforms: - -* Linux (Ubuntu Bionic(18.04)) - - * `Debian packages ` - * `"fat" archive ` - -* `macOS ` -* `Windows ` - - -.. _Eloquent_building-from-source: - -Building from source --------------------- - -We support building ROS 2 from source on the following platforms: - - -* `Linux ` -* `macOS ` -* `Windows ` - -.. include:: _Install-Types.rst diff --git a/source/Installation/Eloquent/Fedora-Development-Setup.rst b/source/Installation/Eloquent/Fedora-Development-Setup.rst deleted file mode 100644 index af392f2c2d1..00000000000 --- a/source/Installation/Eloquent/Fedora-Development-Setup.rst +++ /dev/null @@ -1,62 +0,0 @@ -.. redirect-from:: - - Fedora-Development-Setup - Installation/Fedora-Development-Setup - -Building ROS 2 on Fedora Linux -============================== - -How to setup the development environment? ------------------------------------------ - -The following system dependencies are required to build ROS 2 on Fedora. They can be installed with ``dnf`` as follows: - -.. code-block:: bash - - $ sudo dnf install \ - asio-devel \ - cmake \ - cppcheck \ - eigen3-devel \ - gcc-c++ \ - liblsan \ - libXaw-devel \ - libyaml-devel \ - make \ - opencv-devel \ - patch \ - python3-argcomplete \ - python3-colcon-common-extensions \ - python3-coverage \ - python3-devel \ - python3-empy \ - python3-lark-parser \ - python3-lxml \ - python3-mock \ - python3-mypy \ - python3-nose \ - python3-pep8 \ - python3-pip \ - python3-pydocstyle \ - python3-pyflakes \ - python3-pyparsing \ - python3-pytest \ - python3-pytest-cov \ - python3-pytest-mock \ - python3-pytest-runner \ - python3-rosdep \ - python3-setuptools \ - python3-vcstool \ - python3-yaml \ - poco-devel \ - poco-foundation \ - python3-flake8 \ - python3-flake8-import-order \ - redhat-rpm-config \ - tinyxml-devel \ - tinyxml2-devel \ - uncrustify \ - wget - - -With this done, you can follow the rest of the `instructions ` to fetch and build ROS 2. diff --git a/source/Installation/Eloquent/Linux-Development-Setup.rst b/source/Installation/Eloquent/Linux-Development-Setup.rst deleted file mode 100644 index b1d271a9c00..00000000000 --- a/source/Installation/Eloquent/Linux-Development-Setup.rst +++ /dev/null @@ -1,221 +0,0 @@ -.. redirect-from:: - - Linux-Development-Setup - Installation/Linux-Development-Setup - -Building ROS 2 on Linux -======================= - -.. contents:: Table of Contents - :depth: 2 - :local: - - -System requirements -------------------- -Target platforms for Eloquent Elusor are (see `REP 2000 `__): - -- Tier 1: Ubuntu Linux - Bionic Beaver (18.04) 64-bit - -Tier 3 platforms (not actively tested or supported) include: - -- Debian Linux - Stretch (9) -- Fedora 30, see `alternate instructions ` -- Arch Linux, see `alternate instructions `__ -- OpenEmbedded / webOS OSE, see `alternate instructions `__ - -System setup ------------- - -Set locale -^^^^^^^^^^ - -.. include:: ../_Linux-Set-Locale.rst - -Add the ROS 2 apt repository -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. include:: ../_Apt-Repositories.rst - -Install development tools and ROS tools -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: bash - - sudo apt update && sudo apt install -y \ - build-essential \ - cmake \ - git \ - python3-colcon-common-extensions \ - python3-pip \ - python-rosdep \ - python3-vcstool \ - wget - # install some pip packages needed for testing - python3 -m pip install -U \ - argcomplete \ - flake8 \ - flake8-blind-except \ - flake8-builtins \ - flake8-class-newline \ - flake8-comprehensions \ - flake8-deprecated \ - flake8-docstrings \ - flake8-import-order \ - flake8-quotes \ - pytest-repeat \ - pytest-rerunfailures \ - pytest \ - pytest-cov \ - pytest-runner \ - setuptools - # install Fast-RTPS dependencies - sudo apt install --no-install-recommends -y \ - libasio-dev \ - libtinyxml2-dev - # install Cyclone DDS dependencies - sudo apt install --no-install-recommends -y \ - libcunit1-dev - -.. _Eloquent_linux-dev-get-ros2-code: - -Get ROS 2 code --------------- - -Create a workspace and clone all repos: - -.. code-block:: bash - - mkdir -p ~/ros2_eloquent/src - cd ~/ros2_eloquent - wget https://raw.githubusercontent.com/ros2/ros2/eloquent/ros2.repos - vcs import src < ros2.repos - -.. _Eloquent_linux-development-setup-install-dependencies-using-rosdep: - -Install dependencies using rosdep ---------------------------------- - -.. code-block:: bash - - sudo rosdep init - rosdep update - rosdep install --from-paths src --ignore-src --rosdistro eloquent -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 rti-connext-dds-5.3.1 urdfdom_headers" - -Install additional DDS implementations (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Build the code in the workspace -------------------------------- -More info on working with a ROS workspace can be found in `this tutorial `. - -.. code-block:: bash - - cd ~/ros2_eloquent/ - colcon build --symlink-install - -Note: if you are having trouble compiling all examples and this is preventing you from completing a successful build, you can use ``AMENT_IGNORE`` in the same manner as `CATKIN_IGNORE `__ to ignore the subtree or remove the folder from the workspace. -Take for instance: you would like to avoid installing the large OpenCV library. -Well then simply ``$ touch AMENT_IGNORE`` in the ``cam2image`` demo directory to leave it out of the build process. - -Optionally install all packages into a combined directory (rather than each package in a separate subdirectory). -On Windows due to limitations of the length of environment variables you should use this option when building workspaces with many (~ >> 100 packages). - -Also, if you have already installed ROS 2 from Debian make sure that you run the ``build`` command in a fresh environment. -You may want to make sure that you do not have ``source /opt/ros/${ROS_DISTRO}/setup.bash`` in your ``.bashrc``. - - -.. code-block:: bash - - colcon build --symlink-install --merge-install - -Afterwards source the ``local_setup.*`` from the ``install`` folder. - -Environment setup ------------------ - -Source the setup script -^^^^^^^^^^^^^^^^^^^^^^^ - -Set up your environment by sourcing the following file. - -.. code-block:: bash - - . ~/ros2_eloquent/install/setup.bash - -Try some examples ------------------ - -In one terminal, source the setup file and then run a C++ ``talker``\ : - -.. code-block:: bash - - . ~/ros2_eloquent/install/local_setup.bash - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``\ : - -.. code-block:: bash - - . ~/ros2_eloquent/install/local_setup.bash - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Alternate compilers -------------------- - -Using a different compiler besides gcc to compile ROS 2 is easy. If you set the environment variables ``CC`` and ``CXX`` to executables for a working C and C++ compiler, respectively, and retrigger CMake configuration (by using ``--force-cmake-config`` or by deleting the packages you want to be affected), CMake will reconfigure and use the different compiler. - -Clang -^^^^^ - -To configure CMake to detect and use Clang: - -.. code-block:: bash - - sudo apt install clang - export CC=clang - export CXX=clang++ - colcon build --cmake-force-configure - -TODO: using ThreadSanitizer, MemorySanitizer - -Stay up to date ---------------- - -See :ref:`MaintainingSource` to periodically refresh your source installation. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Eloquent install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_eloquent diff --git a/source/Installation/Eloquent/Linux-Install-Binary.rst b/source/Installation/Eloquent/Linux-Install-Binary.rst deleted file mode 100644 index 6c66e0bfdfc..00000000000 --- a/source/Installation/Eloquent/Linux-Install-Binary.rst +++ /dev/null @@ -1,152 +0,0 @@ -.. redirect-from:: - - Linux-Install-Binary - Installation/Linux-Install-Binary - -Installing ROS 2 on Linux -========================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -This page explains how to install ROS 2 on Linux from a pre-built binary package. - -.. note:: - - The pre-built binary does not include all ROS 2 packages. - All packages in the `ROS base variant `_ are included, and only a subset of packages in the `ROS desktop variant `_ are included. - The exact list of packages are described by the repositories listed in `this ros2.repos file `_. - -There are also `Debian packages ` available. - -System Requirements -------------------- - -We support Ubuntu Linux Bionic Beaver (18.04) and Ubuntu Xenial Xerus (16.04) on 64-bit x86 and 64-bit ARM. - -Note: Ardent and beta versions supported Ubuntu Xenial Xerus 16.04. - -Add the ROS 2 apt repository ----------------------------- - -.. include:: ../_Apt-Repositories.rst - -Downloading ROS 2 ------------------ - - -* Go `the releases page `_ -* Download the latest package for Linux; let's assume that it ends up at ``~/Downloads/ros2-eloquent-linux-x86_64.tar.bz2``. - - * Note: there may be more than one binary download option which might cause the file name to differ. - -* - Unpack it: - - .. code-block:: bash - - mkdir -p ~/ros2_eloquent - cd ~/ros2_eloquent - tar xf ~/Downloads/ros2-eloquent-linux-x86_64.tar.bz2 - -Installing and initializing rosdep ----------------------------------- - -.. code-block:: bash - - sudo apt update - sudo apt install -y python-rosdep - sudo rosdep init - rosdep update - -.. _Eloquent_linux-install-binary-install-missing-dependencies: - -Installing the missing dependencies ------------------------------------ - -Set your rosdistro according to the release you downloaded. - -.. code-block:: bash - - rosdep install --from-paths ros2-linux/share --ignore-src --rosdistro eloquent -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 osrf_testing_tools_cpp poco_vendor rmw_connext_cpp rosidl_typesupport_connext_c rosidl_typesupport_connext_cpp rti-connext-dds-5.3.1 tinyxml_vendor tinyxml2_vendor urdfdom urdfdom_headers" - -#. *Optional*\ : if you want to use the ROS 1<->2 bridge, then you must also install ROS 1. - Follow the normal install instructions: https://wiki.ros.org/melodic/Installation/Ubuntu - -Installing the python3 libraries -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: bash - - sudo apt install -y libpython3-dev python3-pip - pip3 install -U argcomplete - -Install additional DDS implementations (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Environment setup ------------------ - -Sourcing the setup script -^^^^^^^^^^^^^^^^^^^^^^^^^ - -Set up your environment by sourcing the following file. - -.. code-block:: bash - - . ~/ros2_eloquent/ros2-linux/setup.bash - -Try some examples ------------------ - -In one terminal, source the setup file and then run a C++ ``talker``: - -.. code-block:: bash - - . ~/ros2_eloquent/ros2-linux/setup.bash - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``: - -.. code-block:: bash - - . ~/ros2_eloquent/ros2-linux/setup.bash - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found `here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Eloquent install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_eloquent diff --git a/source/Installation/Eloquent/Linux-Install-Debians.rst b/source/Installation/Eloquent/Linux-Install-Debians.rst deleted file mode 100644 index 86075a26013..00000000000 --- a/source/Installation/Eloquent/Linux-Install-Debians.rst +++ /dev/null @@ -1,131 +0,0 @@ -.. redirect-from:: - - Linux-Install-Debians - Installation/Linux-Install-Debians - -Installing ROS 2 via Debian Packages -==================================== - -.. contents:: Table of Contents - :depth: 2 - :local: - -Debian packages for ROS 2 Eloquent Elusor are available for Ubuntu Bionic. - -Resources ---------- - -* Status Page: - - * ROS 2 Eloquent (Ubuntu Bionic): `amd64 `__\ , `arm64 `__, `armhf `__ -* `Jenkins Instance `__ -* `Repositories `__ - - -Set locale ----------- - -.. include:: ../_Linux-Set-Locale.rst - -Setup Sources -------------- - -.. include:: ../_Apt-Repositories.rst - -.. _Eloquent_linux-install-debians-install-ros-2-packages: - -Install ROS 2 packages ----------------------- - -Update your apt repository caches after setting up the repositories. - -.. code-block:: bash - - sudo apt update - -Desktop Install (Recommended): ROS, RViz, demos, tutorials. - -.. code-block:: bash - - sudo apt install ros-eloquent-desktop - -ROS-Base Install (Bare Bones): Communication libraries, message packages, command line tools. -No GUI tools. - -.. code-block:: bash - - sudo apt install ros-eloquent-ros-base - -Environment setup ------------------ - -Sourcing the setup script -^^^^^^^^^^^^^^^^^^^^^^^^^ - -Set up your environment by sourcing the following file. - -.. code-block:: bash - - source /opt/ros/eloquent/setup.bash - -Install argcomplete (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -ROS 2 command line tools use argcomplete to autocompletion. -So if you want autocompletion, installing argcomplete is necessary. - -.. code-block:: bash - - sudo apt install -y python3-pip - pip3 install -U argcomplete - -Try some examples ------------------ - -If you installed ``ros-eloquent-desktop`` above you can try some examples. - -In one terminal, source the setup file and then run a C++ ``talker``\ : - -.. code-block:: bash - - source /opt/ros/eloquent/setup.bash - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``\ : - -.. code-block:: bash - - source /opt/ros/eloquent/setup.bash - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found `here `. - -Uninstall ---------- - -If you need to uninstall ROS 2 or switch to a source-based install once you -have already installed from binaries, run the following command: - -.. code-block:: bash - - sudo apt remove ros-eloquent-* && sudo apt autoremove diff --git a/source/Installation/Eloquent/Windows-Development-Setup.rst b/source/Installation/Eloquent/Windows-Development-Setup.rst deleted file mode 100644 index e742acee69e..00000000000 --- a/source/Installation/Eloquent/Windows-Development-Setup.rst +++ /dev/null @@ -1,399 +0,0 @@ -.. redirect-from:: - - Windows-Development-Setup - Installation/Windows-Development-Setup - -Building ROS 2 on Windows -========================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -This guide is about how to setup a development environment for ROS 2 on Windows. - -Prerequisites -------------- - -First follow the steps for `Installing Prerequisites ` on the Binary Installation page. - -Stop and return here when you reach the "Downloading ROS 2" section. - -Additional prerequisites -^^^^^^^^^^^^^^^^^^^^^^^^ - -When building from source you'll need a few additional prerequisites installed. - -Install additional prerequisites from Chocolatey -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -First install git: - -.. code-block:: bash - - > choco install -y git - -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". -In the resulting dialog, click "Environment Variables", the click "Path" on the bottom pane, then click "Edit" and add the path). - -Then install ``patch``: - -.. code-block:: bash - - > choco install -y patch - -You may need to close the cmd prompt and open a new one, but at this point you should be able to run ``git``\ , ``python``\ , ``cmake``\ , and ``patch.exe --version``. - -Install developer tools ------------------------ - -Now we are ready to install some our tools that we use to help in developing ROS 2. - -Let's start with ``vcstool``: - -.. code-block:: bash - - > pip install -U vcstool - -You can test it out by just running ``vcs`` (you should be able to do this in the same cmd prompt). - -Next, install ``colcon``: - -.. code-block:: bash - - > pip install -U colcon-common-extensions - -You can test it out by just running ``colcon`` (you should be able to do this in the same cmd prompt). - -Also, you should install ``curl``: - -.. code-block:: bash - - > choco install -y curl - -Install dependencies --------------------- - -Next install the latest version of ``setuptools`` and ``pip``: - -.. code-block:: bash - - > -m pip install -U setuptools pip - -Where ``PATH_TO_PYTHON_EXECUTABLE`` looks like: ``c:\python37\python.exe`` - -Then you can continue installing other Python dependencies: - -.. code-block:: bash - - > pip install -U catkin_pkg cryptography EmPy ifcfg lark-parser lxml numpy pyparsing pyyaml - -Next install testing tools like ``pytest`` and others: - -.. code-block:: bash - - > pip install -U pytest pytest-mock coverage mock - -Next install linters and checkers like ``flake8`` and others: - -.. code-block:: bash - - > pip install -U flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes mypy pep8 pydocstyle - -Next install cppcheck: - -.. code-block:: bash - - > choco install -y cppcheck - -Next install xmllint: - -* Download the `64 bit binary archives `__ of ``libxml2`` (and its dependencies ``iconv`` and ``zlib``) from https://www.zlatkovic.com/projects/libxml/ -* Unpack all archives into e.g. ``C:\xmllint`` -* Add ``C:\xmllint\bin`` to the ``PATH``. - -Install Qt5 -^^^^^^^^^^^ - -This section is only required if you are building rviz, but it comes with our default set of sources, so if you don't know, then assume you are building it. - -First get the installer from Qt's website: - -https://www.qt.io/download - -Select the Open Source version and then the ``Qt Online Installer for Windows``. - -Run the installer and install Qt5. -We recommend you install it to the default location of ``C:\Qt``, but if you choose somewhere else, make sure to update the paths below accordingly. -When selecting components to install, the only thing you absolutely need for bouncy and later is the appropriate MSVC 64-bit component under the ``Qt`` -> ``Qt 5.10.0`` tree. -We're using ``5.10.0`` as of the writing of this document and that's what we recommend since that's all we test on Windows, but later version will probably work too. -For bouncy and later, be sure to select ``MSVC 2017 64-bit``. For ardent use ``MSVC 2015 64-bit``. -After that, the default settings are fine. - -Finally, set the ``Qt5_DIR`` environment variable in the ``cmd.exe`` where you intend to build so that CMake can find it: - -.. code-block:: bash - - > set Qt5_DIR=C:\Qt\5.10.0\msvc2017_64 - : You could set it permanently with ``setx -m Qt5_DIR C:\Qt\5.10.0\msvc2017_64`` instead, but that requires Administrator. - -.. note:: - - This path might change based on which MSVC version you're using or if you installed it to a different directory. - -Set the environment variable QT_QPA_PLATFORM_PLUGIN_PATH to run some of the Qt examples: - -.. code-block:: bash - - > set QT_QPA_PLATFORM_PLUGIN_PATH=C:\Qt\5.12.2\msvc2017_64\plugins\platforms - : You could set it permanently with ``setx -m QT_QPA_PLATFORM_PLUGIN_PATH C:\Qt\5.12.2\msvc2017_64\plugins\platforms`` instead, but that requires Administrator. - -You can also do this by clicking the Windows icon, typing "Environment Variables", then clicking on "Edit the system environment variables". In the resulting dialog, click "Environment Variables", the click "Path" on the bottom pane, then click "Edit" and add the path). - -RQt dependencies -~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - > pip install -U pydot PyQt5 - -Get the ROS 2 code ------------------- - -Now that we have the development tools we can get the ROS 2 source code. - -First setup a development folder, for example ``C:\dev\ros2_eloquent``: - -.. code-block:: bash - - > md \dev\ros2_eloquent\src - > cd \dev\ros2_eloquent - -Get the ``ros2.repos`` file which defines the repositories to clone from: - -.. code-block:: bash - - # CMD - > curl -sk https://raw.githubusercontent.com/ros2/ros2/eloquent/ros2.repos -o ros2.repos - - # PowerShell - > curl https://raw.githubusercontent.com/ros2/ros2/eloquent/ros2.repos -o ros2.repos - -Next you can use ``vcs`` to import the repositories listed in the ``ros2.repos`` file: - -.. code-block:: bash - - # CMD - > vcs import src < ros2.repos - - # PowerShell - > vcs import --input ros2.repos src - -Install additional DDS implementations (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Build the ROS 2 code --------------------- - -.. _windows-dev-build-ros2: - -To build ROS 2 you will need a Visual Studio Command Prompt ("x64 Native Tools Command Prompt for VS 2019") running as Administrator. - -Fast RTPS is bundled with the ROS 2 source and will always be built unless you put an ``AMENT_IGNORE`` file in the ``src\eProsima`` folder. - -To build the ``\dev\ros2_eloquent`` folder tree: - -.. code-block:: bash - - > colcon build --merge-install - -.. note:: - - We're using ``--merge-install`` here to avoid a ``PATH`` variable that is too long at the end of the build. - If you're adapting these instructions to build a smaller workspace then you might be able to use the default behavior which is isolated install, i.e. where each package is installed to a different folder. - -.. note:: - - If you are doing a debug build use ``python_d path\to\colcon_executable`` ``colcon``. - See `Extra stuff for debug mode`_ for more info on running Python code in debug builds on Windows. - -Environment setup ------------------ - -Start a command shell and source the ROS 2 setup file to set up the workspace: - -.. code-block:: bash - - > call C:\dev\ros2_eloquent\install\local_setup.bat - -This will automatically set up the environment for any DDS vendors that support was built for. - -It is normal that the previous command, if nothing else went wrong, outputs "The system cannot find the path specified." exactly once. - -Test and run ------------- - -Note that the first time you run any executable you will have to allow access to the network through a Windows Firewall popup. - -You can run the tests using this command: - -.. code-block:: bash - - > colcon test --merge-install - -.. note:: - - ``--merge-install`` should only be used if it was also used in the build step. - -Afterwards you can get a summary of the tests using this command: - -.. code-block:: bash - - > colcon test-result - -To run the examples, first open a clean new ``cmd.exe`` and set up the workspace by sourcing the ``local_setup.bat`` file. -Then, run a C++ ``talker``\ : - -.. code-block:: bash - - > call install\local_setup.bat - > ros2 run demo_nodes_cpp talker - -In a separate shell you can do the same, but instead run a Python ``listener``\ : - -.. code-block:: bash - - > call install\local_setup.bat - > ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -.. note:: - - It is not recommended to build in the same cmd prompt that you've sourced the ``local_setup.bat``. - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - - -Extra stuff for Debug mode --------------------------- - -If you want to be able to run all the tests in Debug mode, you'll need to install a few more things: - - -* To be able to extract the Python source tarball, you can use PeaZip: - -.. code-block:: bash - - > choco install -y peazip - - -* You'll also need SVN, since some of the Python source-build dependencies are checked out via SVN: - -.. code-block:: bash - - > choco install -y svn hg - - -* You'll need to quit and restart the command prompt after installing the above. -* Get and extract the Python 3.7.3 source from the ``tgz``: - - * https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz - * To keep these instructions concise, please extract it to ``C:\dev\Python-3.7.3`` - -* Now, build the Python source in debug mode from a Visual Studio command prompt: - -.. code-block:: bash - - > cd C:\dev\Python-3.7.3\PCbuild - > get_externals.bat - > build.bat -p x64 -d - - -* Finally, copy the build products into the Python37 installation directories, next to the Release-mode Python executable and DLL's: - -.. code-block:: bash - - > cd C:\dev\Python-3.7.3\PCbuild\amd64 - > copy python_d.exe C:\Python37 /Y - > copy python37_d.dll C:\Python37 /Y - > copy python3_d.dll C:\Python37 /Y - > copy python37_d.lib C:\Python37\libs /Y - > copy python3_d.lib C:\Python37\libs /Y - > for %I in (*_d.pyd) do copy %I C:\Python37\DLLs /Y - - -* Now, from a fresh command prompt, make sure that ``python_d`` works: - -.. code-block:: bash - - > python_d - > import _ctypes - -* Once you have verified the operation of ``python_d``, it is necessary to reinstall a few dependencies with the debug-enabled libraries: - -.. code-block:: bash - - > python_d -m pip install --force-reinstall https://github.com/ros2/ros2/releases/download/numpy-archives/numpy-1.16.2-cp37-cp37dm-win_amd64.whl - > python_d -m pip install --force-reinstall https://github.com/ros2/ros2/releases/download/lxml-archives/lxml-4.3.2-cp37-cp37dm-win_amd64.whl - -* To verify the installation of these dependencies: - -.. code-block:: bash - - > python_d - # No import errors should appear when executing the following lines - > from lxml import etree - > import numpy - -* When you wish to return to building release binaries, it is necessary to uninstall the debug variants and use the release variants: - -.. code-block:: bash - - > python -m pip uninstall numpy lxml - > python -m pip install numpy lxml - -* To create executables python scripts(.exe), python_d should be used to invoke colcon - -.. code-block:: bash - - > python_d path\to\colcon_executable build - -* Hooray, you're done! - -Stay up to date ---------------- - -See :ref:`MaintainingSource` to periodically refresh your source installation. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Eloquent install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rmdir /s /q \ros2_eloquent diff --git a/source/Installation/Eloquent/Windows-Install-Binary.rst b/source/Installation/Eloquent/Windows-Install-Binary.rst deleted file mode 100644 index d95d9cdb2ed..00000000000 --- a/source/Installation/Eloquent/Windows-Install-Binary.rst +++ /dev/null @@ -1,236 +0,0 @@ -.. redirect-from:: - - Windows-Install-Binary - Installation/Windows-Install-Binary - -Installing ROS 2 on Windows -=========================== - -.. contents:: Table of Contents - :depth: 2 - :local: - -This page explains how to install ROS 2 on Windows from a pre-built binary package. - -.. note:: - - The pre-built binary does not include all ROS 2 packages. - All packages in the `ROS base variant `_ are included, and only a subset of packages in the `ROS desktop variant `_ are included. - The exact list of packages are described by the repositories listed in `this ros2.repos file `_. - -System requirements -------------------- - -Only Windows 10 is supported. - -.. _Eloquent_windows-install-binary-installing-prerequisites: - -Installing prerequisites ------------------------- - -Install Chocolatey -^^^^^^^^^^^^^^^^^^ - -Chocolatey is a package manager for Windows, install it by following their installation instructions: - -https://chocolatey.org/ - -You'll use Chocolatey to install some other developer tools. - -Install Python -^^^^^^^^^^^^^^ - -Open a Command Prompt and type the following to install Python via Chocolatey: - -.. code-block:: bash - - > choco install -y python --version 3.7.5 - -Install Visual C++ Redistributables -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Open a Command Prompt and type the following to install them via Chocolatey: - -.. code-block:: bash - - > choco install -y vcredist2013 vcredist140 - -Install OpenSSL -^^^^^^^^^^^^^^^ - -Download the *Win64 OpenSSL v1.0.2u* OpenSSL installer from `this page `__. -Scroll to the bottom of the page and download *Win64 OpenSSL v1.0.2u*. -Don't download the Win32 or Light versions or version 1.1.0 or newer. - -Run the installer with default parameters. -The following commands assume you used the default installation directory: - -* ``setx -m OPENSSL_CONF C:\OpenSSL-Win64\bin\openssl.cfg`` - -You will need to append the OpenSSL-Win64 bin folder to your PATH. -You can do this by clicking the Windows icon, typing "Environment Variables", then clicking on "Edit the system environment variables". -In the resulting dialog, click "Environment Variables", then click "Path" on the bottom pane, finally click "Edit" and add the path below. - -* ``C:\OpenSSL-Win64\bin\`` - -Install Visual Studio -^^^^^^^^^^^^^^^^^^^^^ - -Install Visual Studio 2019. - -If you already have a paid version of Visual Studio 2019 (Professional, Enterprise), skip this step. - -Microsoft provides a free of charge version of Visual Studio 2019, named Community, which can be used to build applications that use ROS 2: - - https://visualstudio.microsoft.com/downloads/ - -Make sure that the Visual C++ features are installed. - -An easy way to make sure they're installed is to select the ``Desktop development with C++`` workflow during the install. - -Make sure that no C++ CMake tools are installed by unselecting them in the list of components to be installed as in the image below. - - .. image:: https://i.imgur.com/F2TONuw.png - - -Install additional DDS implementations (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Install OpenCV -^^^^^^^^^^^^^^ - -Some of the examples require OpenCV to be installed. - -You can download a precompiled version of OpenCV 3.4.6 from https://github.com/ros2/ros2/releases/download/opencv-archives/opencv-3.4.6-vc16.VS2019.zip . - -Assuming you unpacked it to ``C:\opencv``\ , type the following on a Command Prompt (requires Admin privileges): - -.. code-block:: bash - - setx -m OpenCV_DIR C:\opencv - -Since you are using a precompiled ROS version, we have to tell it where to find the OpenCV libraries. -You have to extend the ``PATH`` variable to ``C:\opencv\x64\vc16\bin``. - -Install dependencies -^^^^^^^^^^^^^^^^^^^^ - -There are a few dependencies not available in the Chocolatey package database. -In order to ease the manual installation process, we provide the necessary Chocolatey packages. - -As some chocolatey packages rely on it, we start by installing CMake - -.. code-block:: bash - - > choco install -y cmake - -You will need to append the CMake bin folder ``C:\Program Files\CMake\bin`` to your PATH. - -Please download these packages from `this `__ GitHub repository. - -* asio.1.12.1.nupkg -* cunit.2.1.3.nupkg -* eigen-3.3.4.nupkg -* tinyxml-usestl.2.6.2.nupkg -* tinyxml2.6.0.0.nupkg -* log4cxx.0.10.0.nupkg - -Once these packages are downloaded, open an administrative shell and execute the following command: - -.. code-block:: bash - - > choco install -y -s asio cunit eigen tinyxml-usestl tinyxml2 log4cxx - -Please replace ```` with the folder you downloaded the packages to. - -You must also install some python dependencies for command-line tools: - -.. code-block:: bash - - python -m pip install -U catkin_pkg cryptography empy ifcfg lark-parser lxml netifaces numpy opencv-python pyparsing pyyaml setuptools - -RQt dependencies -~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - python -m pip install -U pydot PyQt5 - -Downloading ROS 2 ------------------ - -* Go the releases page: https://github.com/ros2/ros2/releases -* Download the latest package for Windows, e.g., ``ros2-eloquent-*-windows-AMD64.zip``. - -.. note:: - - There may be more than one binary download option which might cause the file name to differ. - -.. note:: - - To download the ROS 2 debug libraries you'll need to download ``ros2-eloquent-*-windows-debug-AMD64.zip`` - -* Unpack the zip file somewhere (we'll assume ``C:\dev\ros2_eloquent``\ ). - -Environment setup ------------------ - -Start a command shell and source the ROS 2 setup file to set up the workspace: - -.. code-block:: bash - - > call C:\dev\ros2_eloquent\local_setup.bat - -It is normal that the previous command, if nothing else went wrong, outputs "The system cannot find the path specified." exactly once. - -Try some examples ------------------ - -In a command shell, set up the ROS 2 environment as described above and then run a C++ ``talker``\ : - -.. code-block:: bash - - > ros2 run demo_nodes_cpp talker - -Start another command shell and run a Python ``listener``\ : - -.. code-block:: bash - - > ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Eloquent install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rmdir /s /q \ros2_eloquent diff --git a/source/Installation/Eloquent/macOS-Development-Setup.rst b/source/Installation/Eloquent/macOS-Development-Setup.rst deleted file mode 100644 index 42a43a94825..00000000000 --- a/source/Installation/Eloquent/macOS-Development-Setup.rst +++ /dev/null @@ -1,225 +0,0 @@ -.. redirect-from:: - - OSX-Development-Setup - Installation/OSX-Development-Setup - -.. redirect-from:: - - macOS-Development-Setup - Installation/macOS-Development-Setup - -Building ROS 2 on macOS -======================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -System requirements -------------------- - -We support macOS 10.14 (Mojave). - -However, some older versions like 10.13.x are known to work as well. - -Install prerequisites ---------------------- - -You need the following things installed to build ROS 2: - - -#. - **Xcode** - - - * - If you don't already have it installed, install Xcode and the Command Line Tools: - - .. code-block:: bash - - xcode-select --install - sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer - -#. - **brew** *(needed to install more stuff; you probably already have this)*: - - - * Follow installation instructions at http://brew.sh/ - * - *Optional*: Check that ``brew`` is happy with your system configuration by running: - - .. code-block:: bash - - brew doctor - - Fix any problems that it identifies. - -#. - Use ``brew`` to install more stuff: - - .. code-block:: bash - - brew install cmake cppcheck eigen pcre poco python3 tinyxml wget - - # install dependencies for Fast-RTPS if you are using it - brew install asio tinyxml2 - - brew install opencv - - # install console_bridge for rosbag2 - brew install console_bridge - - # install OpenSSL for DDS-Security - brew install openssl - # if you are using ZSH, then replace '.bashrc' with '.zshrc' - echo "export OPENSSL_ROOT_DIR=$(brew --prefix openssl)" >> ~/.bashrc - - # install dependencies for rcl_logging_log4cxx - brew install log4cxx - - # install CUnit for Cyclone DDS - brew install cunit - -#. - Install rviz dependencies - - .. code-block:: bash - - # install dependencies for Rviz - brew install qt freetype assimp - - # Add the Qt directory to the PATH and CMAKE_PREFIX_PATH - export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/usr/local/opt/qt - export PATH=$PATH:/usr/local/opt/qt/bin - -#. - Install rqt dependencies - - ``brew install graphviz pyqt5 sip`` - - Fix some path names when looking for sip stuff during install (see `ROS 1 wiki `__): - - ``ln -s /usr/local/share/sip/Qt5 /usr/local/share/sip/PyQt5`` - -#. - Use ``python3 -m pip`` (just ``pip`` may install Python3 or Python2) to install more stuff: - - .. code-block:: bash - - python3 -m pip install -U argcomplete catkin_pkg colcon-common-extensions coverage cryptography empy flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes ifcfg lark-parser lxml mock mypy netifaces nose pep8 pydocstyle pydot pygraphviz pyparsing pytest-mock rosdep setuptools vcstool - - Please ensure that the ``$PATH`` environment variable contains the install location of the binaries (default: ``$HOME/Library/Python//bin``) - -#. - *Optional*: if you want to build the ROS 1<->2 bridge, then you must also install ROS 1: - - - * Start with the normal install instructions: https://wiki.ros.org/kinetic/Installation/OSX/Homebrew/Source - * - When you get to the step where you call ``rosinstall_generator`` to get the source code, here's an alternate invocation that brings in just the minimum required to produce a useful bridge: - - .. code-block:: bash - - rosinstall_generator catkin common_msgs roscpp rosmsg --rosdistro kinetic --deps --wet-only --tar > kinetic-ros2-bridge-deps.rosinstall - wstool init -j8 src kinetic-ros2-bridge-deps.rosinstall - - - Otherwise, just follow the normal instructions, then source the resulting ``install_isolated/setup.bash`` before proceeding here to build ROS 2. - -Disable System Integrity Protection (SIP) ------------------------------------------ - -macOS/OS X versions >=10.11 have System Integrity Protection enabled by default. -So that SIP doesn't prevent processes from inheriting dynamic linker environment variables, such as ``DYLD_LIBRARY_PATH``, you'll need to disable it `following these instructions `__. - -Get the ROS 2 code ------------------- - -Create a workspace and clone all repos: - -.. code-block:: bash - - mkdir -p ~/ros2_eloquent/src - cd ~/ros2_eloquent - wget https://raw.githubusercontent.com/ros2/ros2/eloquent/ros2.repos - vcs import src < ros2.repos - -Install additional DDS vendors (optional) ------------------------------------------ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Build the ROS 2 code --------------------- -Run the ``colcon`` tool to build everything (more on using ``colcon`` in `this tutorial `): - -.. code-block:: bash - - cd ~/ros2_eloquent/ - colcon build --symlink-install - -Environment setup ------------------ - -Source the ROS 2 setup file: - -.. code-block:: bash - - . ~/ros2_eloquent/install/setup.bash - -This will automatically set up the environment for any DDS vendors that support was built for. - -Try some examples ------------------ - -In one terminal, set up the ROS 2 environment as described above and then run a C++ ``talker``: - -.. code-block:: bash - - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``: - -.. code-block:: bash - - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - - -Stay up to date ---------------- - -See :ref:`MaintainingSource` to periodically refresh your source installation. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Eloquent install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_eloquent diff --git a/source/Installation/Eloquent/macOS-Install-Binary.rst b/source/Installation/Eloquent/macOS-Install-Binary.rst deleted file mode 100644 index 9b50d808ec9..00000000000 --- a/source/Installation/Eloquent/macOS-Install-Binary.rst +++ /dev/null @@ -1,206 +0,0 @@ -.. redirect-from:: - - OSX-Install-Binary - Installation/OSX-Install-Binary - -.. redirect-from:: - - macOS-Install-Binary - Installation/macOS-Install-Binary - -Installing ROS 2 on macOS -========================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -This page explains how to install ROS 2 on macOS from a pre-built binary package. - -.. note:: - - The pre-built binary does not include all ROS 2 packages. - All packages in the `ROS base variant `_ are included, and only a subset of packages in the `ROS desktop variant `_ are included. - The exact list of packages are described by the repositories listed in `this ros2.repos file `_. - -System requirements -------------------- - -We support macOS 10.14 (Mojave). - -.. _Eloquent_osx-install-binary-installling-prerequisites: - -Installing prerequisites ------------------------- - -You need the following things installed before installing ROS 2. - - -* - **brew** *(needed to install more stuff; you probably already have this)*: - - - * Follow installation instructions at http://brew.sh/ - * - *Optional*: Check that ``brew`` is happy with your system configuration by running: - - .. code-block:: bash - - brew doctor - - - Fix any problems that it identifies. - -* - Use ``brew`` to install more stuff: - - .. code-block:: bash - - brew install python3 - - # install asio and tinyxml2 for Fast-RTPS - brew install asio tinyxml2 - - # install dependencies for robot state publisher - brew install tinyxml eigen pcre poco - - # OpenCV isn't a dependency of ROS 2, but it is used by some demos. - brew install opencv - - # install OpenSSL for DDS-Security - brew install openssl - # if you are using ZSH, then replace '.bashrc' with '.zshrc' - echo "export OPENSSL_ROOT_DIR=$(brew --prefix openssl)" >> ~/.bashrc - - # install Qt for RViz - brew install qt freetype assimp - - # install console_bridge for rosbag2 - brew install console_bridge - - # install dependencies for rcl_logging_log4cxx - brew install log4cxx - - # install CUnit for Cyclone DDS - brew install cunit - -* - Install rqt dependencies - - ``brew install sip pyqt5`` - - Fix some path names when looking for sip stuff during install (see `ROS 1 wiki `__): - - ``ln -s /usr/local/share/sip/Qt5 /usr/local/share/sip/PyQt5`` - - ``brew install graphviz`` - - ``python3 -m pip install pygraphviz pydot`` - - .. note:: - - You may run into an issue installing ``pygraphviz``, "error: Error locating graphviz". - Try the following install command instead: - - .. code-block:: bash - - python3 -m pip install --install-option="--include-path=/usr/local/include/" --install-option="--library-path=/usr/local/lib/" pygraphviz - -* - Install SROS2 dependencies - - ``python3 -m pip install lxml`` - -* - Install additional runtime dependencies for command-line tools: - - .. code-block:: bash - - python3 -m pip install catkin_pkg cryptography empy ifcfg lark-parser lxml netifaces numpy pyparsing pyyaml setuptools argcomplete - -Disable System Integrity Protection (SIP) ------------------------------------------ - -macOS/OS X versions >=10.11 have System Integrity Protection enabled by default. -So that SIP doesn't prevent processes from inheriting dynamic linker environment variables, such as ``DYLD_LIBRARY_PATH``, you'll need to disable it `following these instructions `__. - -Downloading ROS 2 ------------------ - -* Go to the releases page: https://github.com/ros2/ros2/releases -* Download the latest package for macOS; let's assume that it ends up at ``~/Downloads/ros2-release-distro-date-macos-amd64.tar.bz2``. - - * Note: there may be more than one binary download option which might cause the file name to differ. - -* - Unpack it: - - .. code-block:: bash - - mkdir -p ~/ros2_eloquent - cd ~/ros2_eloquent - tar xf ~/Downloads/ros2-release-distro-date-macos-amd64.tar.bz2 - -Install additional DDS implementations (optional) -------------------------------------------------- - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Environment setup ------------------ - -Source the ROS 2 setup file: - -.. code-block:: bash - - . ~/ros2_eloquent/ros2-osx/setup.bash - -Try some examples ------------------ - -In one terminal, set up the ROS 2 environment as described above and then run a C++ ``talker``: - -.. code-block:: bash - - ros2 run demo_nodes_cpp talker - -In another terminal, set up the ROS 2 environment and then run a Python ``listener``: - -.. code-block:: bash - - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Eloquent install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_eloquent diff --git a/source/Installation/Rolling/Fedora-Development-Setup.rst b/source/Installation/Fedora-Development-Setup.rst similarity index 100% rename from source/Installation/Rolling/Fedora-Development-Setup.rst rename to source/Installation/Fedora-Development-Setup.rst diff --git a/source/Installation/Foxy.rst b/source/Installation/Foxy.rst deleted file mode 100644 index 75f4b8ec3b0..00000000000 --- a/source/Installation/Foxy.rst +++ /dev/null @@ -1,38 +0,0 @@ -.. _FoxyInstall: - -Installing ROS 2 Foxy Fitzroy -============================= - -.. toctree:: - :hidden: - :glob: - - Foxy/* - -Binary packages ---------------- - -We provide ROS 2 binary packages for the following platforms: - -* Linux (Ubuntu Focal(20.04)) - - * `Debian packages ` - * `"fat" archive ` - -* `macOS ` -* `Windows ` - - -.. _Foxy_building-from-source: - -Building from source --------------------- - -We support building ROS 2 from source on the following platforms: - - -* `Linux ` -* `macOS ` -* `Windows ` - -.. include:: _Install-Types.rst diff --git a/source/Installation/Foxy/Fedora-Development-Setup.rst b/source/Installation/Foxy/Fedora-Development-Setup.rst deleted file mode 100644 index ffa159be528..00000000000 --- a/source/Installation/Foxy/Fedora-Development-Setup.rst +++ /dev/null @@ -1,57 +0,0 @@ -Building ROS 2 on Fedora Linux -============================== - -How to setup the development environment? ------------------------------------------ - -The following system dependencies are required to build ROS 2 on Fedora. They can be installed with ``dnf`` as follows: - -.. code-block:: bash - - $ sudo dnf install \ - asio-devel \ - cmake \ - cppcheck \ - eigen3-devel \ - gcc-c++ \ - liblsan \ - libXaw-devel \ - libyaml-devel \ - make \ - opencv-devel \ - patch \ - python3-argcomplete \ - python3-colcon-common-extensions \ - python3-coverage \ - python3-devel \ - python3-empy \ - python3-lark-parser \ - python3-lxml \ - python3-mock \ - python3-mypy \ - python3-nose \ - python3-pip \ - python3-pydocstyle \ - python3-pyflakes \ - python3-pyparsing \ - python3-pytest \ - python3-pytest-cov \ - python3-pytest-mock \ - python3-pytest-runner \ - python3-rosdep \ - python3-setuptools \ - python3-vcstool \ - python3-yaml \ - poco-devel \ - poco-foundation \ - python3-flake8 \ - python3-flake8-import-order \ - redhat-rpm-config \ - tinyxml-devel \ - tinyxml2-devel \ - uncrustify \ - wget - - -With this done, you can follow the rest of the `instructions ` to fetch and build ROS 2. - diff --git a/source/Installation/Foxy/Linux-Development-Setup.rst b/source/Installation/Foxy/Linux-Development-Setup.rst deleted file mode 100644 index 1f98f07271f..00000000000 --- a/source/Installation/Foxy/Linux-Development-Setup.rst +++ /dev/null @@ -1,217 +0,0 @@ -Building ROS 2 on Linux -======================= - -.. contents:: Table of Contents - :depth: 2 - :local: - - -System requirements -------------------- -Target platforms for Foxy Fitzroy are (see `REP 2000 `__): - -- Tier 1: Ubuntu Linux - Focal Fossa (20.04) 64-bit - -Tier 3 platforms (not actively tested or supported) include: - -- Debian Linux - Buster (10) -- Fedora 32, see `alternate instructions ` -- Arch Linux, see `alternate instructions `__ -- OpenEmbedded / webOS OSE, see `alternate instructions `__ - -System setup ------------- - -Set locale -^^^^^^^^^^ - -.. include:: ../_Linux-Set-Locale.rst - -Add the ROS 2 apt repository -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. include:: ../_Apt-Repositories.rst - -Install development tools and ROS tools -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: bash - - sudo apt update && sudo apt install -y \ - build-essential \ - cmake \ - git \ - libbullet-dev \ - python3-colcon-common-extensions \ - python3-flake8 \ - python3-pip \ - python3-pytest-cov \ - python3-rosdep \ - python3-setuptools \ - python3-vcstool \ - wget - # install some pip packages needed for testing - python3 -m pip install -U \ - argcomplete \ - flake8-blind-except \ - flake8-builtins \ - flake8-class-newline \ - flake8-comprehensions \ - flake8-deprecated \ - flake8-docstrings \ - flake8-import-order \ - flake8-quotes \ - pytest-repeat \ - pytest-rerunfailures \ - pytest - # install Fast-RTPS dependencies - sudo apt install --no-install-recommends -y \ - libasio-dev \ - libtinyxml2-dev - # install Cyclone DDS dependencies - sudo apt install --no-install-recommends -y \ - libcunit1-dev - -.. _Foxy_linux-dev-get-ros2-code: - -Get ROS 2 code --------------- - -Create a workspace and clone all repos: - -.. code-block:: bash - - mkdir -p ~/ros2_foxy/src - cd ~/ros2_foxy - wget https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos - vcs import src < ros2.repos - -Install dependencies using rosdep ---------------------------------- - -.. code-block:: bash - - sudo rosdep init - rosdep update - rosdep install --from-paths src --ignore-src --rosdistro foxy -y --skip-keys "console_bridge fastcdr fastrtps rti-connext-dds-5.3.1 urdfdom_headers" - -Install additional DDS implementations (optional) -------------------------------------------------- - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Build the code in the workspace -------------------------------- -More info on working with a ROS workspace can be found in `this tutorial `. - -.. code-block:: bash - - cd ~/ros2_foxy/ - colcon build --symlink-install - -Note: if you are having trouble compiling all examples and this is preventing you from completing a successful build, you can use ``AMENT_IGNORE`` in the same manner as `CATKIN_IGNORE `__ to ignore the subtree or remove the folder from the workspace. -Take for instance: you would like to avoid installing the large OpenCV library. -Well then simply ``$ touch AMENT_IGNORE`` in the ``cam2image`` demo directory to leave it out of the build process. - -Optionally install all packages into a combined directory (rather than each package in a separate subdirectory). -On Windows due to limitations of the length of environment variables you should use this option when building workspaces with many (~ >> 100 packages). - -Also, if you have already installed ROS 2 from Debian make sure that you run the ``build`` command in a fresh environment. -You may want to make sure that you do not have ``source /opt/ros/${ROS_DISTRO}/setup.bash`` in your ``.bashrc``. - - -.. code-block:: bash - - colcon build --symlink-install --merge-install - -Afterwards source the ``local_setup.*`` from the ``install`` folder. - -Environment setup ------------------ - -Source the setup script -^^^^^^^^^^^^^^^^^^^^^^^ - -Set up your environment by sourcing the following file. - -.. code-block:: bash - - . ~/ros2_foxy/install/setup.bash - -.. _latest-examples: - -Try some examples ------------------ - -In one terminal, source the setup file and then run a C++ ``talker``\ : - -.. code-block:: bash - - . ~/ros2_foxy/install/local_setup.bash - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``\ : - -.. code-block:: bash - - . ~/ros2_foxy/install/local_setup.bash - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - - -Alternate compilers -------------------- - -Using a different compiler besides gcc to compile ROS 2 is easy. If you set the environment variables ``CC`` and ``CXX`` to executables for a working C and C++ compiler, respectively, and retrigger CMake configuration (by using ``--force-cmake-config`` or by deleting the packages you want to be affected), CMake will reconfigure and use the different compiler. - -Clang -^^^^^ - -To configure CMake to detect and use Clang: - -.. code-block:: bash - - sudo apt install clang - export CC=clang - export CXX=clang++ - colcon build --cmake-force-configure - -TODO: using ThreadSanitizer, MemorySanitizer - -Stay up to date ---------------- - -See :ref:`MaintainingSource` to periodically refresh your source installation. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Foxy install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_foxy diff --git a/source/Installation/Foxy/Linux-Install-Binary.rst b/source/Installation/Foxy/Linux-Install-Binary.rst deleted file mode 100644 index 021d7ec6799..00000000000 --- a/source/Installation/Foxy/Linux-Install-Binary.rst +++ /dev/null @@ -1,143 +0,0 @@ -Installing ROS 2 on Linux -========================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -This page explains how to install ROS 2 on Linux from a pre-built binary package. - -.. note:: - - The pre-built binary does not include all ROS 2 packages. - All packages in the `ROS base variant `_ are included, and only a subset of packages in the `ROS desktop variant `_ are included. - The exact list of packages are described by the repositories listed in `this ros2.repos file `_. - -There are also `Debian packages ` available. - -System Requirements -------------------- - -We support Ubuntu Linux Focal Fossa (20.04) 64-bit x86 and 64-bit ARM. - -Add the ROS 2 apt repository ----------------------------- - -.. include:: ../_Apt-Repositories.rst - -Downloading ROS 2 ------------------ - - -* Go `the releases page `_ -* Download the latest package for Linux; let's assume that it ends up at ``~/Downloads/ros2-foxy-linux-x86_64.tar.bz2``. - - * Note: there may be more than one binary download option which might cause the file name to differ. - -* - Unpack it: - - .. code-block:: bash - - mkdir -p ~/ros2_foxy - cd ~/ros2_foxy - tar xf ~/Downloads/ros2-foxy-linux-x86_64.tar.bz2 - -Installing and initializing rosdep ----------------------------------- - -.. code-block:: bash - - sudo apt update - sudo apt install -y python3-rosdep - sudo rosdep init - rosdep update - - -Installing the missing dependencies ------------------------------------ - -Set your rosdistro according to the release you downloaded. - -.. code-block:: bash - - rosdep install --from-paths ros2-linux/share --ignore-src --rosdistro foxy -y --skip-keys "console_bridge fastcdr fastrtps osrf_testing_tools_cpp poco_vendor rmw_connext_cpp rosidl_typesupport_connext_c rosidl_typesupport_connext_cpp rti-connext-dds-5.3.1 tinyxml_vendor tinyxml2_vendor urdfdom urdfdom_headers" - -#. *Optional*\ : if you want to use the ROS 1<->2 bridge, then you must also install ROS 1. - Follow the normal install instructions: https://wiki.ros.org/noetic/Installation/Ubuntu - -Installing the python3 libraries -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. code-block:: bash - - sudo apt install -y libpython3-dev python3-pip - pip3 install -U argcomplete - -Install additional DDS implementations (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Environment setup ------------------ - -Sourcing the setup script -^^^^^^^^^^^^^^^^^^^^^^^^^ - -Set up your environment by sourcing the following file. - -.. code-block:: bash - - . ~/ros2_foxy/ros2-linux/setup.bash - -Try some examples ------------------ - -In one terminal, source the setup file and then run a C++ ``talker``: - -.. code-block:: bash - - . ~/ros2_foxy/ros2-linux/setup.bash - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``: - -.. code-block:: bash - - . ~/ros2_foxy/ros2-linux/setup.bash - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found `here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Foxy install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_foxy diff --git a/source/Installation/Foxy/Linux-Install-Debians.rst b/source/Installation/Foxy/Linux-Install-Debians.rst deleted file mode 100644 index 9dad984254a..00000000000 --- a/source/Installation/Foxy/Linux-Install-Debians.rst +++ /dev/null @@ -1,125 +0,0 @@ -Installing ROS 2 via Debian Packages -==================================== - -.. contents:: Table of Contents - :depth: 2 - :local: - -Debian packages for ROS 2 Foxy Fitzroy are available for Ubuntu Focal. - -Resources ---------- - -* Status Page: - - * ROS 2 Foxy (Ubuntu Focal): `amd64 `__\ , `arm64 `__ -* `Jenkins Instance `__ -* `Repositories `__ - -Set locale ----------- - -.. include:: ../_Linux-Set-Locale.rst - -Setup Sources -------------- - -.. include:: ../_Apt-Repositories.rst - -.. _Foxy_linux-install-debians-install-ros-2-packages: - -Install ROS 2 packages ----------------------- - -Update your apt repository caches after setting up the repositories. - -.. code-block:: bash - - sudo apt update - -Desktop Install (Recommended): ROS, RViz, demos, tutorials. - -.. code-block:: bash - - sudo apt install ros-foxy-desktop - -ROS-Base Install (Bare Bones): Communication libraries, message packages, command line tools. -No GUI tools. - -.. code-block:: bash - - sudo apt install ros-foxy-ros-base - -Environment setup ------------------ - -Sourcing the setup script -^^^^^^^^^^^^^^^^^^^^^^^^^ - -Set up your environment by sourcing the following file. - -.. code-block:: bash - - source /opt/ros/foxy/setup.bash - -Install argcomplete (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -ROS 2 command line tools use argcomplete to autocompletion. -So if you want autocompletion, installing argcomplete is necessary. - -.. code-block:: bash - - sudo apt install -y python3-pip - pip3 install -U argcomplete - -Try some examples ------------------ - -If you installed ``ros-foxy-desktop`` above you can try some examples. - -In one terminal, source the setup file and then run a C++ ``talker``\ : - -.. code-block:: bash - - source /opt/ros/foxy/setup.bash - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``\ : - -.. code-block:: bash - - source /opt/ros/foxy/setup.bash - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found `here `. - -Uninstall ---------- - -If you need to uninstall ROS 2 or switch to a source-based install once you -have already installed from binaries, run the following command: - -.. code-block:: bash - - sudo apt remove ros-foxy-* && sudo apt autoremove diff --git a/source/Installation/Foxy/Windows-Development-Setup.rst b/source/Installation/Foxy/Windows-Development-Setup.rst deleted file mode 100644 index f9b034e4e38..00000000000 --- a/source/Installation/Foxy/Windows-Development-Setup.rst +++ /dev/null @@ -1,374 +0,0 @@ -Building ROS 2 on Windows -========================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -This guide is about how to set up a development environment for ROS 2 on Windows. - -Prerequisites -------------- - -First follow the steps for `Installing Prerequisites ` on the Binary Installation page. - -Stop and return here when you reach the "Downloading ROS 2" section. - -Additional prerequisites -^^^^^^^^^^^^^^^^^^^^^^^^ - -When building from source you'll need a few additional prerequisites installed. - -Install additional prerequisites from Chocolatey -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -First install git: - -.. code-block:: bash - - > choco install -y git - -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". -In the resulting dialog, click "Environment Variables", the click "Path" on the bottom pane, then click "Edit" and add the path). - - -Install developer tools ------------------------ - -Now we are ready to install some our tools that we use to help in developing ROS 2. - -Let's start with ``vcstool``: - -.. code-block:: bash - - > pip install -U vcstool - -You can test it out by just running ``vcs`` (you should be able to do this in the same cmd prompt). - -Next, install ``colcon``: - -.. code-block:: bash - - > pip install -U colcon-common-extensions - -You can test it out by just running ``colcon`` (you should be able to do this in the same cmd prompt). - -Also, you should install ``curl``: - -.. code-block:: bash - - > choco install -y curl - -Install dependencies --------------------- - -Next install the latest version of ``setuptools`` and ``pip``: - -.. code-block:: bash - - > -m pip install -U setuptools pip - -Where ``PATH_TO_PYTHON_EXECUTABLE`` looks like: ``c:\python38\python.exe`` - -Then you can continue installing other Python dependencies: - -.. code-block:: bash - - > pip install -U catkin_pkg cryptography EmPy ifcfg lark-parser lxml numpy pyparsing pyyaml - -Next install testing tools like ``pytest`` and others: - -.. code-block:: bash - - > pip install -U pytest pytest-mock coverage mock - -Next install linters and checkers like ``flake8`` and others: - -.. code-block:: bash - - > pip install -U flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes mypy pep8 pydocstyle - -Next install cppcheck: - -.. code-block:: bash - - > choco install -y cppcheck - -Next install xmllint: - -* Download the `64 bit binary archives `__ of ``libxml2`` (and its dependencies ``iconv`` and ``zlib``) from https://www.zlatkovic.com/projects/libxml/ -* Unpack all archives into e.g. ``C:\xmllint`` -* Add ``C:\xmllint\bin`` to the ``PATH``. - -Install Qt5 -^^^^^^^^^^^ - -This section is only required if you are building rviz, but it comes with our default set of sources, so if you don't know, then assume you are building it. - -First get the installer from Qt's website: - -https://www.qt.io/download - -Select the Open Source version and then the ``Qt Online Installer for Windows``. - -Run the installer and install Qt5. - -We recommend you install it to the default location of ``C:\Qt``, but if you choose somewhere else, make sure to update the paths below accordingly. -When selecting components to install, the only thing you absolutely need for Foxy and later is the appropriate MSVC 64-bit component under the ``Qt`` -> ``Qt 5.15.0`` tree. -We're using ``5.15.0`` as of the writing of this document and that's what we recommend since that's all we test on Windows, but later version will probably work too. -For Foxy and later, be sure to select ``MSVC 2019 64-bit``. -After that, the default settings are fine. - -Finally, set the ``Qt5_DIR`` environment variable in the ``cmd.exe`` where you intend to build so that CMake can find it: - -.. code-block:: bash - - > set Qt5_DIR=C:\Qt\5.15.0\msvc2019_64 - -You could set it permanently with ``setx -m Qt5_DIR C:\Qt\5.15.0\msvc2019_64`` instead, but that requires Administrator. - -.. note:: - - This path might change based on which MSVC version you're using or if you installed it to a different directory. - -Get the ROS 2 code ------------------- - -Now that we have the development tools we can get the ROS 2 source code. - -First setup a development folder, for example ``C:\dev\ros2_foxy``: - -.. code-block:: bash - - > md \dev\ros2_foxy\src - > cd \dev\ros2_foxy - -Get the ``ros2.repos`` file which defines the repositories to clone from: - -.. code-block:: bash - - # CMD - > curl -sk https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos -o ros2.repos - - # PowerShell - > curl https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos -o ros2.repos - -Next you can use ``vcs`` to import the repositories listed in the ``ros2.repos`` file: - -.. code-block:: bash - - # CMD - > vcs import src < ros2.repos - - # PowerShell - > vcs import --input ros2.repos src - -Install additional DDS implementations (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Build the ROS 2 code --------------------- - -.. _windows-dev-build-ros2: - -To build ROS 2 you will need a Visual Studio Command Prompt ("x64 Native Tools Command Prompt for VS 2019") running as Administrator. - -Fast RTPS is bundled with the ROS 2 source and will always be built unless you put an ``AMENT_IGNORE`` file in the ``src\eProsima`` folder. - -To build the ``\dev\ros2_foxy`` folder tree: - -.. code-block:: bash - - > colcon build --merge-install - -.. note:: - - We're using ``--merge-install`` here to avoid a ``PATH`` variable that is too long at the end of the build. - If you're adapting these instructions to build a smaller workspace then you might be able to use the default behavior which is isolated install, i.e. where each package is installed to a different folder. - -.. note:: - - If you are doing a debug build use ``python_d path\to\colcon_executable build --cmake-args -DCMAKE_BUILD_TYPE=Debug``. - See `Extra stuff for debug mode`_ for more info on running Python code in debug builds on Windows. - -Environment setup ------------------ - -Start a command shell and source the ROS 2 setup file to set up the workspace: - -.. code-block:: bash - - > call C:\dev\ros2_foxy\install\local_setup.bat - -This will automatically set up the environment for any DDS vendors that support was built for. - -It is normal that the previous command, if nothing else went wrong, outputs "The system cannot find the path specified." exactly once. - -Test and run ------------- - -Note that the first time you run any executable you will have to allow access to the network through a Windows Firewall popup. - -You can run the tests using this command: - -.. code-block:: bash - - > colcon test --merge-install - -.. note:: - - ``--merge-install`` should only be used if it was also used in the build step. - -Afterwards you can get a summary of the tests using this command: - -.. code-block:: bash - - > colcon test-result - -To run the examples, first open a clean new ``cmd.exe`` and set up the workspace by sourcing the ``local_setup.bat`` file. -Then, run a C++ ``talker``\ : - -.. code-block:: bash - - > call install\local_setup.bat - > ros2 run demo_nodes_cpp talker - -In a separate shell you can do the same, but instead run a Python ``listener``\ : - -.. code-block:: bash - - > call install\local_setup.bat - > ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -.. note:: - - It is not recommended to build in the same cmd prompt that you've sourced the ``local_setup.bat``. - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - - -Extra stuff for Debug mode --------------------------- - -If you want to be able to run all the tests in Debug mode, you'll need to install a few more things: - - -* To be able to extract the Python source tarball, you can use PeaZip: - -.. code-block:: bash - - > choco install -y peazip - - -* You'll also need SVN, since some of the Python source-build dependencies are checked out via SVN: - -.. code-block:: bash - - > choco install -y svn hg - - -* You'll need to quit and restart the command prompt after installing the above. -* Get and extract the Python 3.8.3 source from the ``tgz``: - - * https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz - * To keep these instructions concise, please extract it to ``C:\dev\Python-3.8.3`` - -* Now, build the Python source in debug mode from a Visual Studio command prompt: - -.. code-block:: bash - - > cd C:\dev\Python-3.8.3\PCbuild - > get_externals.bat - > build.bat -p x64 -d - - -* Finally, copy the build products into the Python38 installation directories, next to the Release-mode Python executable and DLL's: - -.. code-block:: bash - - > cd C:\dev\Python-3.8.3\PCbuild\amd64 - > copy python_d.exe C:\Python38 /Y - > copy python38_d.dll C:\Python38 /Y - > copy python3_d.dll C:\Python38 /Y - > copy python38_d.lib C:\Python38\libs /Y - > copy python3_d.lib C:\Python38\libs /Y - > for %I in (*_d.pyd) do copy %I C:\Python38\DLLs /Y - - -* Now, from a fresh command prompt, make sure that ``python_d`` works: - -.. code-block:: bash - - > python_d - >>> import _ctypes - -* Once you have verified the operation of ``python_d``, it is necessary to reinstall a few dependencies with the debug-enabled libraries: - -.. code-block:: bash - - > 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 - > 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 - -* To verify the installation of these dependencies: - -.. code-block:: bash - - > python_d - # No import errors should appear when executing the following lines - >>> from lxml import etree - >>> import numpy - -* When you wish to return to building release binaries, it is necessary to uninstall the debug variants and use the release variants: - -.. code-block:: bash - - > python -m pip uninstall numpy lxml - > python -m pip install numpy lxml - -* To create executables python scripts(.exe), python_d should be used to invoke colcon, along with the corresponding CMake build type. - If you installed colcon using pip, the path to the colcon executable can be found with ``pip show colcon-core``. - -.. code-block:: bash - - > python_d path\to\colcon_executable build --merge-install --cmake-args -DCMAKE_BUILD_TYPE=Debug - -* Hooray, you're done! - -Stay up to date ---------------- - -See :ref:`MaintainingSource` to periodically refresh your source installation. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Foxy install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rmdir /s /q \ros2_foxy diff --git a/source/Installation/Foxy/Windows-Install-Binary.rst b/source/Installation/Foxy/Windows-Install-Binary.rst deleted file mode 100644 index 765509b6602..00000000000 --- a/source/Installation/Foxy/Windows-Install-Binary.rst +++ /dev/null @@ -1,303 +0,0 @@ -Installing ROS 2 on Windows -=========================== - -.. contents:: Table of Contents - :depth: 2 - :local: - -This page explains how to install ROS 2 on Windows from a pre-built binary package. - -.. note:: - - The pre-built binary does not include all ROS 2 packages. - All packages in the `ROS base variant `_ are included, and only a subset of packages in the `ROS desktop variant `_ are included. - The exact list of packages are described by the repositories listed in `this ros2.repos file `_. - -System requirements -------------------- - -Only Windows 10 is supported. - -.. _Foxy_windows-install-binary-installing-prerequisites: - -Installing prerequisites ------------------------- - -Install Chocolatey -^^^^^^^^^^^^^^^^^^ - -Chocolatey is a package manager for Windows, install it by following their installation instructions: - -https://chocolatey.org/ - -You'll use Chocolatey to install some other developer tools. - -Install Python -^^^^^^^^^^^^^^ - -Open a Command Prompt and type the following to install Python via Chocolatey: - -.. code-block:: bash - - > choco install -y python --version 3.8.3 - -ROS 2 expects the python installation to be available in directory ``C:\python38``. -Double check that it is installed there. - -Install Visual C++ Redistributables -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Open a Command Prompt and type the following to install them via Chocolatey: - -.. code-block:: bash - - > choco install -y vcredist2013 vcredist140 - -Install OpenSSL -^^^^^^^^^^^^^^^ - -Download the *Win64 OpenSSL v1.1.1h* OpenSSL installer from `this page `__. -Scroll to the bottom of the page and download *Win64 OpenSSL v1.1.1h*. -Don't download the Win32 or Light versions. - -Run the installer with default parameters. - -The following command sets an environment variable that persists over sessions. -Modify the command to match your installation directory: - -* ``setx -m OPENSSL_CONF "C:\Program Files\OpenSSL-Win64\bin\openssl.cfg"`` - -You will also need to append the OpenSSL-Win64 bin folder to your PATH. -You can do this by clicking the Windows icon, typing "Environment Variables", then clicking on "Edit the system environment variables". -In the resulting dialog, click "Environment Variables", then click "Path" on the bottom pane, finally click "Edit" and add the path below. - -* ``C:\Program Files\OpenSSL-Win64\bin\`` - -Install Visual Studio -^^^^^^^^^^^^^^^^^^^^^ - -Install Visual Studio 2019. - -If you already have a paid version of Visual Studio 2019 (Professional, Enterprise), skip this step. - -Microsoft provides a free of charge version of Visual Studio 2019, named Community, which can be used to build applications that use ROS 2: - - https://visualstudio.microsoft.com/downloads/ - -Make sure that the Visual C++ features are installed. - -An easy way to make sure they're installed is to select the ``Desktop development with C++`` workflow during the install. - - .. image:: https://i.imgur.com/2h0IxCk.png - -Make sure that no C++ CMake tools are installed by unselecting them in the list of components to be installed. - -Install additional DDS implementations (optional) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Install OpenCV -^^^^^^^^^^^^^^ - -Some of the examples require OpenCV to be installed. - -You can download a precompiled version of OpenCV 3.4.6 from https://github.com/ros2/ros2/releases/download/opencv-archives/opencv-3.4.6-vc16.VS2019.zip . - -Assuming you unpacked it to ``C:\opencv``\ , type the following on a Command Prompt (requires Admin privileges): - -.. code-block:: bash - - setx -m OpenCV_DIR C:\opencv - -Since you are using a precompiled ROS version, we have to tell it where to find the OpenCV libraries. -You have to extend the ``PATH`` variable to ``C:\opencv\x64\vc16\bin``. - -Install dependencies -^^^^^^^^^^^^^^^^^^^^ - -There are a few dependencies not available in the Chocolatey package database. -In order to ease the manual installation process, we provide the necessary Chocolatey packages. - -As some chocolatey packages rely on it, we start by installing CMake - -.. code-block:: bash - - > choco install -y cmake - -You will need to append the CMake bin folder ``C:\Program Files\CMake\bin`` to your PATH. - -Please download these packages from `this `__ GitHub repository. - -* asio.1.12.1.nupkg -* bullet.2.89.0.nupkg -* cunit.2.1.3.nupkg -* eigen-3.3.4.nupkg -* tinyxml-usestl.2.6.2.nupkg -* tinyxml2.6.0.0.nupkg -* log4cxx.0.10.0.nupkg - -Once these packages are downloaded, open an administrative shell and execute the following command: - -.. code-block:: bash - - > choco install -y -s asio cunit eigen tinyxml-usestl tinyxml2 log4cxx bullet - -Please replace ```` with the folder you downloaded the packages to. - -You must also install some python dependencies for command-line tools: - -.. code-block:: bash - - python -m pip install -U catkin_pkg cryptography empy ifcfg lark-parser lxml netifaces numpy opencv-python pyparsing pyyaml setuptools - -RQt dependencies -~~~~~~~~~~~~~~~~ - -.. code-block:: bash - - python -m pip install -U pydot PyQt5 - -.. _Foxy_windows-install-binary-installing-rqt-dependencies: - -To run rqt_graph, you'll need `Graphviz `__. - -.. code-block:: bash - - > choco install graphviz - -You will need to append the Graphviz bin folder ``C:\Program Files (x86)\GraphvizX.XX\bin`` to your PATH, by navigating to "Edit the system environment variables" as described above. - -Downloading ROS 2 ------------------ - -* Go the releases page: https://github.com/ros2/ros2/releases -* Download the latest package for Windows, e.g., ``ros2-foxy-*-windows-AMD64.zip``. - -.. note:: - - There may be more than one binary download option which might cause the file name to differ. - -.. note:: - - To download the ROS 2 debug libraries you'll need to download ``ros2-foxy-*-windows-debug-AMD64.zip`` - -* Unpack the zip file somewhere (we'll assume ``C:\dev\ros2_foxy``\ ). - -Environment setup ------------------ - -Start a command shell and source the ROS 2 setup file to set up the workspace: - -.. tabs:: - - .. group-tab:: Command Prompt - - .. code-block:: bash - - > call C:\dev\ros2_foxy\local_setup.bat - - .. group-tab:: PowerShell - - .. code-block:: bash - - > C:\dev\ros2_foxy\local_setup.ps1 - -It is normal that the previous command, if nothing else went wrong, outputs "The system cannot find the path specified." exactly once. - -Try some examples ------------------ - -In a command shell, set up the ROS 2 environment as described above and then run a C++ ``talker``\ : - -.. code-block:: bash - - > ros2 run demo_nodes_cpp talker - -Start another command shell and run a Python ``listener``\ : - -.. code-block:: bash - - > ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Foxy install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rmdir /s /q \ros2_foxy - -(Alternative) ROS 2 Build Installation from aka.ms/ros --------------------------------------------------------- - -https://aka.ms/ros project hosts ROS 2 builds against the release snapshots. -This section explains how to install ROS 2 from this channel. - -Install ROS 2 builds -^^^^^^^^^^^^^^^^^^^^ - -In an administrative command prompt, run the following commands. - -.. code-block:: bash - - > mkdir c:\opt\chocolatey - > set PYTHONNOUSERSITE=1 - > set ChocolateyInstall=c:\opt\chocolatey - > choco source add -n=ros-win -s="https://aka.ms/ros/public" --priority=1 - > choco upgrade ros-foxy-desktop -y --execution-timeout=0 - -Environment setup -^^^^^^^^^^^^^^^^^^ - -Start an administrative command prompt and source the ROS 2 setup file to set up the workspace: - -.. code-block:: bash - - > call C:\opt\ros\foxy\x64\local_setup.bat - -Stay up-to-date -^^^^^^^^^^^^^^^ - -To keep up-to-date with the latest builds, run: - -.. code-block:: bash - - > set ChocolateyInstall=c:\opt\chocolatey - > choco upgrade all -y --execution-timeout=0 - -Uninstall -^^^^^^^^^ - -If you want to completely remove the environment downloaded above, run this command: - -.. code-block:: bash - - > rmdir /s /q C:\opt\ diff --git a/source/Installation/Foxy/macOS-Development-Setup.rst b/source/Installation/Foxy/macOS-Development-Setup.rst deleted file mode 100644 index e51a7cc06eb..00000000000 --- a/source/Installation/Foxy/macOS-Development-Setup.rst +++ /dev/null @@ -1,224 +0,0 @@ -.. redirect-from:: - - Installation/Foxy/OSX-Development-Setup - -Building ROS 2 on macOS -======================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -System requirements -------------------- - -We support macOS 10.14 (Mojave). - -However, some new versions like 10.13.x and some older versions like 10.11.x and 10.10.x are known to work as well. - -Install prerequisites ---------------------- - -You need the following things installed to build ROS 2: - - -#. - **Xcode** - - - * - If you don't already have it installed, install Xcode and the Command Line Tools: - - .. code-block:: bash - - xcode-select --install - sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer - -#. - **brew** *(needed to install more stuff; you probably already have this)*: - - - * Follow installation instructions at http://brew.sh/ - * - *Optional*: Check that ``brew`` is happy with your system configuration by running: - - .. code-block:: bash - - brew doctor - - Fix any problems that it identifies. - -#. - Use ``brew`` to install more stuff: - - .. code-block:: bash - - brew install cmake cppcheck eigen pcre poco tinyxml wget bullet - - brew install python@3.8 - brew unlink python - # Make the python command be Python 3.8 - brew link --force python@3.8 - - # install dependencies for Fast-RTPS if you are using it - brew install asio tinyxml2 - - brew install opencv - - # install console_bridge for rosbag2 - brew install console_bridge - - # install OpenSSL for DDS-Security - brew install openssl - # if you are using ZSH, then replace '.bashrc' with '.zshrc' - echo "export OPENSSL_ROOT_DIR=$(brew --prefix openssl)" >> ~/.bashrc - - # install dependencies for rcl_logging - brew install log4cxx spdlog - - # install CUnit for Cyclone DDS - brew install cunit - -#. - Install rviz dependencies - - .. code-block:: bash - - # install dependencies for Rviz - brew install qt freetype assimp - - # Add the Qt directory to the PATH and CMAKE_PREFIX_PATH - export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:/usr/local/opt/qt - export PATH=$PATH:/usr/local/opt/qt/bin - -#. - Install rqt dependencies - - ``brew install graphviz pyqt5 sip`` - - Fix some path names when looking for sip stuff during install (see `ROS 1 wiki `__): - - ``ln -s /usr/local/share/sip/Qt5 /usr/local/share/sip/PyQt5`` - -#. - Use ``python3 -m pip`` (just ``pip`` may install Python3 or Python2) to install more stuff: - - .. code-block:: bash - - python3 -m pip install -U argcomplete catkin_pkg colcon-common-extensions coverage cryptography empy flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes ifcfg lark-parser lxml mock mypy netifaces nose pep8 pydocstyle pydot pygraphviz pyparsing pytest-mock rosdep setuptools vcstool - - Please ensure that the ``$PATH`` environment variable contains the install location of the binaries (default: ``$HOME/Library/Python//bin``) - -#. - *Optional*: if you want to build the ROS 1<->2 bridge, then you must also install ROS 1: - - - * Start with the normal install instructions: https://wiki.ros.org/kinetic/Installation/OSX/Homebrew/Source - * - When you get to the step where you call ``rosinstall_generator`` to get the source code, here's an alternate invocation that brings in just the minimum required to produce a useful bridge: - - .. code-block:: bash - - rosinstall_generator catkin common_msgs roscpp rosmsg --rosdistro kinetic --deps --wet-only --tar > kinetic-ros2-bridge-deps.rosinstall - wstool init -j8 src kinetic-ros2-bridge-deps.rosinstall - - - Otherwise, just follow the normal instructions, then source the resulting ``install_isolated/setup.bash`` before proceeding here to build ROS 2. - -Disable System Integrity Protection (SIP) ------------------------------------------ - -macOS/OS X versions >=10.11 have System Integrity Protection enabled by default. -So that SIP doesn't prevent processes from inheriting dynamic linker environment variables, such as ``DYLD_LIBRARY_PATH``, you'll need to disable it `following these instructions `__. - -Get the ROS 2 code ------------------- - -Create a workspace and clone all repos: - -.. code-block:: bash - - mkdir -p ~/ros2_foxy/src - cd ~/ros2_foxy - wget https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos - vcs import src < ros2.repos - -Install additional DDS vendors (optional) ------------------------------------------ - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Build the ROS 2 code --------------------- -Run the ``colcon`` tool to build everything (more on using ``colcon`` in `this tutorial `): - -.. code-block:: bash - - cd ~/ros2_foxy/ - colcon build --symlink-install - -Environment setup ------------------ - -Source the ROS 2 setup file: - -.. code-block:: bash - - . ~/ros2_foxy/install/setup.bash - -This will automatically set up the environment for any DDS vendors that support was built for. - -Try some examples ------------------ - -In one terminal, set up the ROS 2 environment as described above and then run a C++ ``talker``: - -.. code-block:: bash - - ros2 run demo_nodes_cpp talker - -In another terminal source the setup file and then run a Python ``listener``: - -.. code-block:: bash - - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - - -Stay up to date ---------------- - -See :ref:`MaintainingSource` to periodically refresh your source installation. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Foxy install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_foxy diff --git a/source/Installation/Foxy/macOS-Install-Binary.rst b/source/Installation/Foxy/macOS-Install-Binary.rst deleted file mode 100644 index b9be96d6467..00000000000 --- a/source/Installation/Foxy/macOS-Install-Binary.rst +++ /dev/null @@ -1,204 +0,0 @@ -.. redirect-from:: - - Installation/Foxy/OSX-Install-Binary - -Installing ROS 2 on macOS -========================= - -.. contents:: Table of Contents - :depth: 2 - :local: - -This page explains how to install ROS 2 on macOS from a pre-built binary package. - -.. note:: - - The pre-built binary does not include all ROS 2 packages. - All packages in the `ROS base variant `_ are included, and only a subset of packages in the `ROS desktop variant `_ are included. - The exact list of packages are described by the repositories listed in `this ros2.repos file `_. - -System requirements -------------------- - -We support macOS Mojave (10.14). - -.. _Foxy_osx-install-binary-installling-prerequisites: - -Installing prerequisites ------------------------- - -You need the following things installed before installing ROS 2. - - -* - **brew** *(needed to install more stuff; you probably already have this)*: - - - * Follow installation instructions at http://brew.sh/ - * - *Optional*: Check that ``brew`` is happy with your system configuration by running: - - .. code-block:: bash - - brew doctor - - - Fix any problems that it identifies. - -* - Use ``brew`` to install more stuff: - - .. code-block:: bash - - brew install python@3.8 - # Unlink in case you have python@3.7 installed already - brew unlink python - # Make the python command be Python 3.8 - brew link --force python@3.8 - - # install asio and tinyxml2 for Fast-RTPS - brew install asio tinyxml2 - - # install dependencies for robot state publisher - brew install tinyxml eigen pcre poco - - # OpenCV isn't a dependency of ROS 2, but it is used by some demos. - brew install opencv - - # install OpenSSL for DDS-Security - brew install openssl - # if you are using ZSH, then replace '.bashrc' with '.zshrc' - echo "export OPENSSL_ROOT_DIR=$(brew --prefix openssl)" >> ~/.bashrc - - # install Qt for RViz - brew install qt freetype assimp - - # install console_bridge for rosbag2 - brew install console_bridge - - # install dependencies for rcl_logging_log4cxx - brew install log4cxx spdlog - - # install CUnit for Cyclone DDS - brew install cunit - -* - Install rqt dependencies - - ``brew install sip pyqt5`` - - Fix some path names when looking for sip stuff during install (see `ROS 1 wiki `__): - - ``ln -s /usr/local/share/sip/Qt5 /usr/local/share/sip/PyQt5`` - - ``brew install graphviz`` - - ``python3 -m pip install pygraphviz pydot`` - - .. note:: - - You may run into an issue installing ``pygraphviz``, "error: Error locating graphviz". - Try the following install command instead: - - .. code-block:: bash - - python3 -m pip install --install-option="--include-path=/usr/local/include/" --install-option="--library-path=/usr/local/lib/" pygraphviz - -* - Install SROS2 dependencies - - ``python3 -m pip install lxml`` - -* - Install additional runtime dependencies for command-line tools: - - .. code-block:: bash - - python3 -m pip install catkin_pkg empy ifcfg lark-parser lxml netifaces numpy pyparsing pyyaml setuptools argcomplete - -Disable System Integrity Protection (SIP) ------------------------------------------ - -macOS/OS X versions >=10.11 have System Integrity Protection enabled by default. -So that SIP doesn't prevent processes from inheriting dynamic linker environment variables, such as ``DYLD_LIBRARY_PATH``, you'll need to disable it `following these instructions `__. - -Downloading ROS 2 ------------------ - -* Go to the releases page: https://github.com/ros2/ros2/releases -* Download the latest package for macOS; let's assume that it ends up at ``~/Downloads/ros2-release-distro-date-macos-amd64.tar.bz2``. - - * Note: there may be more than one binary download option which might cause the file name to differ. - -* - Unpack it: - - .. code-block:: bash - - mkdir -p ~/ros2_foxy - cd ~/ros2_foxy - tar xf ~/Downloads/ros2-release-distro-date-macos-amd64.tar.bz2 - -Install additional DDS implementations (optional) -------------------------------------------------- - -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. - -Environment setup ------------------ - -Source the ROS 2 setup file: - -.. code-block:: bash - - . ~/ros2_foxy/ros2-osx/setup.bash - -Try some examples ------------------ - -In one terminal, set up the ROS 2 environment as described above and then run a C++ ``talker``: - -.. code-block:: bash - - ros2 run demo_nodes_cpp talker - -In another terminal, set up the ROS 2 environment and then run a Python ``listener``: - -.. code-block:: bash - - ros2 run demo_nodes_py listener - -You should see the ``talker`` saying that it's ``Publishing`` messages and the ``listener`` saying ``I heard`` those messages. -This verifies both the C++ and Python APIs are working properly. -Hooray! - - -Next steps after installing ---------------------------- -Continue with the `tutorials and demos ` to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts. - -Using the ROS 1 bridge ----------------------- -The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated `documentation `__ on how to build and use the ROS 1 bridge. - -Additional RMW implementations (optional) ------------------------------------------ -The default middleware that ROS 2 uses is ``Fast-RTPS``, but the middleware (RMW) can be replaced at runtime. -See the `tutorial ` on how to work with multiple RMWs. - -Troubleshooting ---------------- - -Troubleshooting techniques can be found :ref:`here `. - -Uninstall ---------- - -1. If you installed your workspace with colcon as instructed above, "uninstalling" could be just a matter of opening a new terminal and not sourcing the workspace's ``setup`` file. - This way, your environment will behave as though there is no Foxy install on your system. - -2. If you're also trying to free up space, you can delete the entire workspace directory with: - - .. code-block:: bash - - rm -rf ~/ros2_foxy diff --git a/source/Installation/Latest-Development-Setup.rst b/source/Installation/Latest-Development-Setup.rst index ae73ecc038a..9c11c1e7891 100644 --- a/source/Installation/Latest-Development-Setup.rst +++ b/source/Installation/Latest-Development-Setup.rst @@ -19,8 +19,8 @@ Building from source Follow the links below for the latest setup instructions for your platform: -* :ref:`Linux ` -* :ref:`macOS ` -* :ref:`Windows ` +* `Linux ` +* `macOS ` +* `Windows ` For keeping your source code up-to-date, see `Maintaining a Source Checkout `. diff --git a/source/Installation/Rolling/Linux-Development-Setup.rst b/source/Installation/Linux-Development-Setup.rst similarity index 97% rename from source/Installation/Rolling/Linux-Development-Setup.rst rename to source/Installation/Linux-Development-Setup.rst index 2abe68df16b..6265e05a88b 100644 --- a/source/Installation/Rolling/Linux-Development-Setup.rst +++ b/source/Installation/Linux-Development-Setup.rst @@ -29,12 +29,12 @@ System setup Set locale ^^^^^^^^^^ -.. include:: ../_Linux-Set-Locale.rst +.. include:: _Linux-Set-Locale.rst Add the ROS 2 apt repository ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. include:: ../_Apt-Repositories.rst +.. include:: _Apt-Repositories.rst Install development tools and ROS tools ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -97,6 +97,8 @@ Create a workspace and clone all repos: wget https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos vcs import src < ros2.repos +.. _linux-development-setup-install-dependencies-using-rosdep: + Install dependencies using rosdep --------------------------------- @@ -109,7 +111,7 @@ Install dependencies using rosdep Install additional DDS implementations (optional) ------------------------------------------------- -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. +If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here `. Build the code in the workspace ------------------------------- @@ -150,6 +152,8 @@ Set up your environment by sourcing the following file. . ~/ros2_rolling/install/setup.bash +.. _talker-listener: + Try some examples ----------------- diff --git a/source/Installation/Rolling/Linux-Install-Binary.rst b/source/Installation/Linux-Install-Binary.rst similarity index 97% rename from source/Installation/Rolling/Linux-Install-Binary.rst rename to source/Installation/Linux-Install-Binary.rst index e4e101598f3..95c7c0d6dc1 100644 --- a/source/Installation/Rolling/Linux-Install-Binary.rst +++ b/source/Installation/Linux-Install-Binary.rst @@ -25,7 +25,7 @@ Most people will want to use a stable ROS distribution. Add the ROS 2 apt repository ---------------------------- -.. include:: ../_Apt-Repositories.rst +.. include:: _Apt-Repositories.rst Downloading ROS 2 ----------------- @@ -56,6 +56,7 @@ Installing and initializing rosdep sudo rosdep init rosdep update +.. _linux-install-binary-install-missing-dependencies: Installing the missing dependencies ----------------------------------- @@ -80,7 +81,7 @@ Installing the python3 libraries Install additional DDS implementations (optional) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. +If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here `. Environment setup ----------------- diff --git a/source/Installation/Rolling/Linux-Install-Debians.rst b/source/Installation/Linux-Install-Debians.rst similarity index 95% rename from source/Installation/Rolling/Linux-Install-Debians.rst rename to source/Installation/Linux-Install-Debians.rst index 9563db4d0da..051252cb2a0 100644 --- a/source/Installation/Rolling/Linux-Install-Debians.rst +++ b/source/Installation/Linux-Install-Debians.rst @@ -23,14 +23,16 @@ Resources Set locale ---------- -.. include:: ../_Linux-Set-Locale.rst +.. include:: _Linux-Set-Locale.rst + +.. _linux-install-debians-setup-sources: Setup Sources ------------- -.. include:: ../_Apt-Repositories.rst +.. include:: _Apt-Repositories.rst -.. _Rolling_linux-install-debians-install-ros-2-packages: +.. _linux-install-debians-install-ros-2-packages: Install ROS 2 packages ---------------------- diff --git a/source/Installation/Maintaining-a-Source-Checkout.rst b/source/Installation/Maintaining-a-Source-Checkout.rst index 5886bb4eddb..f1a7230e330 100644 --- a/source/Installation/Maintaining-a-Source-Checkout.rst +++ b/source/Installation/Maintaining-a-Source-Checkout.rst @@ -15,77 +15,6 @@ Update your repository list Each ROS 2 release includes a ``ros2.repos`` file that contains the list of repositories and their version for that release. -Release versions -^^^^^^^^^^^^^^^^ - -If you wish to update a particular release, you can get its repository list by specifying the codename of the release in the URL of the following step, e.g. foxy: - -.. tabs:: - - .. group-tab:: Linux - - .. code-block:: bash - - cd ~/ros2_ws - mv -i ros2.repos ros2.repos.old - wget https://raw.githubusercontent.com/ros2/ros2/release-foxy/ros2.repos - - .. group-tab:: macOS - - .. code-block:: bash - - cd ~/ros2_ws - mv -i ros2.repos ros2.repos.old - wget https://raw.githubusercontent.com/ros2/ros2/release-foxy/ros2.repos - - .. group-tab:: Windows - - .. code-block:: bash - - # CMD - > cd \dev\ros2 - > curl -sk https://raw.githubusercontent.com/ros2/ros2/release-foxy/ros2.repos -o ros2.repos - - # PowerShell - > cd \dev\ros2 - > curl https://raw.githubusercontent.com/ros2/ros2/release-foxy/ros2.repos -o ros2.repos - -The format of the name of the release comes from the tag associated with the release `here `__. - -Release development branches -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you wish to checkout development branches for a particular release, you can get its repository list by specifying the codename of the release in the URL of the following step, e.g. foxy: - -.. tabs:: - - .. group-tab:: Linux - - .. code-block:: bash - - cd ~/ros2_ws - mv -i ros2.repos ros2.repos.old - wget https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos - - .. group-tab:: macOS - - .. code-block:: bash - - cd ~/ros2_ws - mv -i ros2.repos ros2.repos.old - wget https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos - - .. group-tab:: Windows - - .. code-block:: bash - - # CMD - > cd \dev\ros2 - > curl -sk https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos -o ros2.repos - - # PowerShell - > cd \dev\ros2 - > curl https://raw.githubusercontent.com/ros2/ros2/foxy/ros2.repos -o ros2.repos Latest development branches ^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/source/Installation/Prerelease-Testing.rst b/source/Installation/Prerelease-Testing.rst index e8ee5150008..0850a802d1b 100644 --- a/source/Installation/Prerelease-Testing.rst +++ b/source/Installation/Prerelease-Testing.rst @@ -31,7 +31,7 @@ For Debian-based operating systems, you can install binary packages from the **r .. code-block:: sh - sudo apt install ros-foxy-my-just-released-package + sudo apt install ros-rolling-my-just-released-package 5. Alternatively, you can move your entire ROS 2 installation to the testing repository: diff --git a/source/Installation/Rolling.rst b/source/Installation/Rolling.rst deleted file mode 100644 index b114ca5964d..00000000000 --- a/source/Installation/Rolling.rst +++ /dev/null @@ -1,40 +0,0 @@ -.. _RollingInstall: - -Installing ROS 2 Rolling Ridley -=============================== - -.. toctree:: - :hidden: - :glob: - - Rolling/* - -Binary packages ---------------- - -We currently provide ROS 2 binary packages for the following platforms: - -* Linux (Ubuntu Focal(20.04)) - - * `Debian packages ` - * `"fat" archive ` - -* `macOS ` -* `Windows ` - -As defined in `REP 2000 `_ - - -.. _Rolling_building-from-source: - -Building from source --------------------- - -We support building ROS 2 from source on the following platforms: - - -* `Linux ` -* `macOS ` -* `Windows ` - -.. include:: _Install-Types.rst diff --git a/source/Installation/_Install-Types.rst b/source/Installation/Summary.rst similarity index 64% rename from source/Installation/_Install-Types.rst rename to source/Installation/Summary.rst index 61a64e874e4..94e97367465 100644 --- a/source/Installation/_Install-Types.rst +++ b/source/Installation/Summary.rst @@ -1,3 +1,37 @@ +.. _RollingInstall: + +Installing ROS 2 Rolling Ridley +=============================== + + +Binary packages +--------------- + +We currently provide ROS 2 binary packages for the following platforms: + +* Linux (Ubuntu Focal(20.04)) + + * `Debian packages ` + * `"fat" archive ` + +* `macOS ` +* `Windows ` + +As defined in `REP 2000 `_ + + +.. _building-from-source: + +Building from source +-------------------- + +We support building ROS 2 from source on the following platforms: + + +* `Linux ` +* `macOS ` +* `Windows ` + Which install should you choose? -------------------------------- @@ -26,5 +60,3 @@ macOS and Windows users who choose to install from binary packages only have the **Building from source** is meant for developers looking to alter or explicitly omit parts of ROS 2's base. It is also recommended for platforms that don't support binaries. Building from source also gives you the option to install the absolute latest version of ROS 2. - -.. TODO: add reference to "General Install" instructions "...if you don't see your operating system" diff --git a/source/Installation/Rolling/Windows-Development-Setup.rst b/source/Installation/Windows-Development-Setup.rst similarity index 98% rename from source/Installation/Rolling/Windows-Development-Setup.rst rename to source/Installation/Windows-Development-Setup.rst index dd3228dde39..b9f17280e56 100644 --- a/source/Installation/Rolling/Windows-Development-Setup.rst +++ b/source/Installation/Windows-Development-Setup.rst @@ -12,7 +12,7 @@ This guide is about how to setup a development environment for ROS 2 on Windows. Prerequisites ------------- -First follow the steps for `Installing Prerequisites ` on the Binary Installation page. +First follow the steps for `Installing Prerequisites ` on the Binary Installation page. Stop and return here when you reach the "Downloading ROS 2" section. @@ -177,7 +177,7 @@ Next you can use ``vcs`` to import the repositories listed in the ``ros2.repos`` Install additional DDS implementations (optional) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. +If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here `. Build the ROS 2 code -------------------- diff --git a/source/Installation/Rolling/Windows-Install-Binary.rst b/source/Installation/Windows-Install-Binary.rst similarity index 99% rename from source/Installation/Rolling/Windows-Install-Binary.rst rename to source/Installation/Windows-Install-Binary.rst index 207c7cc9ea2..b8be051c8e5 100644 --- a/source/Installation/Rolling/Windows-Install-Binary.rst +++ b/source/Installation/Windows-Install-Binary.rst @@ -18,7 +18,7 @@ System requirements Only Windows 10 is supported. -.. _Rolling_windows-install-binary-installing-prerequisites: +.. _windows-install-binary-installing-prerequisites: Installing prerequisites ------------------------ @@ -90,7 +90,7 @@ Make sure that no C++ CMake tools are installed by unselecting them in the list Install additional DDS implementations (optional) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. +If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here `. Install OpenCV ^^^^^^^^^^^^^^ diff --git a/source/Installation/Rolling/macOS-Development-Setup.rst b/source/Installation/macOS-Development-Setup.rst similarity index 99% rename from source/Installation/Rolling/macOS-Development-Setup.rst rename to source/Installation/macOS-Development-Setup.rst index 86819823eb1..57a98430945 100644 --- a/source/Installation/Rolling/macOS-Development-Setup.rst +++ b/source/Installation/macOS-Development-Setup.rst @@ -148,7 +148,7 @@ Create a workspace and clone all repos: Install additional DDS vendors (optional) ----------------------------------------- -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. +If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here `. Build the ROS 2 code -------------------- diff --git a/source/Installation/Rolling/macOS-Install-Binary.rst b/source/Installation/macOS-Install-Binary.rst similarity index 99% rename from source/Installation/Rolling/macOS-Install-Binary.rst rename to source/Installation/macOS-Install-Binary.rst index 6e48aece672..6cd8a4b85be 100644 --- a/source/Installation/Rolling/macOS-Install-Binary.rst +++ b/source/Installation/macOS-Install-Binary.rst @@ -146,7 +146,7 @@ Instead you may download nightly `prerelease binaries `. Install additional DDS implementations (optional) ------------------------------------------------- -If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here <../DDS-Implementations>`. +If you would like to use another DDS or RTPS vendor besides the default, eProsima's Fast RTPS, you can find instructions `here `. Environment setup ----------------- diff --git a/source/Releases/Beta2-Overview.rst b/source/Releases/Beta2-Overview.rst index 573c88e6829..bd23834a2b1 100644 --- a/source/Releases/Beta2-Overview.rst +++ b/source/Releases/Beta2-Overview.rst @@ -22,7 +22,7 @@ Improvements since Beta 1 release ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * DDS_Security support (aka SROS2, see `sros2 `__) -* Debian packages for Ubuntu Xenial (see `Debian install instructions <../Installation/Crystal/Linux-Install-Debians>`). +* Debian packages for Ubuntu Xenial * Typesupport has been redesigned so that you only build a single executable and can choose one of the available RMW implementations by setting an environment variable (see `documentation <../Tutorials/Working-with-multiple-RMW-implementations>`). * Namespace support for nodes and topics (see `design article `__, see known issues below). * A set of command-line tools using the extensible ``ros2`` command (see `tutorial <../Tutorials/Introspection-with-command-line-tools>`). diff --git a/source/Releases/Release-Dashing-Diademata.rst b/source/Releases/Release-Dashing-Diademata.rst index b534785c861..22207bc9875 100644 --- a/source/Releases/Release-Dashing-Diademata.rst +++ b/source/Releases/Release-Dashing-Diademata.rst @@ -33,7 +33,7 @@ For more information about RMW implementations, compiler / interpreter versions, Installation ------------ -`Install Dashing Diademata <../Installation/Dashing>` +`Install Dashing Diademata <../dashing/Installation/Summary.html>`__ New features in this ROS 2 release ---------------------------------- diff --git a/source/Releases/Release-Eloquent-Elusor.rst b/source/Releases/Release-Eloquent-Elusor.rst index 368c19a1001..8c0be65a890 100644 --- a/source/Releases/Release-Eloquent-Elusor.rst +++ b/source/Releases/Release-Eloquent-Elusor.rst @@ -33,7 +33,7 @@ For more information about RMW implementations, compiler / interpreter versions, Installation ------------ -`Install Eloquent Elusor <../Installation/Eloquent>` +`Install Eloquent Elusor <../eloquent/Installation/Summary.html>`__ New features in this ROS 2 release ---------------------------------- diff --git a/source/Releases/Release-Foxy-Fitzroy.rst b/source/Releases/Release-Foxy-Fitzroy.rst index 87039e99dc8..4a584a62c35 100644 --- a/source/Releases/Release-Foxy-Fitzroy.rst +++ b/source/Releases/Release-Foxy-Fitzroy.rst @@ -31,7 +31,7 @@ For more information about RMW implementations, compiler / interpreter versions, Installation ------------ -`Install Foxy Fitzroy <../Installation/Foxy>` +`Install Foxy Fitzroy <../foxy/Installation/Summary.html>`__ New features in this ROS 2 release ---------------------------------- diff --git a/source/Releases/Release-Rolling-Ridley.rst b/source/Releases/Release-Rolling-Ridley.rst index 08ec7abde09..34d4d0b4aa8 100644 --- a/source/Releases/Release-Rolling-Ridley.rst +++ b/source/Releases/Release-Rolling-Ridley.rst @@ -35,7 +35,7 @@ Tier 3 platforms: Installation ------------ -`Install Rolling Ridley <../Installation/Rolling>` +`Install Rolling Ridley <../Installation/Summary>` New features and changes in this release ---------------------------------------- diff --git a/source/Troubleshooting/Installation-Troubleshooting.rst b/source/Troubleshooting/Installation-Troubleshooting.rst index 132904965a4..a3f55d3c86e 100644 --- a/source/Troubleshooting/Installation-Troubleshooting.rst +++ b/source/Troubleshooting/Installation-Troubleshooting.rst @@ -141,42 +141,6 @@ If you see build errors related to Qt, e.g.: you may be using qt4 instead of qt5: see https://github.com/ros2/ros2/issues/441 -Qt build error: ``"mkspecs/macx-clang" but this file does not exist`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. only on Crystal - -To fix this error: - -.. code-block:: bash - - CMake Error at /usr/local/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:15 (message): - The imported target "Qt5::Core" references the file - - "/usr/local/.//mkspecs/macx-clang" - - but this file does not exist. Possible reasons include: - - * The file was deleted, renamed, or moved to another location. - - * An install or uninstall procedure did not complete successfully. - - * The installation package was faulty and contained - - "/usr/local/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake" - - but not all the files it references. - -link ``mkspecs`` and ``plugins`` folders to ``/usr/local/``: - -.. code-block:: bash - - export HOMEBREW_QT5_VERSION=5.12.3 # Specify appropriate Qt5 version here - sudo ln -s /usr/local/Cellar/qt/$HOMEBREW_QT5_VERSION/mkspecs /usr/local/mkspecs - sudo ln -s /usr/local/Cellar/qt/$HOMEBREW_QT5_VERSION/plugins /usr/local/plugins - -If you are on a previous version of Homebrew, the ``qt`` formula could still be called ``qt5``, so make corresponding changes to the paths above. - Missing symbol when opencv (and therefore libjpeg, libtiff, and libpng) are installed with Homebrew ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -267,7 +231,7 @@ While following the `Creating a workspace `). +If so, make sure to install all the dependencies listed in the "Installing prerequisites" sections of the `installation instructions `). If you are installing from binaries, you may need to update your dependencies: they must be the same version as those used to build the binaries. @@ -344,15 +308,8 @@ patch.exe opens a new command window and asks for administrator This will also cause the build of packages which need to use patch to fail, even you allow it to use administrator rights. -On Foxy or later: - - ``choco uninstall patch; colcon build --cmake-clean-cache`` - This is a bug in the `GNU Patch For Windows package `_. If this package is not installed, the build process will instead use the version of Patch distributed with git. -On Eloquent or earlier: - -- Make sure you're building in a Visual Studio command prompt which has been run as administrator. -- On some machines canceling the prompt without selecting "Yes" will also work. - Failed to load Fast RTPS shared library ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/source/Tutorials.rst b/source/Tutorials.rst index 35e10508e33..bbb9f15380c 100644 --- a/source/Tutorials.rst +++ b/source/Tutorials.rst @@ -8,12 +8,7 @@ Beginner The beginner-level tutorials are a collection of step-by-step instructions meant to introduce newcomers to ROS 2. It starts with using the Commandline Interface (CLI) tools, then moves on to the C++ and Python client libraries. - -.. warning:: - - Please walk through the tutorials for the first time in order, they build off of each other and are not meant to be comprehensive documentation. - These tutorials are under construction, so please share your `feedback `__. - The :ref:`Contact ` page includes more ways to get help. +Please walk through the tutorials for the first time in order, they build off of each other and are not meant to be comprehensive documentation. Beginner: CLI Tools ^^^^^^^^^^^^^^^^^^^ diff --git a/source/Tutorials/Actions/Creating-an-Action.rst b/source/Tutorials/Actions/Creating-an-Action.rst index b13938662ec..4395ca892a7 100644 --- a/source/Tutorials/Actions/Creating-an-Action.rst +++ b/source/Tutorials/Actions/Creating-an-Action.rst @@ -164,27 +164,15 @@ So when we want to refer to our new action, it will have the full name ``action_ We can check that our action built successfully with the command line tool: -.. tabs:: - - .. group-tab:: Dashing - - .. code-block:: bash - # Source our workspace - # On Windows: call install/setup.bat - . install/setup.bash - # Check that our action definition exists - ros2 action show action_tutorials_interfaces/action/Fibonacci - - .. group-tab:: Eloquent and newer +.. code-block:: bash - .. code-block:: bash + # Source our workspace + # On Windows: call install/setup.bat + . install/setup.bash + # Check that our action definition exists + ros2 interface show action_tutorials/action/Fibonacci - # Source our workspace - # On Windows: call install/setup.bat - . install/setup.bash - # Check that our action definition exists - ros2 interface show action_tutorials_interfaces/action/Fibonacci You should see the Fibonacci action definition printed to the screen. diff --git a/source/Tutorials/Ament-CMake-Documentation.rst b/source/Tutorials/Ament-CMake-Documentation.rst index e36b4ba3a95..bb561d2fe3f 100644 --- a/source/Tutorials/Ament-CMake-Documentation.rst +++ b/source/Tutorials/Ament-CMake-Documentation.rst @@ -125,56 +125,32 @@ Building a Library When building a reusable library, some information needs to be exported for downstream packages to easily use it. -.. tabs:: - - .. group-tab:: Foxy and newer - - .. code-block:: cmake - - ament_export_targets(export_my_library HAS_LIBRARY_TARGET) - ament_export_dependencies(some_dependency) - - install( - DIRECTORY include/ - DESTINATION include - ) - - install( - TARGETS my_library - EXPORT export_my_library - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - RUNTIME DESTINATION bin - INCLUDES DESTINATION include - ) - - .. group-tab:: Eloquent and older +.. code-block:: cmake - .. code-block:: cmake + ament_export_targets(export_my_library HAS_LIBRARY_TARGET) + ament_export_dependencies(some_dependency) - ament_export_interfaces(export_my_library HAS_LIBRARY_TARGET) - ament_export_dependencies(some_dependency) + install( + DIRECTORY include/ + DESTINATION include + ) - install( - DIRECTORY include/ - DESTINATION include - ) + install( + TARGETS my_library + EXPORT export_my_library + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin + INCLUDES DESTINATION include + ) - install( - TARGETS my_library - EXPORT export_my_library - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - RUNTIME DESTINATION bin - INCLUDES DESTINATION include - ) Here, we assume that the folder ``include`` contains the headers which need to be exported. Note that it is not necessary to put all headers into a separate folder, only those that should be included by clients. Here is what's happening in the snippet above: -- The ``ament_export_targets`` macro (``ament_export_interfaces`` in Eloquent and older) exports the targets for CMake. +- The ``ament_export_targets`` macro exports the targets for CMake. This is necessary to allow your library's clients to use the ``target_link_libraries(client my_library::my_library)`` syntax. ``ament_export_targets`` can take an arbitrary list of targets named as ``EXPORT`` in an install call and an additional option ``HAS_LIBRARY_TARGET``, which adds potential libraries to environment variables. diff --git a/source/Tutorials/Colcon-Tutorial.rst b/source/Tutorials/Colcon-Tutorial.rst index 3973e1b723c..4b4662e63f6 100644 --- a/source/Tutorials/Colcon-Tutorial.rst +++ b/source/Tutorials/Colcon-Tutorial.rst @@ -56,7 +56,7 @@ To build the samples, you will need to install ROS 2. Follow the `installation instructions <../Installation>`. -.. attention:: If installing from Debian packages, this tutorial requires the `desktop installation `. +.. attention:: If installing from Debian packages, this tutorial requires the `desktop installation `. Basics ------ diff --git a/source/Tutorials/Configuring-ROS2-Environment.rst b/source/Tutorials/Configuring-ROS2-Environment.rst index f4b58e61f8d..ffb0d0e78b0 100644 --- a/source/Tutorials/Configuring-ROS2-Environment.rst +++ b/source/Tutorials/Configuring-ROS2-Environment.rst @@ -54,13 +54,7 @@ You will need to run this command on every new shell you open to have access to .. code-block:: console - source /opt/ros//setup.bash - - For example, if you installed ROS 2 Eloquent: - - .. code-block:: console - - source /opt/ros/eloquent/setup.bash + source /opt/ros/rolling/setup.bash .. group-tab:: macOS @@ -89,7 +83,7 @@ If you don’t want to have to source the setup file every time you open a new s .. code-block:: console - echo "source /opt/ros//setup.bash" >> ~/.bashrc + echo "source /opt/ros/rolling/setup.bash" >> ~/.bashrc .. group-tab:: macOS @@ -105,7 +99,7 @@ If you don’t want to have to source the setup file every time you open a new s .. code-block:: console - C:\dev\ros2_foxy\local_setup.ps1 + C:\dev\ros2_rolling\local_setup.ps1 PowerShell will request permission to run this script everytime a new shell is opened. @@ -166,13 +160,12 @@ If you ever have problems finding or using your ROS 2 packages, make sure that y set | findstr -i ROS Check that variables like ``ROS_DISTRO`` and ``ROS_VERSION`` are set. -For example, if you're using Foxy, you would see: :: ROS_VERSION=2 ROS_PYTHON_VERSION=3 - ROS_DISTRO=foxy + ROS_DISTRO=rolling If the environment variables are not set correctly, return to the ROS 2 package installation section of the installation guide you followed. If you need more specific help (because environment setup files can come from different places), you can `get answers `__ from the community. @@ -239,23 +232,3 @@ Next steps ---------- Now that you have a working ROS 2 installation and you know how to source its setup files, you can start learning the ins and outs of ROS 2 with the :ref:`turtlesim tool `. - - -Related content ---------------- - -See this video demonstration that shows an installation of ROS 2 on a Raspberry Pi: - -.. tabs:: - - .. group-tab:: Foxy - - .. raw:: html - - - - .. group-tab:: Dashing - - .. raw:: html - - diff --git a/source/Tutorials/Custom-ROS2-Interfaces.rst b/source/Tutorials/Custom-ROS2-Interfaces.rst index fa917731387..292ceb90d39 100644 --- a/source/Tutorials/Custom-ROS2-Interfaces.rst +++ b/source/Tutorials/Custom-ROS2-Interfaces.rst @@ -153,19 +153,10 @@ In a new terminal, run the following command from within your workspace (``dev_w Now you can confirm that your interface creation worked by using the ``ros2 interface show`` command: -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: console - - ros2 interface show tutorial_interfaces/msg/Num - .. group-tab:: Dashing - - .. code-block:: console +.. code-block:: console - ros2 msg show tutorial_interfaces/msg/Num + ros2 interface show tutorial_interfaces/msg/Num should return: @@ -175,19 +166,9 @@ should return: And -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: console - - ros2 interface show tutorial_interfaces/srv/AddThreeInts - - .. group-tab:: Dashing - - .. code-block:: console +.. code-block:: console - ros2 srv show tutorial_interfaces/srv/AddThreeInts + ros2 interface show tutorial_interfaces/srv/AddThreeInts should return: diff --git a/source/Tutorials/Developing-a-ROS-2-Package.rst b/source/Tutorials/Developing-a-ROS-2-Package.rst index 859fb232122..0e2975489c2 100644 --- a/source/Tutorials/Developing-a-ROS-2-Package.rst +++ b/source/Tutorials/Developing-a-ROS-2-Package.rst @@ -15,7 +15,7 @@ It is intended for developers who want to learn how to create custom packages in Prerequisites ------------- -- `Install ROS (Dashing or later) <../../Installation>`__ +- `Install ROS <../../Installation>`__ - `Install colcon `__ diff --git a/source/Tutorials/Getting-Started-With-Ros2doctor.rst b/source/Tutorials/Getting-Started-With-Ros2doctor.rst index df496741a53..4e149ee047c 100644 --- a/source/Tutorials/Getting-Started-With-Ros2doctor.rst +++ b/source/Tutorials/Getting-Started-With-Ros2doctor.rst @@ -23,9 +23,7 @@ When your ROS 2 setup is not running as expected, you can check its settings wit Prerequisites ------------- -.. warning:: - - ``ros2doctor`` is only available in Eloquent and newer distributions. +``ros2doctor`` is only available in Eloquent and newer distributions. ``ros2doctor`` is part of the ``ros2cli`` package. As long as you have ``ros2cli`` installed (which any normal install should have), you will be able to use ``ros2doctor``. diff --git a/source/Tutorials/Launch-Files/Creating-Launch-Files.rst b/source/Tutorials/Launch-Files/Creating-Launch-Files.rst index 85cd481bcdd..7f3fe6f7084 100644 --- a/source/Tutorials/Launch-Files/Creating-Launch-Files.rst +++ b/source/Tutorials/Launch-Files/Creating-Launch-Files.rst @@ -79,71 +79,37 @@ Let’s put together a ROS 2 launch file using the ``turtlesim`` package and its Copy and paste the complete code into the ``turtlesim_mimic_launch.py`` file: -.. tabs:: - .. group-tab:: Foxy and newer - - .. code-block:: python - - from launch import LaunchDescription - from launch_ros.actions import Node - - def generate_launch_description(): - return LaunchDescription([ - Node( - package='turtlesim', - namespace='turtlesim1', - executable='turtlesim_node', - name='sim' - ), - Node( - package='turtlesim', - namespace='turtlesim2', - executable='turtlesim_node', - name='sim' - ), - Node( - package='turtlesim', - executable='mimic', - name='mimic', - remappings=[ - ('/input/pose', '/turtlesim1/turtle1/pose'), - ('/output/cmd_vel', '/turtlesim2/turtle1/cmd_vel'), - ] - ) - ]) - - .. group-tab:: Eloquent and older - - .. code-block:: python - - from launch import LaunchDescription - from launch_ros.actions import Node - - def generate_launch_description(): - return LaunchDescription([ - Node( - package='turtlesim', - node_namespace='turtlesim1', - node_executable='turtlesim_node', - node_name='sim' - ), - Node( - package='turtlesim', - node_namespace='turtlesim2', - node_executable='turtlesim_node', - node_name='sim' - ), - Node( - package='turtlesim', - node_executable='mimic', - node_name='mimic', - remappings=[ - ('/input/pose', '/turtlesim1/turtle1/pose'), - ('/output/cmd_vel', '/turtlesim2/turtle1/cmd_vel'), - ] - ) - ]) +.. code-block:: python + + from launch import LaunchDescription + from launch_ros.actions import Node + + def generate_launch_description(): + return LaunchDescription([ + Node( + package='turtlesim', + namespace='turtlesim1', + executable='turtlesim_node', + name='sim' + ), + Node( + package='turtlesim', + namespace='turtlesim2', + executable='turtlesim_node', + name='sim' + ), + Node( + package='turtlesim', + executable='mimic', + name='mimic', + remappings=[ + ('/input/pose', '/turtlesim1/turtle1/pose'), + ('/output/cmd_vel', '/turtlesim2/turtle1/cmd_vel'), + ] + ) + ]) + 2.1 Examine the launch file @@ -170,41 +136,20 @@ The goal of the system is to launch two turtlesim windows, and have one turtle m The first two actions in the launch description launch two turtlesim windows: -.. tabs:: - - .. group-tab:: Foxy and newer - - .. code-block:: python - - Node( - package='turtlesim', - namespace='turtlesim1', - executable='turtlesim_node', - name='sim' - ), - Node( - package='turtlesim', - namespace='turtlesim2', - executable='turtlesim_node', - name='sim' - ), - - .. group-tab:: Eloquent and older +.. code-block:: python - .. code-block:: python - - Node( - package='turtlesim', - node_namespace='turtlesim1', - node_executable='turtlesim_node', - node_name='sim' - ), - Node( - package='turtlesim', - node_namespace='turtlesim2', - node_executable='turtlesim_node', - node_name='sim' - ), + Node( + package='turtlesim', + namespace='turtlesim1', + executable='turtlesim_node', + name='sim' + ), + Node( + package='turtlesim', + namespace='turtlesim2', + executable='turtlesim_node', + name='sim' + ), Note the only difference between the two nodes is their namespace values. Unique namespaces allow the system to start two simulators without node name nor topic name conflicts. @@ -214,36 +159,18 @@ Without unique namespaces, there would be no way to distinguish between messages The final node is also from the ``turtlesim`` package, but a different executable: ``mimic``. -.. tabs:: - - .. group-tab:: Foxy and newer - - .. code-block:: python - - Node( - package='turtlesim', - executable='mimic', - name='mimic', - remappings=[ - ('/input/pose', '/turtlesim1/turtle1/pose'), - ('/output/cmd_vel', '/turtlesim2/turtle1/cmd_vel'), - ] - ) - - .. group-tab:: Eloquent and older - - .. code-block:: python +.. code-block:: python - Node( - package='turtlesim', - node_executable='mimic', - node_name='mimic', - remappings=[ - ('/input/pose', '/turtlesim1/turtle1/pose'), - ('/output/cmd_vel', '/turtlesim2/turtle1/cmd_vel'), - ] - ) + Node( + package='turtlesim', + executable='mimic', + name='mimic', + remappings=[ + ('/input/pose', '/turtlesim1/turtle1/pose'), + ('/output/cmd_vel', '/turtlesim2/turtle1/cmd_vel'), + ] + ) This node has added configuration details in the form of remappings. diff --git a/source/Tutorials/Launch-system.rst b/source/Tutorials/Launch-system.rst index dfbe5aa0153..61c781fa92b 100644 --- a/source/Tutorials/Launch-system.rst +++ b/source/Tutorials/Launch-system.rst @@ -86,49 +86,25 @@ If you do change the suffix, make sure to adjust the ``glob()`` argument in your Your launch file should define the ``generate_launch_description()`` which returns a ``launch.LaunchDescription()`` to be used by the ``ros2 launch`` verb. -.. tabs:: - - .. group-tab:: Foxy and newer - - .. code-block:: python - - import launch - import launch.actions - import launch.substitutions - import launch_ros.actions - - - def generate_launch_description(): - return launch.LaunchDescription([ - launch.actions.DeclareLaunchArgument( - 'node_prefix', - default_value=[launch.substitutions.EnvironmentVariable('USER'), '_'], - description='Prefix for node names'), - launch_ros.actions.Node( - package='demo_nodes_cpp', executable='talker', output='screen', - name=[launch.substitutions.LaunchConfiguration('node_prefix'), 'talker']), - ]) - - .. group-tab:: Eloquent and older +.. code-block:: python - .. code-block:: python + import launch + import launch.actions + import launch.substitutions + import launch_ros.actions - import launch - import launch.actions - import launch.substitutions - import launch_ros.actions + def generate_launch_description(): + return launch.LaunchDescription([ + launch.actions.DeclareLaunchArgument( + 'node_prefix', + default_value=[launch.substitutions.EnvironmentVariable('USER'), '_'], + description='Prefix for node names'), + launch_ros.actions.Node( + package='demo_nodes_cpp', executable='talker', output='screen', + name=[launch.substitutions.LaunchConfiguration('node_prefix'), 'talker']), + ]) - def generate_launch_description(): - return launch.LaunchDescription([ - launch.actions.DeclareLaunchArgument( - 'node_prefix', - default_value=[launch.substitutions.EnvironmentVariable('USER'), '_'], - description='Prefix for node names'), - launch_ros.actions.Node( - package='demo_nodes_cpp', node_executable='talker', output='screen', - node_name=[launch.substitutions.LaunchConfiguration('node_prefix'), 'talker']), - ]) Usage ^^^^^ diff --git a/source/Tutorials/Logging-and-logger-configuration.rst b/source/Tutorials/Logging-and-logger-configuration.rst index dadbdfe976d..ed6474f5b79 100644 --- a/source/Tutorials/Logging-and-logger-configuration.rst +++ b/source/Tutorials/Logging-and-logger-configuration.rst @@ -166,19 +166,10 @@ Logger level configuration: command line As of the Bouncy ROS 2 release, the severity level for loggers that have not had their severity set explicitly can be configured from the command line. Restart the demo including the following command line argument: -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: bash - - ros2 run logging_demo logging_demo_main --ros-args --log-level debug - .. group-tab:: Dashing - - .. code-block:: bash +.. code-block:: bash - ros2 run logging_demo logging_demo_main __log_level:=debug + ros2 run logging_demo logging_demo_main --ros-args --log-level debug This configures the default severity for any unset logger to the debug severity level. You should see debug output from loggers from the demo itself and from the ROS 2 core. @@ -265,7 +256,6 @@ You should see that debug, warn, error and fatal logs aren't colorized now. Default stream for console output ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -In Dashing and Eloquent, the output from DEBUG and INFO severity are printed out to stdout, and the output from WARN, ERROR, and FATAL are printed to stderr. In Foxy and later, the output from all debug levels goes to stderr by default. It is possible to force all output to go to stdout by setting the ``RCUTILS_LOGGING_USE_STDOUT`` environment variable to ``1``. For example: @@ -293,44 +283,6 @@ For example: Line buffered console output ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Dashing and Eloquent -"""""""""""""""""""" - -By default, INFO and DEBUG log calls aren't line buffered. -You can force it using ``RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED`` environment variable. -For example: - -.. tabs:: - - .. group-tab:: Linux - - .. code-block:: bash - - export RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED=1 - - .. group-tab:: macOS - - .. code-block:: bash - - export RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED=1 - - .. group-tab:: Windows - - .. code-block:: bash - - set "RCUTILS_CONSOLE_STDOUT_LINE_BUFFERED=1" - -Then run: - -.. code-block:: bash - - ros2 run logging_demo logging_demo_main - -The output should look as before. -For details about I/O buffering, see `buffering concepts `_. - -Foxy -"""" By default, all logging output is unbuffered. You can force it to be buffered by setting the ``RCUTILS_LOGGING_BUFFERED_STREAM`` environment variable to 1. diff --git a/source/Tutorials/Node-arguments.rst b/source/Tutorials/Node-arguments.rst index 8bd059b1adc..780d603cb6e 100644 --- a/source/Tutorials/Node-arguments.rst +++ b/source/Tutorials/Node-arguments.rst @@ -14,35 +14,20 @@ All ROS nodes take a set of arguments that allow various properties to be reconf Examples include configuring the name/namespace of the node, topic/service names used, and parameters on the node. All ros specific arguments have to be specified after a ``--ros-args`` flag: -.. tabs:: - .. group-tab:: Eloquent and newer - - .. code-block:: bash - - ros2 run my_package node_executable --ros-args ... - - .. group-tab:: Dashing +.. code-block:: bash - .. code-block:: bash + ros2 run my_package node_executable --ros-args ... - ros2 run my_package node_executable ... For more details, see `this design doc `__. Name remapping -------------- -.. tabs:: - - .. group-tab:: Eloquent and newer - - Names within a node (e.g. topics/services) can be remapped using the syntax ``-r :=``. - The name/namespace of the node itself can be remapped using ``-r __node:=`` and ``-r __ns:=``. +Names within a node (e.g. topics/services) can be remapped using the syntax ``-r :=``. +The name/namespace of the node itself can be remapped using ``-r __node:=`` and ``-r __ns:=``. - .. group-tab:: Dashing - - Remapping rules were specified directly using ``:=``, ``__node:=``, ``__ns:=``. Note that these remappings are "static" remappings, in that they apply for the lifetime of the node. "Dynamic" remapping of names after nodes have been started is not yet supported. @@ -55,19 +40,9 @@ Example The following invocation will cause the ``talker`` node to be started under the node name ``my_talker``, publishing on the topic named ``my_topic`` instead of the default of ``chatter``. The namespace, which must start with a forward slash, is set to ``/demo``, which means that topics are created in that namespace (``/demo/my_topic``), as opposed to globally (``/my_topic``). -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: bash - - ros2 run demo_nodes_cpp talker --ros-args -r __ns:=/demo -r __node:=my_talker -r chatter:=my_topic - - .. group-tab:: Dashing - - .. code-block:: bash +.. code-block:: bash - ros2 run demo_nodes_cpp talker __ns:=/demo __node:=my_talker chatter:=my_topic + ros2 run demo_nodes_cpp talker --ros-args -r __ns:=/demo -r __node:=my_talker -r chatter:=my_topic Passing remapping arguments to specific nodes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -75,37 +50,17 @@ Passing remapping arguments to specific nodes If multiple nodes are being run within a single process (e.g. using `Composition `), remapping arguments can be passed to a specific node using its name as a prefix. For example, the following will pass the remapping arguments to the specified nodes: -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: bash - - ros2 run composition manual_composition --ros-args -r talker:__node:=my_talker -r listener:__node:=my_listener - - .. group-tab:: Dashing - - .. code-block:: bash +.. code-block:: bash - ros2 run composition manual_composition talker:__node:=my_talker listener:__node:=my_listener + ros2 run composition manual_composition --ros-args -r talker:__node:=my_talker -r listener:__node:=my_listener The following example will both change the node name and remap a topic (node and namespace changes are always applied *before* topic remapping): +.. code-block:: bash -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: bash - - ros2 run composition manual_composition --ros-args -r talker:__node:=my_talker -r my_talker:chatter:=my_topic -r listener:__node:=my_listener -r my_listener:chatter:=my_topic - - .. group-tab:: Dashing - - .. code-block:: bash + ros2 run composition manual_composition --ros-args -r talker:__node:=my_talker -r my_talker:chatter:=my_topic -r listener:__node:=my_listener -r my_listener:chatter:=my_topic - ros2 run composition manual_composition talker:__node:=my_talker my_talker:chatter:=my_topic listener:__node:=my_listener my_listener:chatter:=my_topic Logger configuration -------------------- @@ -120,35 +75,27 @@ Parameters Setting parameters directly in the command line ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. tabs:: - - .. group-tab:: Eloquent and newer - - You can set parameters directly from the command line using the following syntax: - - .. code-block:: bash +You can set parameters directly from the command line using the following syntax: - ros2 run package_name executable_name --ros-args -p param_name:=param_value - - As an example, you can run: +.. code-block:: bash - .. code-block:: bash + ros2 run package_name executable_name --ros-args -p param_name:=param_value - ros2 run demo_nodes_cpp parameter_blackboard --ros-args -p some_int:=42 -p "a_string:=Hello world" -p "some_lists.some_integers:=[1, 2, 3, 4]" -p "some_lists.some_doubles:=[3.14, 2.718]" +As an example, you can run: - Other nodes will be able to retrieve the parameter values, e.g.: +.. code-block:: bash - .. code-block:: bash + ros2 run demo_nodes_cpp parameter_blackboard --ros-args -p some_int:=42 -p "a_string:=Hello world" -p "some_lists.some_integers:=[1, 2, 3, 4]" -p "some_lists.some_doubles:=[3.14, 2.718]" - $ ros2 param list parameter_blackboard - a_string - some_int - some_lists.some_doubles - some_lists.some_integers +Other nodes will be able to retrieve the parameter values, e.g.: - .. group-tab:: Dashing +.. code-block:: bash - Not supported + $ ros2 param list parameter_blackboard + a_string + some_int + some_lists.some_doubles + some_lists.some_integers Setting parameters from YAML files ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -169,23 +116,14 @@ As an example, save the following as ``demo_params.yaml``: some_integers: [1, 2, 3, 4] some_doubles : [3.14, 2.718] -Then either declare the parameters within your node with ``declare_parameter`` or ``declare_parameters`` (see `documentation `__ for function signatures), or `set the node to automatically declare parameters `__ if they were passed in via a command line override. +Then either declare the parameters within your node with ``declare_parameter`` or ``declare_parameters`` (see `documentation `__ for function signatures), or `set the node to automatically declare parameters `__ if they were passed in via a command line override. Then run the following: -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: bash - - ros2 run demo_nodes_cpp parameter_blackboard --ros-args --params-file demo_params.yaml - - .. group-tab:: Dashing +.. code-block:: bash - .. code-block:: bash + ros2 run demo_nodes_cpp parameter_blackboard --ros-args --params-file demo_params.yaml - ros2 run demo_nodes_cpp parameter_blackboard __params:=demo_params.yaml Other nodes will be able to retrieve the parameter values, e.g.: diff --git a/source/Tutorials/Parameters/Understanding-ROS2-Parameters.rst b/source/Tutorials/Parameters/Understanding-ROS2-Parameters.rst index c73cd0a4f67..70421571af1 100644 --- a/source/Tutorials/Parameters/Understanding-ROS2-Parameters.rst +++ b/source/Tutorials/Parameters/Understanding-ROS2-Parameters.rst @@ -136,91 +136,58 @@ However, you can save your settings changes and reload them next time you start 5 ros2 param dump ^^^^^^^^^^^^^^^^^ -.. tabs:: +You can “dump” all of a node’s current parameter values into a file to save for later using the command: - .. group-tab:: Eloquent and newer - - You can “dump” all of a node’s current parameter values into a file to save for later using the command: - - .. code-block:: console - - ros2 param dump - - To save your current configuration of ``/turtlesim``’s parameters, enter the command: - - .. code-block:: console - - ros2 param dump /turtlesim - - Your terminal will return the message: +.. code-block:: console - .. code-block:: console + ros2 param dump - Saving to: ./turtlesim.yaml +To save your current configuration of ``/turtlesim``’s parameters, enter the command: - You will find a new file in the directory your workspace is running in. - If you open this file, you’ll see the following contents: +.. code-block:: console - .. code-block:: YAML + ros2 param dump /turtlesim - turtlesim: - ros__parameters: - background_b: 255 - background_g: 86 - background_r: 150 - use_sim_time: false +Your terminal will return the message: - Dumping parameters comes in handy if you want to reload the node with the same parameters in the future. +.. code-block:: console - .. group-tab:: Dashing + Saving to: ./turtlesim.yaml - Dashing does not have the ``param dump`` command. - However, it is possible to run a node with saved parameters. - The equivalent to ``param dump`` would be manually recording your current parameter values into a YAML file. +You will find a new file in the directory your workspace is running in. +If you open this file, you’ll see the following contents: - Save the following in a file named ``./turtlesim.yaml``: +.. code-block:: YAML - .. code-block:: YAML + turtlesim: + ros__parameters: + background_b: 255 + background_g: 86 + background_r: 150 + use_sim_time: false - turtlesim: - ros__parameters: - background_b: 255 - background_g: 86 - background_r: 150 - use_sim_time: false +Dumping parameters comes in handy if you want to reload the node with the same parameters in the future. 6 Load parameter file ^^^^^^^^^^^^^^^^^^^^^ -.. tabs:: - - .. group-tab:: Eloquent and newer - - To start the same node using your saved parameter values, use: - - .. code-block:: console - ros2 run --ros-args --params-file +To start the same node using your saved parameter values, use: - This is the same command you always use to start turtlesim, with the added flags ``--ros-args`` and ``--params-file``, followed by the file you want to load. - - Stop your running turtlesim node so you can try reloading it with your saved parameters, using: - - .. code-block:: console +.. code-block:: console - ros2 run turtlesim turtlesim_node --ros-args --params-file ./turtlesim.yaml + ros2 run --ros-args --params-file - The turtlesim window should appear as usual, but with the purple background you set earlier. +This is the same command you always use to start turtlesim, with the added flags ``--ros-args`` and ``--params-file``, followed by the file you want to load. - .. group-tab:: Dashing +Stop your running turtlesim node so you can try reloading it with your saved parameters, using: - To start a node using the parameter settings you manually "dumped" in the last section, run the command +.. code-block:: console - .. code-block:: console + ros2 run turtlesim turtlesim_node --ros-args --params-file ./turtlesim.yaml - ros2 run turtlesim turtlesim_node __params:=./turtlesim.yaml +The turtlesim window should appear as usual, but with the purple background you set earlier. - Where ``__params:`` is the path to your parameter file. Summary ------- diff --git a/source/Tutorials/Quality-of-Service.rst b/source/Tutorials/Quality-of-Service.rst index 9f34b60f195..f51f921f7fb 100644 --- a/source/Tutorials/Quality-of-Service.rst +++ b/source/Tutorials/Quality-of-Service.rst @@ -30,16 +30,14 @@ You will also need the ROS package ``image_tools``. .. code-block:: bash - # Replace with the distribution you're using - sudo apt-get install ros--image-tools + sudo apt-get install ros-rolling-image-tools .. group-tab:: From Source .. code-block:: bash - # Replace with the distribution you're using # Clone and build the demos repo using the branch that matches your installation - git clone https://github.com/ros2/demos.git -b + git clone https://github.com/ros2/demos.git -b master Run the demo @@ -90,20 +88,11 @@ In a separate terminal, source the install file and run the publisher node: This will publish an image from your webcam. In case you don't have a camera attached to your computer, there is a commandline option which publishes predefined images. -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: bash - - ros2 run image_tools cam2image --ros-args -p burger_mode:=True - .. group-tab:: Dashing +.. code-block:: bash - .. code-block:: bash + ros2 run image_tools cam2image --ros-args -p burger_mode:=True - #Using CLI arguments instead of parameters: - ros2 run image_tools cam2image -b In this window, you'll see terminal output: @@ -145,19 +134,11 @@ Command line options In one of your terminals, add a -h flag to the original command: -.. tabs:: - - .. group-tab:: Eloquent and newer - .. code-block:: bash - - ros2 run image_tools showimage -h - - .. group-tab:: Dashing +.. code-block:: bash - .. code-block:: bash + ros2 run image_tools showimage -h - ros2 run image_tools showimage -- -h Add network traffic @@ -195,10 +176,6 @@ The publisher will now just attempt to deliver the network packets, and don't ex We see now that some of the frame on the ``showimage`` side were dropped, the frame numbers in the shell running ``showimage`` won't be consecutive anymore: -.. note:: - - Before Eloquent, use ``-x 640 -y 480`` for changing the resolution and ``-r 0`` for best effort communication. - .. image:: https://raw.githubusercontent.com/ros2/demos/master/image_tools/doc/qos-best-effort.png :target: https://raw.githubusercontent.com/ros2/demos/master/image_tools/doc/qos-best-effort.png :alt: Best effort image transfer diff --git a/source/Tutorials/RQt-Overview-Usage.rst b/source/Tutorials/RQt-Overview-Usage.rst index 3ea63b6c1a7..2dc0c08e25b 100644 --- a/source/Tutorials/RQt-Overview-Usage.rst +++ b/source/Tutorials/RQt-Overview-Usage.rst @@ -44,7 +44,7 @@ Installing From Debian .. code-block:: bash - sudo apt install ros-$ROS_DISTRO-rqt* + sudo apt install ros-rolling-rqt* Building From Source diff --git a/source/Tutorials/Ros2bag/Recording-And-Playing-Back-Data.rst b/source/Tutorials/Ros2bag/Recording-And-Playing-Back-Data.rst index 40b6a2cd082..e385d10731b 100644 --- a/source/Tutorials/Ros2bag/Recording-And-Playing-Back-Data.rst +++ b/source/Tutorials/Ros2bag/Recording-And-Playing-Back-Data.rst @@ -31,9 +31,9 @@ If you've installed from Debians on Linux and your system doesn’t recognize th .. code-block:: console - sudo apt-get install ros--ros2bag \ - ros--rosbag2-converter-default-plugins \ - ros--rosbag2-storage-default-plugins + sudo apt-get install ros-rolling-ros2bag \ + ros-rolling-rosbag2-converter-default-plugins \ + ros-rolling-rosbag2-storage-default-plugins This tutorial talks about concepts covered in previous tutorials, like nodes and :ref:`topics `. It also uses the :ref:`turtlesim package `. diff --git a/source/Tutorials/Rosbag-with-ROS1-Bridge.rst b/source/Tutorials/Rosbag-with-ROS1-Bridge.rst index 81943c5e815..7b3bb9844b5 100644 --- a/source/Tutorials/Rosbag-with-ROS1-Bridge.rst +++ b/source/Tutorials/Rosbag-with-ROS1-Bridge.rst @@ -7,7 +7,7 @@ Recording and playback of topic data with rosbag using the ROS 1 bridge This tutorial is a follow up to the *Bridge communication between ROS 1 and ROS 2* demo as can be found listed with the other `demos <../Tutorials>`, and in the following it is assumed you have completed that tutorial already. -The ros1_bridge can either be installed from `binary packages <../Installation>` or `built from source `__; both work for these examples. +The ros1_bridge can either be installed from `binary packages <../Installation>` or `built from source `__; both work for these examples. What follows is a series of additional examples, like that ones that come at the end of the aforementioned *Bridge communication between ROS 1 and ROS 2* demo. diff --git a/source/Tutorials/Rqt-Console/Using-Rqt-Console.rst b/source/Tutorials/Rqt-Console/Using-Rqt-Console.rst index cc3a0245f7c..66b537a8a17 100644 --- a/source/Tutorials/Rqt-Console/Using-Rqt-Console.rst +++ b/source/Tutorials/Rqt-Console/Using-Rqt-Console.rst @@ -112,19 +112,9 @@ For example, if you set the default level to ``Warn``, you would only see messag You can set the default logger level when you first run the ``/turtlesim`` node using remapping. Enter the following command in your terminal: -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: console - - ros2 run turtlesim turtlesim_node --ros-args --log-level WARN - - .. group-tab:: Dashing - - .. code-block:: console +.. code-block:: console - ros2 run turtlesim turtlesim_node __log_level:=warn + ros2 run turtlesim turtlesim_node --ros-args --log-level WARN Now you won’t see the initial ``Info`` level warnings that came up in the console last time you started ``turtlesim``. That’s because ``Info`` messages are lower priority than the new default severity, ``Warn``. diff --git a/source/Tutorials/Run-2-nodes-in-a-single-docker-container.rst b/source/Tutorials/Run-2-nodes-in-a-single-docker-container.rst index 9464dca1cf1..048b7122d5f 100644 --- a/source/Tutorials/Run-2-nodes-in-a-single-docker-container.rst +++ b/source/Tutorials/Run-2-nodes-in-a-single-docker-container.rst @@ -5,18 +5,18 @@ Running 2 nodes in a single docker container [community-contributed] ==================================================================== -Pull the ROS docker image with tag "eloquent-desktop". +Pull the ROS docker image with tag "rolling-desktop". .. code-block:: bash - docker pull osrf/ros:eloquent-desktop + docker pull osrf/ros:rolling-desktop Run the image in a container in interactive mode. .. code-block:: bash - $ docker run -it osrf/ros:eloquent-desktop + $ docker run -it osrf/ros:rolling-desktop root@:/# diff --git a/source/Tutorials/Run-2-nodes-in-two-separate-docker-containers.rst b/source/Tutorials/Run-2-nodes-in-two-separate-docker-containers.rst index 3d01f329c98..38b45715cce 100644 --- a/source/Tutorials/Run-2-nodes-in-two-separate-docker-containers.rst +++ b/source/Tutorials/Run-2-nodes-in-two-separate-docker-containers.rst @@ -9,13 +9,13 @@ Open a terminal. Run the image in a container in interactive mode and launch a t .. code-block:: bash - docker run -it --rm osrf/ros:eloquent-desktop ros2 run demo_nodes_cpp talker + docker run -it --rm osrf/ros:rolling-desktop ros2 run demo_nodes_cpp talker Open a second terminal. Run the image in a container in interactive mode and launch a topic subscriber (executable ``listener`` from the package ``demo_nodes_cpp``) with ``ros2 run``: .. code-block:: bash - docker run -it --rm osrf/ros:eloquent-desktop ros2 run demo_nodes_cpp listener + docker run -it --rm osrf/ros:rolling-desktop ros2 run demo_nodes_cpp listener As an alternative to the command line invocation, you can create a ``docker-compose.yml`` file (here version 2) with the following (minimal) content: @@ -25,10 +25,10 @@ As an alternative to the command line invocation, you can create a ``docker-comp services: talker: - image: osrf/ros:eloquent-desktop + image: osrf/ros:rolling-desktop command: ros2 run demo_nodes_cpp talker listener: - image: osrf/ros:eloquent-desktop + image: osrf/ros:rolling-desktop command: ros2 run demo_nodes_cpp listener depends_on: - talker diff --git a/source/Tutorials/Services/Understanding-ROS2-Services.rst b/source/Tutorials/Services/Understanding-ROS2-Services.rst index 101b7bddfb6..21069f90004 100644 --- a/source/Tutorials/Services/Understanding-ROS2-Services.rst +++ b/source/Tutorials/Services/Understanding-ROS2-Services.rst @@ -165,35 +165,15 @@ Which will return: You can call services from the command line, but first you need to know the structure of the input arguments. -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: console - - ros2 interface show .srv - - .. group-tab:: Dashing - - .. code-block:: console +.. code-block:: console - ros2 srv show + ros2 interface show .srv To run this command on the ``/clear`` service’s type, ``Empty``: -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: console - - ros2 interface show std_srvs/srv/Empty.srv - - .. group-tab:: Dashing - - .. code-block:: console +.. code-block:: console - ros2 srv show std_srvs/srv/Empty + ros2 interface show std_srvs/srv/Empty.srv Which will return: @@ -210,21 +190,9 @@ From the results of ``ros2 service list -t``, we know ``/spawn``’s type is ``t To see the arguments in a ``/spawn`` call-and-request, run the command: -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: console - - ros2 interface show turtlesim/srv/Spawn.srv - - .. group-tab:: Dashing - - .. code-block:: console - - ros2 srv show turtlesim/srv/Spawn - +.. code-block:: console + ros2 interface show turtlesim/srv/Spawn.srv Which will return: diff --git a/source/Tutorials/Topics/Understanding-ROS2-Topics.rst b/source/Tutorials/Topics/Understanding-ROS2-Topics.rst index 5e0aa7df837..fe60158cec7 100644 --- a/source/Tutorials/Topics/Understanding-ROS2-Topics.rst +++ b/source/Tutorials/Topics/Understanding-ROS2-Topics.rst @@ -172,23 +172,11 @@ Another way to look at this is running: Which will return: -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: console - - Type: geometry_msgs/msg/Twist - Publisher count: 1 - Subscriber count: 2 - - .. group-tab:: Dashing - - .. code-block:: +.. code-block:: console - Topic: /turtle1/cmd_vel - Publisher count: 1 - Subscriber count: 2 + Type: geometry_msgs/msg/Twist + Publisher count: 1 + Subscriber count: 2 6 ros2 interface show ^^^^^^^^^^^^^^^^^^^^^ @@ -207,19 +195,9 @@ This means that in the package ``geometry_msgs`` there is a ``msg`` called ``Twi Now we can run ``ros2 interface show .msg`` on this type to learn its the details, specifically, what structure of data the message expects. -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: console - - ros2 interface show geometry_msgs/msg/Twist - - .. group-tab:: Dashing - - .. code-block:: console +.. code-block:: console - ros2 msg show geometry_msgs/msg/Twist + ros2 interface show geometry_msgs/msg/Twist .. code-block:: console diff --git a/source/Tutorials/Turtlesim/Introducing-Turtlesim.rst b/source/Tutorials/Turtlesim/Introducing-Turtlesim.rst index f511d933c65..c7274b6bb36 100644 --- a/source/Tutorials/Turtlesim/Introducing-Turtlesim.rst +++ b/source/Tutorials/Turtlesim/Introducing-Turtlesim.rst @@ -30,8 +30,6 @@ Prerequisites The previous tutorial, :ref:`ConfigROS2`, will show you how to set up your environment. -Turtlesim and rqt are only available in ROS 2 from Dashing onward. - Tasks ----- @@ -50,7 +48,7 @@ Install the turtlesim package for your ROS 2 distro: sudo apt update - sudo apt install ros--turtlesim + sudo apt install ros-rolling-turtlesim .. group-tab:: macOS @@ -145,7 +143,7 @@ Open a new terminal to install ``rqt`` and its plugins: sudo apt update - sudo apt install ~nros--rqt* + sudo apt install ~nros-rolling-rqt* .. group-tab:: Linux (apt 1.x/Ubuntu 18.04 and older) @@ -153,7 +151,7 @@ Open a new terminal to install ``rqt`` and its plugins: sudo apt update - sudo apt install ros--rqt* + sudo apt install ros-rolling-rqt* .. group-tab:: macOS @@ -237,19 +235,10 @@ You can accomplish this by remapping turtle1's ``cmd_vel`` topic onto turtle2. In a new terminal, source ROS 2, and run: -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: console - - ros2 run turtlesim turtle_teleop_key --ros-args --remap turtle1/cmd_vel:=turtle2/cmd_vel - - .. group-tab:: Dashing +.. code-block:: console - .. code-block:: console + ros2 run turtlesim turtle_teleop_key --ros-args --remap turtle1/cmd_vel:=turtle2/cmd_vel - ros2 run turtlesim turtle_teleop_key turtle1/cmd_vel:=turtle2/cmd_vel Now you can move turtle2 when this terminal is active, and turtle1 when the other terminal running the ``turtle_teleop_key`` is active. @@ -274,7 +263,7 @@ Now that you have turtlesim and rqt up and running, and an idea of how they work Related content --------------- -The turtlesim package can be found in the `ros_tutorials repo `_. +The turtlesim package can be found in the `ros_tutorials repo `_. Make sure to adjust the branch to view the version of turtlesim corresponding to your installed ROS 2 distro. -`This community contributed video `_ demonstrates many of the item covered in this tutorial. +`This community contributed video `_ demonstrates many of the items covered in this tutorial. diff --git a/source/Tutorials/Understanding-ROS2-Actions.rst b/source/Tutorials/Understanding-ROS2-Actions.rst index 3b4595eb010..1242548842c 100644 --- a/source/Tutorials/Understanding-ROS2-Actions.rst +++ b/source/Tutorials/Understanding-ROS2-Actions.rst @@ -247,20 +247,9 @@ One more piece of information you will need before sending or executing an actio Recall that you identified ``/turtle1/rotate_absolute``’s type when running the command ``ros2 action list -t``. Enter the following command with the action type in your terminal: -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: console - - ros2 interface show turtlesim/action/RotateAbsolute.action - - .. group-tab:: Dashing - - .. code-block:: console - - ros2 action show turtlesim/action/RotateAbsolute +.. code-block:: console + ros2 interface show turtlesim/action/RotateAbsolute.action Which will return: diff --git a/source/Tutorials/Understanding-ROS2-Nodes.rst b/source/Tutorials/Understanding-ROS2-Nodes.rst index 64ca7ff4ead..cddecf1d6af 100644 --- a/source/Tutorials/Understanding-ROS2-Nodes.rst +++ b/source/Tutorials/Understanding-ROS2-Nodes.rst @@ -110,19 +110,9 @@ In the last tutorial, you used remapping on ``turtle_teleop_key`` to change the Now, lets reassign the name of our ``/turtlesim`` node. In a new terminal, run the following command: -.. tabs:: - - .. group-tab:: Eloquent and newer - - .. code-block:: console - - ros2 run turtlesim turtlesim_node --ros-args --remap __node:=my_turtle - - .. group-tab:: Dashing - - .. code-block:: console +.. code-block:: console - ros2 run turtlesim turtlesim_node __node:=my_turtle + ros2 run turtlesim turtlesim_node --ros-args --remap __node:=my_turtle Since you’re calling ``ros2 run`` on turtlesim again, another turtlesim window will open. However, now if you return to the terminal where you ran ``ros2 node list``, and run it again, you will see three node names: diff --git a/source/Tutorials/Using-Parameters-In-A-Class-CPP.rst b/source/Tutorials/Using-Parameters-In-A-Class-CPP.rst index e959d5cd600..8243209cb2d 100644 --- a/source/Tutorials/Using-Parameters-In-A-Class-CPP.rst +++ b/source/Tutorials/Using-Parameters-In-A-Class-CPP.rst @@ -183,7 +183,7 @@ It's good practice to run ``rosdep`` in the root of your workspace (``dev_ws``) .. code-block:: console - rosdep install -i --from-path src --rosdistro -y + rosdep install -i --from-path src --rosdistro rolling -y .. group-tab:: macOS @@ -269,71 +269,25 @@ You can also set the parameter in a launch file, but first you will need to add Inside the ``dev_ws/src/cpp_parameters/`` directory, create a new directory called ``launch``. In there, create a new file called ``cpp_parameters_launch.py`` -.. tabs:: - .. group-tab:: Foxy and newer - - .. code-block:: Python - - from launch import LaunchDescription - from launch_ros.actions import Node - - def generate_launch_description(): - return LaunchDescription([ - Node( - package="cpp_parameters", - executable="parameter_node", - name="custom_parameter_node", - output="screen", - emulate_tty=True, - parameters=[ - {"my_parameter": "earth"} - ] - ) - ]) - - .. group-tab:: Eloquent - - .. code-block:: Python - - from launch import LaunchDescription - from launch_ros.actions import Node - - def generate_launch_description(): - return LaunchDescription([ - Node( - package="cpp_parameters", - node_executable="parameter_node", - node_name="custom_parameter_node", - output="screen", - emulate_tty=True, - parameters=[ - {"my_parameter": "earth"} - ] - ) - ]) - - .. group-tab:: Dashing - - ``emulate_tty``, which prints output to the console, is not available in Dashing. - - .. code-block:: Python - - from launch import LaunchDescription - from launch_ros.actions import Node - - def generate_launch_description(): - return LaunchDescription([ - Node( - package="cpp_parameters", - node_executable="parameter_node", - node_name="custom_parameter_node", - output="screen", - parameters=[ - {"my_parameter": "earth"} - ] - ) - ]) +.. code-block:: Python + + from launch import LaunchDescription + from launch_ros.actions import Node + + def generate_launch_description(): + return LaunchDescription([ + Node( + package="cpp_parameters", + executable="parameter_node", + name="custom_parameter_node", + output="screen", + emulate_tty=True, + parameters=[ + {"my_parameter": "earth"} + ] + ) + ]) Here you can see that we set ``my_parameter`` to ``earth`` when we launch our node ``parameter_node``. By adding the two lines below, we ensure our output is printed in our console. diff --git a/source/Tutorials/Using-Parameters-In-A-Class-Python.rst b/source/Tutorials/Using-Parameters-In-A-Class-Python.rst index 46f22798120..5984088a51a 100644 --- a/source/Tutorials/Using-Parameters-In-A-Class-Python.rst +++ b/source/Tutorials/Using-Parameters-In-A-Class-Python.rst @@ -173,7 +173,7 @@ It's good practice to run ``rosdep`` in the root of your workspace (``dev_ws``) .. code-block:: console - rosdep install -i --from-path src --rosdistro -y + rosdep install -i --from-path src --rosdistro rolling -y .. group-tab:: macOS @@ -261,71 +261,27 @@ You can also set parameters in a launch file, but first you will need to add a l Inside the ``dev_ws/src/python_parameters/`` directory, create a new directory called ``launch``. In there, create a new file called ``python_parameters_launch.py`` -.. tabs:: - .. group-tab:: Foxy and newer - - .. code-block:: Python - - from launch import LaunchDescription - from launch_ros.actions import Node - - def generate_launch_description(): - return LaunchDescription([ - Node( - package="python_parameters", - executable="param_talker", - name="custom_parameter_node", - output="screen", - emulate_tty=True, - parameters=[ - {"my_parameter": "earth"} - ] - ) - ]) - - .. group-tab:: Eloquent - - .. code-block:: Python - - from launch import LaunchDescription - from launch_ros.actions import Node - - def generate_launch_description(): - return LaunchDescription([ - Node( - package="python_parameters", - node_executable="param_talker", - node_name="custom_parameter_node", - output="screen", - emulate_tty=True, - parameters=[ - {"my_parameter": "earth"} - ] - ) - ]) - - .. group-tab:: Dashing - - ``emulate_tty``, which prints output to the console, is not available in Dashing. - - .. code-block:: Python - - from launch import LaunchDescription - from launch_ros.actions import Node - - def generate_launch_description(): - return LaunchDescription([ - Node( - package="python_parameters", - node_executable="param_talker", - node_name="custom_parameter_node", - output="screen", - parameters=[ - {"my_parameter": "earth"} - ] - ) - ]) + +.. code-block:: Python + + from launch import LaunchDescription + from launch_ros.actions import Node + + def generate_launch_description(): + return LaunchDescription([ + Node( + package="python_parameters", + executable="param_talker", + name="custom_parameter_node", + output="screen", + emulate_tty=True, + parameters=[ + {"my_parameter": "earth"} + ] + ) + ]) + Here you can see that we set ``my_parameter`` to ``earth`` when we launch our node ``parameter_node``. By adding the two lines below, we ensure our output is printed in our console. diff --git a/source/Tutorials/Working-with-multiple-RMW-implementations.rst b/source/Tutorials/Working-with-multiple-RMW-implementations.rst index 4f0c927a985..f2c9145f3d1 100644 --- a/source/Tutorials/Working-with-multiple-RMW-implementations.rst +++ b/source/Tutorials/Working-with-multiple-RMW-implementations.rst @@ -144,7 +144,7 @@ it will generate a daemon with a Fast RTPS implementation: .. code-block:: bash - 21318 22.0 0.6 535896 55044 pts/8 Sl 16:14 0:00 /usr/bin/python3 /opt/ros/foxy/bin/_ros2_daemon --rmw-implementation rmw_fastrtps_cpp --ros-domain-id 22 + 21318 22.0 0.6 535896 55044 pts/8 Sl 16:14 0:00 /usr/bin/python3 /opt/ros/rolling/bin/_ros2_daemon --rmw-implementation rmw_fastrtps_cpp --ros-domain-id 22 Even if you run the command line tool again with the correct RMW implementation, the daemon's RMW implementation will not change and the ROS 2 command line tools will fail. diff --git a/source/Tutorials/Workspace/Creating-A-Workspace.rst b/source/Tutorials/Workspace/Creating-A-Workspace.rst index ac765fbdf63..ee8e68e5833 100644 --- a/source/Tutorials/Workspace/Creating-A-Workspace.rst +++ b/source/Tutorials/Workspace/Creating-A-Workspace.rst @@ -54,13 +54,7 @@ Depending on how you installed ROS 2 (from source or binaries), and which platfo .. code-block:: console - source /opt/ros//setup.bash - - For example, if you installed ROS 2 Eloquent: - - .. code-block:: console - - source /opt/ros/eloquent/setup.bash + source /opt/ros/rolling/setup.bash .. group-tab:: macOS @@ -131,7 +125,7 @@ In the ``dev_ws/src`` directory, run the following command for the distro you're .. code-block:: console - git clone https://github.com/ros/ros_tutorials.git -b -devel + git clone https://github.com/ros/ros_tutorials.git -b rolling-devel For example, if you're using Foxy: @@ -184,7 +178,7 @@ Before building the workspace, you need to resolve package dependencies. You may have all the dependencies already, but best practice is to check for dependencies every time you clone. You wouldn’t want a build to fail after a long wait because of missing dependencies. -From the root of your workspace (``dev_ws``), run the following command, replacing ```` with your distro: +From the root of your workspace (``dev_ws``), run the following command: .. tabs:: @@ -192,7 +186,7 @@ From the root of your workspace (``dev_ws``), run the following command, replaci .. code-block:: console - rosdep install -i --from-path src --rosdistro -y + rosdep install -i --from-path src --rosdistro rolling -y .. group-tab:: macOS @@ -203,7 +197,7 @@ From the root of your workspace (``dev_ws``), run the following command, replaci rosdep only runs on Linux, so you can skip ahead to section "5 Build the workspace with colcon". If you installed ROS 2 on Linux from source or the "fat" archive, you will need to use the rosdep command from their installation instructions. -For example, here are the Eloquent :ref:`from-source rosdep section ` and the :ref:`"fat" archive rosdep section `. +Here are the :ref:`from-source rosdep section ` and the :ref:`"fat" archive rosdep section `. If you already have all your dependencies, the console will return: @@ -281,7 +275,7 @@ In the new terminal, source your main ROS 2 environment as the “underlay”, s .. code-block:: console - source /opt/ros//setup.bash + source /opt/ros/rolling/setup.bash .. group-tab:: macOS diff --git a/source/Tutorials/Writing-A-Simple-Cpp-Publisher-And-Subscriber.rst b/source/Tutorials/Writing-A-Simple-Cpp-Publisher-And-Subscriber.rst index 4eabbaadd3b..e472ea29329 100644 --- a/source/Tutorials/Writing-A-Simple-Cpp-Publisher-And-Subscriber.rst +++ b/source/Tutorials/Writing-A-Simple-Cpp-Publisher-And-Subscriber.rst @@ -20,6 +20,7 @@ Background In this tutorial, the nodes will pass information in the form of string messages to each other over a :ref:`topic `. The example used here is a simple “talker” and “listener” system; one node publishes data and the other subscribes to the topic so it can receive that data. +The code used in these examples can be found `here `__. Prerequisites ------------- @@ -422,7 +423,7 @@ It's good practice to run ``rosdep`` in the root of your workspace (``dev_ws``) .. code-block:: console - rosdep install -i --from-path src --rosdistro -y + rosdep install -i --from-path src --rosdistro rolling -y .. group-tab:: macOS @@ -501,7 +502,7 @@ Summary You created two nodes to publish and subscribe to data over a topic. Before compiling and running them, you added their dependencies and executables to the package configuration files. -The code used in these examples can be found `here `__. + Next steps ---------- @@ -512,4 +513,4 @@ Again, you can choose to write it in either :ref:`C++ ` or :ref:`Pyth Related content --------------- -* There are several ways you could write a publisher and subscriber in C++; check out the ``minimal_publisher`` and ``minimal_subscriber`` packages in the `ros2/examples `_ repo. +There are several ways you could write a publisher and subscriber in C++; check out the ``minimal_publisher`` and ``minimal_subscriber`` packages in the `ros2/examples `_ repo. diff --git a/source/Tutorials/Writing-A-Simple-Cpp-Service-And-Client.rst b/source/Tutorials/Writing-A-Simple-Cpp-Service-And-Client.rst index 7f7d2b8f1d7..9f6411fa832 100644 --- a/source/Tutorials/Writing-A-Simple-Cpp-Service-And-Client.rst +++ b/source/Tutorials/Writing-A-Simple-Cpp-Service-And-Client.rst @@ -186,114 +186,55 @@ You could build your package now, source the local setup files, and run it, but Inside the ``dev_ws/src/cpp_srvcli/src`` directory, create a new file called ``add_two_ints_client.cpp`` and paste the following code within: -.. tabs:: +.. code-block:: C++ - .. group-tab:: Foxy and newer + #include "rclcpp/rclcpp.hpp" + #include "example_interfaces/srv/add_two_ints.hpp" - .. code-block:: C++ + #include + #include + #include - #include "rclcpp/rclcpp.hpp" - #include "example_interfaces/srv/add_two_ints.hpp" + using namespace std::chrono_literals; - #include - #include - #include + int main(int argc, char **argv) + { + rclcpp::init(argc, argv); - using namespace std::chrono_literals; + if (argc != 3) { + RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "usage: add_two_ints_client X Y"); + return 1; + } - int main(int argc, char **argv) - { - rclcpp::init(argc, argv); + std::shared_ptr node = rclcpp::Node::make_shared("add_two_ints_client"); + rclcpp::Client::SharedPtr client = + node->create_client("add_two_ints"); - if (argc != 3) { - RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "usage: add_two_ints_client X Y"); - return 1; - } - - std::shared_ptr node = rclcpp::Node::make_shared("add_two_ints_client"); - rclcpp::Client::SharedPtr client = - node->create_client("add_two_ints"); - - auto request = std::make_shared(); - request->a = atoll(argv[1]); - request->b = atoll(argv[2]); - - while (!client->wait_for_service(1s)) { - if (!rclcpp::ok()) { - RCLCPP_ERROR(rclcpp::get_logger("rclcpp"), "Interrupted while waiting for the service. Exiting."); - return 0; - } - RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "service not available, waiting again..."); - } - - auto result = client->async_send_request(request); - // Wait for the result. - if (rclcpp::spin_until_future_complete(node, result) == - rclcpp::FutureReturnCode::SUCCESS) - { - RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "Sum: %ld", result.get()->sum); - } else { - RCLCPP_ERROR(rclcpp::get_logger("rclcpp"), "Failed to call service add_two_ints"); - } + auto request = std::make_shared(); + request->a = atoll(argv[1]); + request->b = atoll(argv[2]); - rclcpp::shutdown(); + while (!client->wait_for_service(1s)) { + if (!rclcpp::ok()) { + RCLCPP_ERROR(rclcpp::get_logger("rclcpp"), "Interrupted while waiting for the service. Exiting."); return 0; } + RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "service not available, waiting again..."); + } - .. group-tab:: Eloquent and older - - .. code-block:: C++ - - #include "rclcpp/rclcpp.hpp" - #include "example_interfaces/srv/add_two_ints.hpp" - - #include - #include - #include - - using namespace std::chrono_literals; - - int main(int argc, char **argv) - { - rclcpp::init(argc, argv); - - if (argc != 3) { - RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "usage: add_two_ints_client X Y"); - return 1; - } - - std::shared_ptr node = rclcpp::Node::make_shared("add_two_ints_client"); - rclcpp::Client::SharedPtr client = - node->create_client("add_two_ints"); - - auto request = std::make_shared(); - request->a = atoll(argv[1]); - request->b = atoll(argv[2]); - - while (!client->wait_for_service(1s)) { - if (!rclcpp::ok()) { - RCLCPP_ERROR(rclcpp::get_logger("rclcpp"), "Interrupted while waiting for the service. Exiting."); - return 0; - } - RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "service not available, waiting again..."); - } - - auto result = client->async_send_request(request); - // Wait for the result. - if (rclcpp::spin_until_future_complete(node, result) == - rclcpp::executor::FutureReturnCode::SUCCESS) - { - RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "Sum: %ld", result.get()->sum); - } else { - RCLCPP_ERROR(rclcpp::get_logger("rclcpp"), "Failed to call service add_two_ints"); - } - - rclcpp::shutdown(); - return 0; - } - - + auto result = client->async_send_request(request); + // Wait for the result. + if (rclcpp::spin_until_future_complete(node, result) == + rclcpp::FutureReturnCode::SUCCESS) + { + RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "Sum: %ld", result.get()->sum); + } else { + RCLCPP_ERROR(rclcpp::get_logger("rclcpp"), "Failed to call service add_two_ints"); + } + rclcpp::shutdown(); + return 0; + } 3.1 Examine the code @@ -374,7 +315,7 @@ It's good practice to run ``rosdep`` in the root of your workspace (``dev_ws``) .. code-block:: console - rosdep install -i --from-path src --rosdistro -y + rosdep install -i --from-path src --rosdistro rolling -y .. group-tab:: macOS diff --git a/source/Tutorials/Writing-A-Simple-Py-Publisher-And-Subscriber.rst b/source/Tutorials/Writing-A-Simple-Py-Publisher-And-Subscriber.rst index 9029c5db761..a341df25ec2 100644 --- a/source/Tutorials/Writing-A-Simple-Py-Publisher-And-Subscriber.rst +++ b/source/Tutorials/Writing-A-Simple-Py-Publisher-And-Subscriber.rst @@ -20,6 +20,8 @@ In this tutorial, you will create :ref:`nodes ` that pass information The example used here is a simple “talker” and “listener” system; one node publishes data and the other subscribes to the topic so it can receive that data. +The code used in these examples can be found `here `__. + Prerequisites ------------- @@ -404,7 +406,7 @@ It's good practice to run ``rosdep`` in the root of your workspace (``dev_ws``) .. code-block:: console - rosdep install -i --from-path src --rosdistro -y + rosdep install -i --from-path src --rosdistro rolling -y .. group-tab:: macOS @@ -485,8 +487,6 @@ Summary You created two nodes to publish and subscribe to data over a topic. Before running them, you added their dependencies and entry points to the package configuration files. -The code used in these examples can be found `here `__. - Next steps ---------- @@ -496,4 +496,4 @@ Again, you can choose to write it in either :ref:`C++ ` or :ref:`Pyth Related content --------------- -* There are several ways you could write a publisher and subscriber in Python; check out the ``minimal_publisher`` and ``minimal_subscriber`` packages in the `ros2/examples `_ repo. +There are several ways you could write a publisher and subscriber in Python; check out the ``minimal_publisher`` and ``minimal_subscriber`` packages in the `ros2/examples `_ repo. diff --git a/source/Tutorials/dummy-robot-demo.rst b/source/Tutorials/dummy-robot-demo.rst index c6de7d9b91b..08ca3ce192a 100644 --- a/source/Tutorials/dummy-robot-demo.rst +++ b/source/Tutorials/dummy-robot-demo.rst @@ -18,8 +18,6 @@ To start the demo, we execute the demo bringup launch file, which we are going t source ~/ros2_ws/install/setup.bash ros2 launch dummy_robot_bringup dummy_robot_bringup.launch.py - # For ROS 2 releases prior to Bouncy, instead run: - # launch ~/ros2_ws/install/share/dummy_robot_bringup/launch/dummy_robot_bringup.py You should see some prints inside your terminal along the lines of the following: diff --git a/source/_templates/page.html b/source/_templates/page.html new file mode 100644 index 00000000000..ff8e0c29864 --- /dev/null +++ b/source/_templates/page.html @@ -0,0 +1,17 @@ +{% extends "!page.html" %} +{% block body %} +{% if current_version and latest_version and current_version != latest_version %} +

+ + {% if current_version.is_released %} + You're reading an old version of this documentation. + If you want up-to-date information, please have a look at {{latest_version.name | title }}. + {% else %} + You're reading the documentation for a development version. + For the latest released version, please have a look at {{latest_version.name | title }}. + {% endif %} + +

+{% endif %} +{{ super() }} +{% endblock %}% diff --git a/source/_templates/versioning.html b/source/_templates/versioning.html new file mode 100644 index 00000000000..4b49e745943 --- /dev/null +++ b/source/_templates/versioning.html @@ -0,0 +1,20 @@ + +{% if versions %} +

{{ _('Versions') }}

+

{{ _('Releases') }}

+ +

{{ _('In Development') }}

+ +{% endif %}