From 30156a9e9045dc9a07306b49d32746cd37ec7b0f Mon Sep 17 00:00:00 2001 From: maryaB-osr Date: Tue, 15 Oct 2019 13:25:28 -0700 Subject: [PATCH 01/10] New tutorial for creating a workspace Signed-off-by: maryaB-osr --- source/Tutorials.rst | 11 + source/Tutorials/Colcon-Tutorial.rst | 2 + .../Workspace/CreatingAWorkspace.rst | 296 ++++++++++++++++++ source/Tutorials/Workspace/overlay.png | Bin 0 -> 8802 bytes source/Tutorials/Workspace/underlay.png | Bin 0 -> 7949 bytes 5 files changed, 309 insertions(+) create mode 100644 source/Tutorials/Workspace/CreatingAWorkspace.rst create mode 100644 source/Tutorials/Workspace/overlay.png create mode 100644 source/Tutorials/Workspace/underlay.png diff --git a/source/Tutorials.rst b/source/Tutorials.rst index 5da5f8a8b09..0d157fa8f8e 100644 --- a/source/Tutorials.rst +++ b/source/Tutorials.rst @@ -11,6 +11,9 @@ Getting started Beginner level -------------- +Users +^^^^^ + .. toctree:: :maxdepth: 1 @@ -18,6 +21,14 @@ Beginner level Tutorials/Turtlesim/IntroducingTurtlesim Tutorials/Topics/UnderstandingROS2Topics +Developers +^^^^^^^^^^ + +.. toctree:: + :maxdepth: 1 + + Tutorials/Workspace/CreatingAWorkspace + Miscellaneous ------------- diff --git a/source/Tutorials/Colcon-Tutorial.rst b/source/Tutorials/Colcon-Tutorial.rst index 06733836172..989b00454bd 100644 --- a/source/Tutorials/Colcon-Tutorial.rst +++ b/source/Tutorials/Colcon-Tutorial.rst @@ -1,3 +1,5 @@ +.. _Colcon: + .. redirect-from:: Colcon-Tutorial diff --git a/source/Tutorials/Workspace/CreatingAWorkspace.rst b/source/Tutorials/Workspace/CreatingAWorkspace.rst new file mode 100644 index 00000000000..5baff0e6eb8 --- /dev/null +++ b/source/Tutorials/Workspace/CreatingAWorkspace.rst @@ -0,0 +1,296 @@ +.. _ROS2Workspace: + +Creating a workspace +==================== + +**Goal:** Create a workspace and learn how to set up an overlay for development and testing. + +**Tutorial level:** Beginner + +**Time:** 20 minutes + +.. contents:: Contents + :depth: 2 + :local: + +Background +---------- + +Before using ROS 2, it’s necessary to source your main ROS 2 installation in the terminal you plan to work in. +This makes ROS 2’s packages available for you to use in that terminal. +You also have the option of sourcing an “overlay” – a secondary workspace where you can work on packages without interfering the main ROS 2 installation, or “underlay”. +Your underlay must contain the dependencies of all the packages in your overlay. +Modifications and developments in your overlay will override packages in the underlay. + + +Prerequisites +------------- + +* :ref:`ROS 2 installation ` +* :ref:`colcon installation ` +* `git installation `__ +* :ref:`turtlesim installation ` +* Understanding of basic terminal commands (`here’s a guide for linux `__) +* Text editor of your choice + +Tasks +----- + +1 Source ROS 2 environment +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Your main ROS 2 installation will be your underlay for this tutorial. +(Keep in mind that an underlay does not necessarily have to be the main ROS 2 installation.) + +Depending on how you installed ROS 2 (from source or binaries), and which platform you’re on, your exact source command will vary: + +.. tabs:: + + .. group-tab:: Linux + + .. code-block:: bash + + source /opt/ros//setup.bash + + For example, if you installed ROS 2 Dashing: + + .. code-block:: bash + + source /opt/ros/dashing/setup.bash + + .. group-tab:: macOS + + .. code-block:: bash + + . ~/ros2_install/ros2-osx/setup.bash + + .. group-tab:: Windows + + .. code-block:: bash + + call C:\dev\ros2\local_setup.bat + +Consult the :ref:`installation guide ` you followed if these commands don’t work for you. + + +2 Create a new directory +^^^^^^^^^^^^^^^^^^^^^^^^ + +Best practice is to create a new directory for every new workspace. +The name doesn’t matter, but it is helpful to have it indicate the purpose of the workspace. +Let’s choose the directory name ``dev_ws``, for “development workspace”: + +.. code-block:: bash + + mkdir dev_ws + mkdir dev_ws/src + cd dev_ws/src + +Another best practice is to put any packages in your workspace into the ``src`` directory. +The above code creates a ``src`` directory inside ``dev_ws`` and then navigates into it. + + +3 Clone a sample repo +^^^^^^^^^^^^^^^^^^^^^ + +Ensure you’re still in the ``dev_ws/src`` directory before you clone. + +In the rest of the beginner developer tutorials, you will create your own packages, but for now you will practice putting a workspace together using existing packages. + +The existing packages you will use are from the ``ros_tutorials`` repository (repo). +If you went through the beginner user tutorials, you'll be familiar with ``turtlesim``, one of the packages in this repo. + +You can see the repo `on github `__ + +Notice the “Branch” drop down list to the left above the directories list. +When you clone this repo, add the ``-b`` argument followed by the branch that corresponds with your ROS 2 distro. + +In the ``dev_ws/src`` directory, if your distro is Dashing for example, run the command: + +.. code-block:: bash + + git clone https://github.com/ros/ros_tutorials.git -b dashing-devel + +Now ``ros_tutorials`` is cloned in your workspace. +Enter ``ls`` in your terminal, and you will see the new ``ros_tutorials`` directory. + +To see the packages inside ``ros_tutorials``, enter the command: + +.. code-block:: bash + + ls ros_tutorials + +Which will list the contents of the repo you just cloned, like so: + +.. code-block:: bash + + roscpp_tutorials rospy_tutorials ros_tutorials turtlesim + +Now you have populated your workspace with sample packages, but it isn’t a fully-functional workspace yet. +You need to build the workspace first. + + +4 Resolve dependencies +^^^^^^^^^^^^^^^^^^^^^^ + +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: + +.. code-block:: bash + + sudo rosdep install -i --from-path src --rosdistro -y + +For example, if you're using Dashing, you would run: + +.. code-block:: bash + + sudo rosdep install -i --from-path src --rosdistro dashing -y + +If you already have all your dependencies, the console will return: + +.. code-block:: bash + + #All required rosdeps installed successfully + +Packages declare their dependencies in the package.xml file (you will learn more about packages in the next tutorial). +This command walks through those declarations and installs the ones that are missing. + +5 Build the workspace with colcon +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +From the root of your workspace (``~/dev_ws``), you can now build your packages using the command: + +.. code-block:: bash + + colcon build + +If you’re using Windows, you will need to append the ``merge-install`` argument like so: + +.. code-block:: bash + + colcon build --merge-install + +Windows doesn’t allow long paths, so ``merge-install`` will combine all the paths into the ``install`` directory. + +The cosole will return the following message: + +.. code-block:: bash + + Starting >>> turtlesim + Finished <<< turtlesim [5.49s] + + Summary: 1 package finished [5.58s] + +.. note:: + Other useful arguments for ``colcon build``: + + * ``--packages-up-to`` builds the package you want, plus all its dependencies, but not the whole workspace (saves time) + * ``--symlink-install`` saves you from having to rebuild every time you tweak python scripts + * ``--event-handlers console-direct+`` shows console output while building (can otherwise be found in the ``log`` directory) + +Once the build is finished, enter ``ls`` in the workspace root (``~/dev_ws``) and you will see that colcon has created new directories: + +.. code-block:: bash + + build install log src + +The ``install`` directory is where your workspace’s setup files are, which you can use to source your overlay. + + +6 Source the overlay +^^^^^^^^^^^^^^^^^^^^ + +Before sourcing the overlay, it is very important that you open a new terminal, separate from the one where you built the workspace. +Sourcing an overlay in the same terminal where you built, or likewise building where an overlay is sourced, may create complex issues. + +In the new terminal, source your main ROS 2 environment as the “underlay”, so you can build the overlay “on top of” it: + +.. tabs:: + + .. group-tab:: Linux + + .. code-block:: bash + + source /opt/ros//setup.bash + + .. group-tab:: macOS + + .. code-block:: bash + + . ~/ros2_install/ros2-osx/setup.bash + + .. group-tab:: Windows + + .. code-block:: bash + + call C:\dev\ros2\local_setup.bat + +Go into the root of your workspace: + +.. code-block:: bash + + cd dev_ws + +In the root, source your overlay: + +.. code-block:: bash + + . install/setup.bash + +Now you can run the ``turtlesim`` package from the overlay: + +.. code-block:: bash + + ros2 run turtlesim turtlesim_node + +But how can you tell that this is the overlay turtlesim running, and not your main installation's turtlesim? + +Let’s modify turtlesim in the overlay so you can see the effects: +* You can modify and rebuild packages in the overlay separately from the underlay. +* The overlay takes precedence over the underlay. + + +7 Modify the overlay +^^^^^^^^^^^^^^^^^^^^ + +You can modify ``turtlesim`` in your overlay by editing the title bar on the turtlesim window. +To do this, locate the ``turtle_frame.cpp`` file in ``~/dev_ws/src/ros_tutorials/turtlesim/src``. +Open ``turtle_frame.cpp`` with your preferred text editor. + +On line 52 you will see the function ``setWindowTitle("TurtleSim");``. +Change the value ``”TurtleSim”`` to ``”MyTurtleSim”``, and save the file. + +Return to first terminal where you ran ``colcon build`` earlier and run it again. + +Return to the second terminal (where the overlay is sourced) and run turtlesim again: + +.. code-block:: bash + + ros2 run turtlesim turtlesim_node + +You will see the title bar on the turtlesim window now says “MyTurtleSim”. + +.. image:: overlay.png + +Even though your main ROS 2 environment was sourced in this terminal earlier, the overlay of your ``dev_ws`` environment takes precedence over the contents of the underlay. + +If you open another terminal, only source your main ROS 2 distro, and run turtlesim, the title bar will be back to normal (“TurtleSim”). + +.. image:: underlay.png + +You can see that modifications in the overlay did not actually affect anything in the underlay. + + +Summary +------- +In this tutorial, you sourced your main ROS 2 distro install as your underlay, and created an overlay by running ``. install/setup.bash`` in your new workspace. +The overlay gets prepended to the path, and takes precedence over the underlay, as you saw with your modified turtlesim. + +Using overlays is recommended for working on a small number of packages, so you don’t have to put everything in the same workspace and rebuild a huge workspace on every iteration. + + +.. todo: "Next steps section" link to "Creating a ROS 2 package" once all tutorials are done (no empty references) diff --git a/source/Tutorials/Workspace/overlay.png b/source/Tutorials/Workspace/overlay.png new file mode 100644 index 0000000000000000000000000000000000000000..d4d1d1a87e63dc0ecdea9b36e23cb4e66e370263 GIT binary patch literal 8802 zcmeHt_g_<4(05os6a;sbB4ET-5CtiU^b(5n5?VlN6a)kWgb;|dznCXBn6{zydFByv{@K5M!9d-|fmVL*fk96L+yEZF zem-teFxLP#H(%Iuzd$N$n+5=I17P?_%ldWpCJ~w82+vvlg;$1C<_JVW&M~`zw)U1I z>$ATfu|0YulAWr{1_avbcM_(6dU=Ag{<%4JSEDUF;45}{@RX;mpZ*zKWcO>A_>J@Y zZxKJ#+0I`O&8HIKpw*N8q^*iTaiU?z?<0(51|k=+rs1@QwaUkm_Eh16cfrR+=`zqA z@xJuyp?2QhefD@d?Kc2m)aYt-aYRHu33PnIMM6-}9&Hk6X~SGmx08BJRXDn_WtiQC%tQOsroN0~5R$29>t~0Hv$q zopHQ+A5cA-z?wMm3VZ(z{mbHI(7omQ`fuO<`2$FXumJ#-n%6oxBi}{dSUW!*?}P2Q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M|ha}{`98sT*@2;1q=p3LT^8_=t5p%i7OlbO6 zIN=g&`}!Nxt@elMc{#R+TUqd53E;K(AoU5yTu)PZ{H_9Kb1jm$d1Zyp*d&e=){8~? z_fg&^TmbW_DloG#CU$9mXp1{`4}D6v^dW3N_2yF1Gus_;^1L1|%^efG;lEsHLBEo_ z@ccFH=v0nofoz~cRIXmx%ZIkCB(b*7>kdVDZZxYNi%J1Cl8zg=I8Iu|oGcu|NISzF z_-X!2;a!JoPhS*f&C?YTj4xX$KMw7Kh9w4e%etqyRsDHMVq&=bLb;lk&BoS}_*gSC2)IxUB*R;@8L1jy+kxHFsuM(erKf zCrv;nTX)~!b@B|*%>@)qCmos8Wj%%R2@YWnw&u+>ZQAd3!+BA~=FNGNGtg?*YRp$+!(55?p$}GHd zSd6GAZDjye)L?dbw`z7a0adg>=>c;$x6Nl@1!=>JM3#P&7E$KMV^1em+{a41c12}F zttQ)iY+s_7OqrW*S352OU%wUPJ}MnH-DC#p_WMj1>~h{}7yfa2pW_LK7RQ|Cev)zx zteq#4r$uXn(@co2exKvTpKI;H?a%Jx@q<@j?dSh}^xoH3L{)B8R=%Bw$ANVYz<*CL zJVYgHiUoOIW&7Mub%rtU_>?Z+Ccg4U{aVbw8F9=1YyZoO|AP(xi@=hRh0kkdMZwy? kwE+KtyZ_^mcKeLQ+3)Bej>8zqED`}2>Y6>O(0&s6KLQ--O8@`> literal 0 HcmV?d00001 diff --git a/source/Tutorials/Workspace/underlay.png b/source/Tutorials/Workspace/underlay.png new file mode 100644 index 0000000000000000000000000000000000000000..3228d3f755679ae63a743e3780fde00dd69aca02 GIT binary patch literal 7949 zcmeHMiC0tC_Qvw8eO2MT+KPxspP*@#K@5Wo0a_G9rdAAy45<_l_~{< z6fi)7s1ON5ln^3Afu5|q&pk}wAdNq~?*2uXhFTfe{Jt=_fHy7%05);?$NefD?0 z@7@PL_<0`u{OIR8IywivE?u~yqqApIN9U6-KKoSr#?ch?oA&k(`1f8{Khs_rpGE%F zH%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1u;oRk)NMLpu-O1AC}{{w1!bTR=M2M&Fq1n>v+N<(oq!P0MRG$P`r!Vg z;cKDYsvm+Xw(d?fs`CDuFo-ipbxru%BzFC_G%)TI2OzO=%KrZRydLqlu{oo>$>#Ik z{)az7cfPa5#W5pQ9~-NB%`N}wG*KGtILM1_$vbx0bSbH@mMiPg0#&QoYP4iKh2V&o z98P}<=x1*6v9f1}T11@*-g_!=6;7w;wG)Jv;uACa4gJ*yd!5C{lC!a+vp3{#A19Wj zs;nih32(LEVHMy1@&9lYk%wFoE(8&7gA2{y?jkiC!@akL?i}j$x|Q^WsH;x%iGIiSA& zqfF?Tz-iiP?>><^e*Y`4Li;e}PDfIBC=Iwt0uGeMT^7ArX&!dq<6v{}S`JwT0n^a`K!_Ob2)&^`Nml zi*D@l1-*N%;sE>O)P%YHSdL~94EQPW7eMI~_sZ5>f=@YGe1mhUICs%uh>zdeo&EEl zlV_$M%sz7ZGB$Fdv`Ox7Oht1TxZU?5h>Bl8pAatjJ$Ut%fB)wEe`}%tZ2`E8>6s8#pY$=$)Bexa@w(`Dq2c?V?*1Q Date: Tue, 15 Oct 2019 13:35:34 -0700 Subject: [PATCH 02/10] typo Signed-off-by: maryaB-osr --- source/Tutorials/Workspace/CreatingAWorkspace.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Tutorials/Workspace/CreatingAWorkspace.rst b/source/Tutorials/Workspace/CreatingAWorkspace.rst index 5baff0e6eb8..a4b36d9ce42 100644 --- a/source/Tutorials/Workspace/CreatingAWorkspace.rst +++ b/source/Tutorials/Workspace/CreatingAWorkspace.rst @@ -18,7 +18,7 @@ Background Before using ROS 2, it’s necessary to source your main ROS 2 installation in the terminal you plan to work in. This makes ROS 2’s packages available for you to use in that terminal. -You also have the option of sourcing an “overlay” – a secondary workspace where you can work on packages without interfering the main ROS 2 installation, or “underlay”. +You also have the option of sourcing an “overlay” – a secondary workspace where you can work on packages without interfering with the main ROS 2 installation, or “underlay”. Your underlay must contain the dependencies of all the packages in your overlay. Modifications and developments in your overlay will override packages in the underlay. From 7971e0f8898c02877278fdd2ec9ae9702ebd1104 Mon Sep 17 00:00:00 2001 From: Marya Belanger Date: Wed, 16 Oct 2019 21:58:41 +0300 Subject: [PATCH 03/10] typo Co-Authored-By: Chris Lalancette --- source/Tutorials/Workspace/CreatingAWorkspace.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Tutorials/Workspace/CreatingAWorkspace.rst b/source/Tutorials/Workspace/CreatingAWorkspace.rst index a4b36d9ce42..e0b9b734223 100644 --- a/source/Tutorials/Workspace/CreatingAWorkspace.rst +++ b/source/Tutorials/Workspace/CreatingAWorkspace.rst @@ -176,7 +176,7 @@ If you’re using Windows, you will need to append the ``merge-install`` argumen Windows doesn’t allow long paths, so ``merge-install`` will combine all the paths into the ``install`` directory. -The cosole will return the following message: +The console will return the following message: .. code-block:: bash From 7909d29e8aff94927722679ede0daa0b02cdaca9 Mon Sep 17 00:00:00 2001 From: maryaB-osr Date: Thu, 24 Oct 2019 09:44:17 -0700 Subject: [PATCH 04/10] addressed reviews (dirk-thomas & clalancette) Signed-off-by: maryaB-osr --- .../Workspace/CreatingAWorkspace.rst | 74 ++++++++++++++----- 1 file changed, 57 insertions(+), 17 deletions(-) diff --git a/source/Tutorials/Workspace/CreatingAWorkspace.rst b/source/Tutorials/Workspace/CreatingAWorkspace.rst index e0b9b734223..63e3efad4a4 100644 --- a/source/Tutorials/Workspace/CreatingAWorkspace.rst +++ b/source/Tutorials/Workspace/CreatingAWorkspace.rst @@ -16,11 +16,14 @@ Creating a workspace Background ---------- -Before using ROS 2, it’s necessary to source your main ROS 2 installation in the terminal you plan to work in. +A workspace is a directory containing ROS 2 packages. +Before using ROS 2, it’s necessary to source your main ROS 2 installation workspace in the terminal you plan to work in. This makes ROS 2’s packages available for you to use in that terminal. + You also have the option of sourcing an “overlay” – a secondary workspace where you can work on packages without interfering with the main ROS 2 installation, or “underlay”. Your underlay must contain the dependencies of all the packages in your overlay. -Modifications and developments in your overlay will override packages in the underlay. +Packages in your overlay will override packages in the underlay. +It's also possible to have several layers of underlays and overlays, with each successive overlay using the packages of its parent underlays. Prerequisites @@ -62,13 +65,13 @@ Depending on how you installed ROS 2 (from source or binaries), and which platfo .. code-block:: bash - . ~/ros2_install/ros2-osx/setup.bash + . ~/ros2_/ros2-osx/setup.bash .. group-tab:: Windows .. code-block:: bash - call C:\dev\ros2\local_setup.bat + call C:\dev\ros2_\local_setup.bat Consult the :ref:`installation guide ` you followed if these commands don’t work for you. @@ -126,8 +129,10 @@ Which will list the contents of the repo you just cloned, like so: roscpp_tutorials rospy_tutorials ros_tutorials turtlesim -Now you have populated your workspace with sample packages, but it isn’t a fully-functional workspace yet. -You need to build the workspace first. +The first three packages are being ignored; ``turtlesim`` is the only actual ROS 2 package in this repo. + +Now you have populated your workspace with a sample package, but it isn’t a fully-functional workspace yet. +You need to resolve dependencies and build the workspace first. 4 Resolve dependencies @@ -158,23 +163,34 @@ If you already have all your dependencies, the console will return: Packages declare their dependencies in the package.xml file (you will learn more about packages in the next tutorial). This command walks through those declarations and installs the ones that are missing. +You can learn more about ``rosdep`` in another tutorial (coming soon). 5 Build the workspace with colcon ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ From the root of your workspace (``~/dev_ws``), you can now build your packages using the command: -.. code-block:: bash +.. tabs:: - colcon build + .. group-tab:: Linux -If you’re using Windows, you will need to append the ``merge-install`` argument like so: + .. code-block:: bash -.. code-block:: bash + colcon build + + .. group-tab:: macOS - colcon build --merge-install + .. code-block:: bash -Windows doesn’t allow long paths, so ``merge-install`` will combine all the paths into the ``install`` directory. + colcon build + + .. group-tab:: Linux + + .. code-block:: bash + + colcon build --merge-install + + Windows doesn’t allow long paths, so ``merge-install`` will combine all the paths into the ``install`` directory. The console will return the following message: @@ -221,13 +237,13 @@ In the new terminal, source your main ROS 2 environment as the “underlay”, s .. code-block:: bash - . ~/ros2_install/ros2-osx/setup.bash + . ~/ros2_/ros2-osx/setup.bash .. group-tab:: Windows .. code-block:: bash - call C:\dev\ros2\local_setup.bat + call C:\dev\ros2_\setup.bat Go into the root of your workspace: @@ -237,9 +253,33 @@ Go into the root of your workspace: In the root, source your overlay: -.. code-block:: bash +.. tabs:: + + .. group-tab:: Linux + + .. code-block:: bash + + . install/local_setup.bash + + .. group-tab:: macOS + + .. code-block:: bash + + . install/local_setup.bash + + .. group-tab:: Linux + + .. code-block:: bash + + . install/local_setup.bat + +.. note:: + + Sourcing the ``local_setup`` of the overlay will only add the packages available in the overlay to your environment. + ``setup`` sources the overlay as well as the underlay it was created in, allowing you to utilize both workspaces. - . install/setup.bash + So, sourcing your main ROS 2 installation's ``setup`` and then the ``dev_ws`` overlay's ``local_setup``, like you just did, + is the same as just sourcing ``dev_ws``'s ``setup``, because that includes the environment of the underlay it was created in. Now you can run the ``turtlesim`` package from the overlay: @@ -287,7 +327,7 @@ You can see that modifications in the overlay did not actually affect anything i Summary ------- -In this tutorial, you sourced your main ROS 2 distro install as your underlay, and created an overlay by running ``. install/setup.bash`` in your new workspace. +In this tutorial, you sourced your main ROS 2 distro install as your underlay, and created an overlay by cloning and building packages in a new workspace. The overlay gets prepended to the path, and takes precedence over the underlay, as you saw with your modified turtlesim. Using overlays is recommended for working on a small number of packages, so you don’t have to put everything in the same workspace and rebuild a huge workspace on every iteration. From 5d2c86b55e288feb340fa960916c4df88389c1f7 Mon Sep 17 00:00:00 2001 From: maryaB-osr Date: Thu, 24 Oct 2019 10:01:51 -0700 Subject: [PATCH 05/10] revert source paths until PR 380 merges Signed-off-by: maryaB-osr --- source/Tutorials/Workspace/CreatingAWorkspace.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/Tutorials/Workspace/CreatingAWorkspace.rst b/source/Tutorials/Workspace/CreatingAWorkspace.rst index 63e3efad4a4..3c83c9268bb 100644 --- a/source/Tutorials/Workspace/CreatingAWorkspace.rst +++ b/source/Tutorials/Workspace/CreatingAWorkspace.rst @@ -65,13 +65,13 @@ Depending on how you installed ROS 2 (from source or binaries), and which platfo .. code-block:: bash - . ~/ros2_/ros2-osx/setup.bash + . ~/ros2_install/ros2-osx/setup.bash .. group-tab:: Windows .. code-block:: bash - call C:\dev\ros2_\local_setup.bat + call C:\dev\ros2\local_setup.bat Consult the :ref:`installation guide ` you followed if these commands don’t work for you. @@ -184,7 +184,7 @@ From the root of your workspace (``~/dev_ws``), you can now build your packages colcon build - .. group-tab:: Linux + .. group-tab:: Windows .. code-block:: bash @@ -237,13 +237,13 @@ In the new terminal, source your main ROS 2 environment as the “underlay”, s .. code-block:: bash - . ~/ros2_/ros2-osx/setup.bash + . ~/ros2_install/ros2-osx/setup.bash .. group-tab:: Windows .. code-block:: bash - call C:\dev\ros2_\setup.bat + call C:\dev\ros2\setup.bat Go into the root of your workspace: From 1b8f93e9fdb268cfe2fb061f20ff8bc680641b95 Mon Sep 17 00:00:00 2001 From: Marya Belanger Date: Thu, 24 Oct 2019 21:55:21 +0300 Subject: [PATCH 06/10] underlay != main installation Co-Authored-By: Tully Foote --- source/Tutorials/Workspace/CreatingAWorkspace.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Tutorials/Workspace/CreatingAWorkspace.rst b/source/Tutorials/Workspace/CreatingAWorkspace.rst index 3c83c9268bb..9459b241c32 100644 --- a/source/Tutorials/Workspace/CreatingAWorkspace.rst +++ b/source/Tutorials/Workspace/CreatingAWorkspace.rst @@ -20,7 +20,7 @@ A workspace is a directory containing ROS 2 packages. Before using ROS 2, it’s necessary to source your main ROS 2 installation workspace in the terminal you plan to work in. This makes ROS 2’s packages available for you to use in that terminal. -You also have the option of sourcing an “overlay” – a secondary workspace where you can work on packages without interfering with the main ROS 2 installation, or “underlay”. +You also have the option of sourcing an “overlay” – a secondary workspace where you can add new packages without interfering with the existing ROS 2 workspace that you're extending, or “underlay”. Your underlay must contain the dependencies of all the packages in your overlay. Packages in your overlay will override packages in the underlay. It's also possible to have several layers of underlays and overlays, with each successive overlay using the packages of its parent underlays. From d2f7cd9367966f3719366bfced76669d16c88f71 Mon Sep 17 00:00:00 2001 From: Marya Belanger Date: Thu, 24 Oct 2019 21:56:13 +0300 Subject: [PATCH 07/10] main source not mandatory Co-Authored-By: Tully Foote --- source/Tutorials/Workspace/CreatingAWorkspace.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Tutorials/Workspace/CreatingAWorkspace.rst b/source/Tutorials/Workspace/CreatingAWorkspace.rst index 9459b241c32..877c450e370 100644 --- a/source/Tutorials/Workspace/CreatingAWorkspace.rst +++ b/source/Tutorials/Workspace/CreatingAWorkspace.rst @@ -17,7 +17,7 @@ Background ---------- A workspace is a directory containing ROS 2 packages. -Before using ROS 2, it’s necessary to source your main ROS 2 installation workspace in the terminal you plan to work in. +Before using ROS 2, it’s necessary to source your the ROS 2 installation workspace in the terminal you plan to work in. This makes ROS 2’s packages available for you to use in that terminal. You also have the option of sourcing an “overlay” – a secondary workspace where you can add new packages without interfering with the existing ROS 2 workspace that you're extending, or “underlay”. From a2123cb3e7037f48d95612ee7a367552d48d7f30 Mon Sep 17 00:00:00 2001 From: Marya Belanger Date: Thu, 24 Oct 2019 21:58:49 +0300 Subject: [PATCH 08/10] underlay != main installation (again) Co-Authored-By: Tully Foote --- source/Tutorials/Workspace/CreatingAWorkspace.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Tutorials/Workspace/CreatingAWorkspace.rst b/source/Tutorials/Workspace/CreatingAWorkspace.rst index 877c450e370..ef7d3f4ab1a 100644 --- a/source/Tutorials/Workspace/CreatingAWorkspace.rst +++ b/source/Tutorials/Workspace/CreatingAWorkspace.rst @@ -318,7 +318,7 @@ You will see the title bar on the turtlesim window now says “MyTurtleSim”. Even though your main ROS 2 environment was sourced in this terminal earlier, the overlay of your ``dev_ws`` environment takes precedence over the contents of the underlay. -If you open another terminal, only source your main ROS 2 distro, and run turtlesim, the title bar will be back to normal (“TurtleSim”). +If you open another terminal, only source your underlay, the main ROS 2 distro, and run turtlesim, the title bar will be back to normal (“TurtleSim”). .. image:: underlay.png From 2ad8076eea0fa469cd6474731346cb4990ed6776 Mon Sep 17 00:00:00 2001 From: maryaB-osr Date: Thu, 24 Oct 2019 13:57:28 -0700 Subject: [PATCH 09/10] tfoote and clalancette suggestions Signed-off-by: maryaB-osr --- .../Workspace/CreatingAWorkspace.rst | 37 +++++++++++++++---- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/source/Tutorials/Workspace/CreatingAWorkspace.rst b/source/Tutorials/Workspace/CreatingAWorkspace.rst index 3c83c9268bb..2a2a99ea3b9 100644 --- a/source/Tutorials/Workspace/CreatingAWorkspace.rst +++ b/source/Tutorials/Workspace/CreatingAWorkspace.rst @@ -103,7 +103,7 @@ In the rest of the beginner developer tutorials, you will create your own packag The existing packages you will use are from the ``ros_tutorials`` repository (repo). If you went through the beginner user tutorials, you'll be familiar with ``turtlesim``, one of the packages in this repo. -You can see the repo `on github `__ +You can see the repo `on github `__. Notice the “Branch” drop down list to the left above the directories list. When you clone this repo, add the ``-b`` argument followed by the branch that corresponds with your ROS 2 distro. @@ -115,17 +115,34 @@ In the ``dev_ws/src`` directory, if your distro is Dashing for example, run the git clone https://github.com/ros/ros_tutorials.git -b dashing-devel Now ``ros_tutorials`` is cloned in your workspace. -Enter ``ls`` in your terminal, and you will see the new ``ros_tutorials`` directory. +If you view the contents of ``dev_ws/src`` now, you will see the new ``ros_tutorials`` directory. To see the packages inside ``ros_tutorials``, enter the command: -.. code-block:: bash +.. tabs:: + + .. group-tab:: Linux + + .. code-block:: bash + + ls ros_tutorials + + .. group-tab:: macOS + + .. code-block:: bash + + ls ros_tutorials + + .. group-tab:: Windows + + .. code-block:: bash + + dir ros_tutorials - ls ros_tutorials Which will list the contents of the repo you just cloned, like so: -.. code-block:: bash +.. code-block:: roscpp_tutorials rospy_tutorials ros_tutorials turtlesim @@ -267,7 +284,7 @@ In the root, source your overlay: . install/local_setup.bash - .. group-tab:: Linux + .. group-tab:: Windows .. code-block:: bash @@ -290,6 +307,7 @@ Now you can run the ``turtlesim`` package from the overlay: But how can you tell that this is the overlay turtlesim running, and not your main installation's turtlesim? Let’s modify turtlesim in the overlay so you can see the effects: + * You can modify and rebuild packages in the overlay separately from the underlay. * The overlay takes precedence over the underlay. @@ -318,7 +336,12 @@ You will see the title bar on the turtlesim window now says “MyTurtleSim”. Even though your main ROS 2 environment was sourced in this terminal earlier, the overlay of your ``dev_ws`` environment takes precedence over the contents of the underlay. -If you open another terminal, only source your main ROS 2 distro, and run turtlesim, the title bar will be back to normal (“TurtleSim”). +To see that your underlay is still intact, open a brand new terminal and source only your ROS 2 installation. +Run turtlesim again: + +.. code-block:: + + ros2 run turtlesim turtlesim_node .. image:: underlay.png From 82f978261e11ce1ba06cc1807c5d5d6956641f4f Mon Sep 17 00:00:00 2001 From: maryaB-osr Date: Thu, 24 Oct 2019 14:19:49 -0700 Subject: [PATCH 10/10] trailing whitespace Signed-off-by: maryaB-osr --- source/Tutorials/Workspace/CreatingAWorkspace.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Tutorials/Workspace/CreatingAWorkspace.rst b/source/Tutorials/Workspace/CreatingAWorkspace.rst index e9ee1c53ff9..a14239aaff3 100644 --- a/source/Tutorials/Workspace/CreatingAWorkspace.rst +++ b/source/Tutorials/Workspace/CreatingAWorkspace.rst @@ -142,7 +142,7 @@ To see the packages inside ``ros_tutorials``, enter the command: Which will list the contents of the repo you just cloned, like so: -.. code-block:: +.. code-block:: roscpp_tutorials rospy_tutorials ros_tutorials turtlesim