After all this installation process.
Let's launch a first Ros2 program.
For that.
We won't write any code here.
We will just use existing examples that were downloaded during the installation.
So for now, just type what I write.
You don't need to really understand.
I will explain everything in the next few sections.
Okay?
The goal is just to have something that works quickly so we can validate that Ros2 is working.
So you can open two terminals however you want.
And in the first terminal we are going to do Ros two and then space run.
And then we will need to provide a package name.
So again I'm going to come back to this later.
So demo nodes CP you can press Tab for auto completion okay.
It should work.
And then space we're going to run talker okay.
So it's called talker Ros to run demo node CP with underscores.
And then talker.
We are going to run that and you should see this.
So some logs saying hello world 123 etc..
If you have an error here already it means that probably you haven't sourced correctly your environment
and you need to go back to the previous lesson.
Okay, so we have this one here.
You can see we have a program printing Hello World with a number.
Now on that terminal let's do Ros2 run demo nodes cpp this time with listener.
And you see we have I heard Hello world and that corresponds actually to what was seemed to be published
here on that terminal.
You see hello world 40 and hello world 40.
Okay.
So you see that this terminal is talking to that terminal.
All right.
To stop a program you can press Ctrl C.
So let's press Ctrl C here.
And you can see that program has been finished and this one is still running.
But as you see as this one is not running, as the talker is not running, then the listener is not
receiving anything.
And I can do ctrl C here as well.
All right.
So if you can successfully start and stop those two programs, it means that everything went well.
And you can continue with the next section.
If it doesn't work, something is wrong with the installation or the environment.
In this case.
Come back to the previous lessons and make sure you have followed every step.