WEBVTT

00:00.080 --> 00:05.540
In this lesson, I'm going to do a quick recap about Chalcone and stay until the end, because I will

00:05.540 --> 00:10.310
show you also a new option that you can use to work faster with your Python nodes.

00:10.310 --> 00:17.270
So first of all, you have used Chalcone to build your workspace and I'm going to repeat that again.

00:17.270 --> 00:25.070
It's super important that you build inside the Ros2 workspace and not anywhere else.

00:25.100 --> 00:30.920
Okay, you go to the roster workspace and this is where you should have the source folder of your workspace.

00:30.920 --> 00:34.970
You don't build in the source folder, you don't build in any other package.

00:34.970 --> 00:36.650
You don't build anywhere else.

00:36.650 --> 00:41.240
You just build from this workspace roots place here.

00:41.270 --> 00:41.570
Okay.

00:41.600 --> 00:42.500
And how to build.

00:42.500 --> 00:50.780
Well, you do click on Space and Build and that's going to build all of the packages that you have inside

00:50.780 --> 00:51.950
the source folder.

00:52.100 --> 00:54.200
And here you can see we have two packages.

00:54.200 --> 01:00.080
Then we have also seen that you can add the packages select option.

01:00.080 --> 01:06.830
And you can only build one or well the list of packages that you provide here separated with a space.

01:06.830 --> 01:12.350
So for example my CP pg I only want to build that one.

01:12.380 --> 01:14.840
You see, I only built that one.

01:14.840 --> 01:15.320
Great.

01:15.320 --> 01:17.450
And now there is another option you can use.

01:17.450 --> 01:21.920
And that's going to be only for Python packages where you have Python node.

01:21.920 --> 01:36.500
So let's build the package this time my pi pg and we can add the option dash dash symlink dash install.

01:36.530 --> 01:39.500
You should also have the auto completion here as you can see.

01:39.500 --> 01:43.520
So let's build it like that okay.

01:43.550 --> 01:44.720
So it's going to work.

01:44.750 --> 01:45.620
Same thing.

01:45.620 --> 01:48.560
But now what does this option do.

01:48.590 --> 01:55.760
Well when you build the package with symlink install then when you do a roster run it's actually going

01:55.760 --> 02:03.410
to run the file directly that you have written in the source folder of your workspace, not in the install

02:03.410 --> 02:03.890
folder.

02:03.890 --> 02:06.170
And why would we want to do this?

02:06.170 --> 02:12.650
Because simply then you can edit your Python files and you can start them again without having to build

02:12.650 --> 02:14.270
your workspace again.

02:14.300 --> 02:21.650
I just want to give a quick warning before we try this is that sometimes it may lead to some issues

02:21.650 --> 02:22.220
and bugs.

02:22.250 --> 02:24.620
Okay, I've experienced that quite often.

02:24.620 --> 02:27.110
I've seen also a lot of people experience that.

02:27.110 --> 02:32.780
So if that option doesn't work well for you, then I just suggest not using it.

02:32.780 --> 02:38.240
And well, every time you just get the habit of doing a call on build and then source and then run.

02:38.240 --> 02:42.710
So let's open, I'm going to go to my workspace.

02:43.190 --> 02:45.170
So I go to the source repository.

02:45.170 --> 02:46.880
And then I do code that.

02:46.880 --> 02:48.560
Let's open the code.

02:49.730 --> 02:58.040
So let's go to uh here the Python my first node okay.

02:58.070 --> 02:59.120
Let's just run it.

02:59.120 --> 03:00.530
Let's see what we have.

03:00.530 --> 03:03.080
So I have built it okay.

03:03.110 --> 03:05.990
Now that I have built it I need to source it.

03:05.990 --> 03:13.190
So let's go here and let's do a source bashrc for example.

03:13.550 --> 03:18.800
And then rose to run my pi pg with pi node.

03:19.520 --> 03:25.940
And you see hello world and then hello space zero, space one, etc. so that's what we have for now.

03:25.940 --> 03:34.310
But now I'm going to edit and let's add, let's add some letters here okay I'm going to save the file.

03:34.310 --> 03:36.350
So you see I saved the file.

03:36.350 --> 03:38.120
And now I'm going to go back to the terminal.

03:38.120 --> 03:40.610
And let's try to run it again.

03:42.470 --> 03:43.610
And you see.

03:43.880 --> 03:48.920
So I'm going to press Ctrl C you see that we have the new version okay.

03:48.950 --> 03:56.090
So when we modify code here in the Python file we don't need to build again okay.

03:56.120 --> 03:59.420
You first need to build once anyway to install the nodes.

03:59.420 --> 04:03.770
So any new node that you create you need to build it and install it.

04:03.770 --> 04:07.940
But then with the Simulink install you can continue to develop your node.

04:07.940 --> 04:13.670
So your Python node and you can see you just save the file, you execute it again and you don't need

04:13.670 --> 04:16.160
to do any of the build again.

04:16.160 --> 04:21.170
So that can be quite useful to do some quick iterations when you are programming with Python.

04:21.170 --> 04:26.360
And of course it doesn't work with C plus plus, because any way you need to compile a C plus plus file

04:26.390 --> 04:27.950
to be able to run it.

04:27.980 --> 04:28.400
All right.

04:28.400 --> 04:30.980
So in this course I might use this option.

04:30.980 --> 04:33.590
I might not use it just now.

04:33.590 --> 04:39.320
You know that you can do a Simulink install that will be faster for you to develop Python files.

04:39.320 --> 04:42.830
And this is only good for development phase okay.

04:42.830 --> 04:48.440
If you're going to use your workspace in a more production mode, then you want to not use that option.

04:48.470 --> 04:48.620
Okay?

04:48.650 --> 04:52.340
You want to correctly install all of the files in the install folder.

04:52.340 --> 04:56.960
And also once again, if you have some bugs, because sometimes I've experienced that and other people

04:56.990 --> 04:57.470
too.

04:57.470 --> 05:02.150
If you have some bugs when you're using the Simulink install, then try to remove this.

05:02.150 --> 05:06.410
So try to build the package again without this option and see if it works better.

05:06.410 --> 05:12.320
And also only use that on Python packages, not on C plus plus packages or other packages.

05:12.350 --> 05:12.740
Okay.

05:12.740 --> 05:13.970
So well that's about it.

05:13.970 --> 05:15.290
About call code here.

05:15.290 --> 05:18.860
There is not much more that we will use in this course okay.

05:18.890 --> 05:21.650
So you know how to build where to build.

05:21.650 --> 05:24.170
And then the options that you can add.
