In this lesson, I'm going to do a quick recap about Chalcone and stay until the end, because I will
show you also a new option that you can use to work faster with your Python nodes.
So first of all, you have used Chalcone to build your workspace and I'm going to repeat that again.
It's super important that you build inside the Ros2 workspace and not anywhere else.
Okay, you go to the roster workspace and this is where you should have the source folder of your workspace.
You don't build in the source folder, you don't build in any other package.
You don't build anywhere else.
You just build from this workspace roots place here.
Okay.
And how to build.
Well, you do click on Space and Build and that's going to build all of the packages that you have inside
the source folder.
And here you can see we have two packages.
Then we have also seen that you can add the packages select option.
And you can only build one or well the list of packages that you provide here separated with a space.
So for example my CP pg I only want to build that one.
You see, I only built that one.
Great.
And now there is another option you can use.
And that's going to be only for Python packages where you have Python node.
So let's build the package this time my pi pg and we can add the option dash dash symlink dash install.
You should also have the auto completion here as you can see.
So let's build it like that okay.
So it's going to work.
Same thing.
But now what does this option do.
Well when you build the package with symlink install then when you do a roster run it's actually going
to run the file directly that you have written in the source folder of your workspace, not in the install
folder.
And why would we want to do this?
Because simply then you can edit your Python files and you can start them again without having to build
your workspace again.
I just want to give a quick warning before we try this is that sometimes it may lead to some issues
and bugs.
Okay, I've experienced that quite often.
I've seen also a lot of people experience that.
So if that option doesn't work well for you, then I just suggest not using it.
And well, every time you just get the habit of doing a call on build and then source and then run.
So let's open, I'm going to go to my workspace.
So I go to the source repository.
And then I do code that.
Let's open the code.
So let's go to uh here the Python my first node okay.
Let's just run it.
Let's see what we have.
So I have built it okay.
Now that I have built it I need to source it.
So let's go here and let's do a source bashrc for example.
And then rose to run my pi pg with pi node.
And you see hello world and then hello space zero, space one, etc. so that's what we have for now.
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.
So you see I saved the file.
And now I'm going to go back to the terminal.
And let's try to run it again.
And you see.
So I'm going to press Ctrl C you see that we have the new version okay.
So when we modify code here in the Python file we don't need to build again okay.
You first need to build once anyway to install the nodes.
So any new node that you create you need to build it and install it.
But then with the Simulink install you can continue to develop your node.
So your Python node and you can see you just save the file, you execute it again and you don't need
to do any of the build again.
So that can be quite useful to do some quick iterations when you are programming with Python.
And of course it doesn't work with C plus plus, because any way you need to compile a C plus plus file
to be able to run it.
All right.
So in this course I might use this option.
I might not use it just now.
You know that you can do a Simulink install that will be faster for you to develop Python files.
And this is only good for development phase okay.
If you're going to use your workspace in a more production mode, then you want to not use that option.
Okay?
You want to correctly install all of the files in the install folder.
And also once again, if you have some bugs, because sometimes I've experienced that and other people
too.
If you have some bugs when you're using the Simulink install, then try to remove this.
So try to build the package again without this option and see if it works better.
And also only use that on Python packages, not on C plus plus packages or other packages.
Okay.
So well that's about it.
About call code here.
There is not much more that we will use in this course okay.
So you know how to build where to build.
And then the options that you can add.