1

00:00:05,820  -->  00:00:06,991
we will learn about colcon now

2

00:00:07,966  -->  00:00:14,127
colcon is a tool that ros2 uses in order to build the package from source

3

00:00:14,127  -->  00:00:21,596
we work in a workspace where we store the packages and the colcon build will be use to build these packages So

4

00:00:21,596  -->  00:00:29,728
here is the command in order to install

5

00:00:30,060  -->  00:00:38,100
so it is installed and now we will be creating
our first workspace remember that we pushed a

6

00:00:38,100  -->  00:00:46,800
line in The Bashrc that was the source opt
Ros and Foxy setup.bash so this is how we

7

00:00:46,800  -->  00:00:51,720
Source a terminal that was our underlay
workspace and now we will be creating

8

00:00:51,720  -->  00:01:00,480
an overlay workspace open the files create a
folder ros2_ws ros2 workspace

9

00:01:03,900  -->  00:01:14,580
now we will clone a package inside our
workspace so cd ros2_ws so

10

00:01:14,580  -->  00:01:23,400
now we are in our workspace from the terminal
and we will be cloning a package that is here

11

00:01:28,620  -->  00:01:36,540
yeah so now it has a SRC folder and then
example and then there are some code

12

00:01:36,540  -->  00:01:43,080
inside this and we will just see the package
structure the SRC folder in which we keep our

13

00:01:43,080  -->  00:01:48,840
repositories try to build this how we can
build it we there are actually two commands

14

00:01:49,380  -->  00:01:55,200
one is the colcon build
and the other is colcon build

15

00:01:55,860  -->  00:02:02,340
-- symlink - install so what is
the difference between these two commands Okay

16

00:02:02,410  -->  00:02:09,300
colcon build will be building all the packages from The
Source instead of just building if

17

00:02:09,300  -->  00:02:13,920
we add the keyword symlink install
it will also be linking the packages

18

00:02:13,920  -->  00:02:18,900
with the installation directories  build
directly colcon build -- symlink

19

00:02:18,900  -->  00:02:23,940
install is command that built the packages
faster so we will be using this command

20

00:02:26,940  -->  00:02:36,780
and now it is building our first package that
we just cloned remember that we we had just

21

00:02:36,780  -->  00:02:44,880
src folder before but after we enter the
command it has created three extra folders so

22

00:02:44,880  -->  00:02:52,920
in the build folder it builds and save the files
in binaries into this build directory and in the

23

00:02:52,920  -->  00:02:58,680
install directory it creates the file that will
be used to install and in the log solder it saved

24

00:02:58,680  -->  00:03:03,120
the log information from the different nodes
now we have build the package after building

25

00:03:03,120  -->  00:03:10,620
our workspace is still not sourced so we also
have to Source this particular workspace in

26

00:03:10,620  -->  00:03:20,880
order to run a node okay so how do we do
that by source install and set up dot bash

27

00:03:22,020  -->  00:03:28,620
using this command colcon test we can also
monitor the package about their colcon status

28

00:03:32,340  -->  00:03:39,420
do you remember how do we run a node, we
use command ros2 run package name

29

00:03:39,420  -->  00:03:48,720
and then the executable conde ros2 run
package name is the example underscore

30

00:03:51,780  -->  00:04:01,620
and node name subscriber member function
node is running now we will open up another terminal and uh

31

00:04:01,620  -->  00:04:05,520
we will type this command
this is the publisher command

32

00:04:08,100  -->  00:04:10,980
okay it is publishing and this is receiving

33

00:04:12,000  -->  00:04:17,160
okay so this is how we can
run a node from our workspace
