This is the solution for the first activity of this course.
And in this activity, the challenge is to get the same view here as I have on this image.
When you start our cut graph, okay.
And as you can see we need to start four different nodes.
The first two nodes.
So we have the Python one and the C plus plus ones that we need to rename.
And then we also have the turtle sim with the teleop.
So let's start with that node here.
You see we have to start the Python node.
Actually we could start any node.
In the end we just need to start the node that has this name custom pi.
So let's do ros to run my pi pkg with pi node.
And then well the default name I can just run it and see that the default name is going to be pi test.
So pi test is not going to be what we want okay.
You see in the code it's pi test.
So we need to modify this.
We're not going to modify this in the code.
We are going to use the remapping option from the terminal.
By the way I'm just going to remove that here and save the file okay.
So let's run it again this time with Ross r dash r underscore underscore.
Node.
And what's the name again?
Custom p y.
Let's press enter.
Okay.
Now I can start acute graph.
Let's just start acute graph here.
For example I could open a fifth terminal.
It doesn't matter.
So acute graph.
Okay.
So we already have the first one.
The second one we're going to start the for example the C plus plus one.
So ros2 run my cpp package with cpp node ros args and then dash r node.
And this time the node name is a bit long.
So this is a really long name for cpp node.
But it works.
This is a really long name for a cpp node but it works.
So of course I don't recommend that you use names that long.
But just to show you that, well, it works as long as you separate each word by an underscore is going
to work.
And you see we have the logs.
So let's go back to our cut graph.
And let's refresh.
We have the two nodes here.
Great.
Now let's go to those two other nodes.
You see this is the total SIM and the teleop.
So the Teleop turtle is using the same name.
So we won't need to rename it.
But that node here.
So if I run the turtle SIM Ross to run turtle sim and turtle sim node, you see that the node name is
turtle sim.
We can see that on our graph.
Okay.
And we don't want turtle sim, we want Donatello.
All right.
So I'm going to do Ross ags dash r node Donatello.
Great.
And what turtle sim window is still named turtle sim.
But you see, now the node name is Donatello, which we can verify right here.
And finally, we need to start the.
Uh, teleop.
So, ros to run turtle sim.
So that's the turtle sim package, and then turtle teleop key.
If you don't remember that, just press tab twice here and you can see all the nodes we can start.
So we have the turtle sim node.
We also have two other nodes we haven't seen.
You can try them.
And we have the turtle Teleop.
So turtle Teleop key okay.
It's working.
We can even move.
So I press some keys here and you can see on the turtle sim we have moved.
And if I go back to my actigraph I refresh.
Well that's the view.
So it doesn't match exactly.
I mean it's it's not exactly organized the same way.
So the layout is not the same.
But this is exactly the same thing.
Okay.
We have our two nodes here.
So the CP node and the Python one.
And then we have the Teleop turtle and the Donatello that are communicating with each other okay.
So even if you get a layout that's a bit different it's really not a problem okay.
As long as you get the same nodes, great.
And that's it for this first activity.