WEBVTT

00:00.080 --> 00:06.680
So if you can rename a node and if you can rename a topic, you can also rename a service when you start

00:06.680 --> 00:07.280
the node.

00:07.310 --> 00:07.670
Okay.

00:07.700 --> 00:17.690
So let's start first our node Ros to run my for example Python package with the Add to mint server.

00:18.170 --> 00:18.500
Okay.

00:18.530 --> 00:24.740
And as you create the service when you create the server, then that's also where you're going to start

00:24.740 --> 00:26.060
to rename the service.

00:26.090 --> 00:28.010
Let's just run it like this.

00:28.040 --> 00:28.670
Okay.

00:28.670 --> 00:31.250
And we can see that we have Ros two.

00:31.280 --> 00:32.630
I'm going to do that here.

00:32.810 --> 00:37.100
Ros two service list.

00:37.700 --> 00:40.370
We find the add to hints.

00:40.400 --> 00:40.670
Okay.

00:40.700 --> 00:42.740
So that's what we expected.

00:42.980 --> 00:47.900
Now let's stop that and let's run the command again.

00:47.900 --> 00:52.880
And this time well we're going to put the Ros ARGs like we did before.

00:52.880 --> 00:56.540
And then dash R for renaming actually remapping.

00:56.540 --> 00:58.940
And then we're going to do the same thing as we did with topics.

00:58.940 --> 01:01.580
So with topics you would just put the name of the topic.

01:01.580 --> 01:05.780
So the old one and then the new one for services we put the old name.

01:05.780 --> 01:09.920
So add to int that's the one we have written in the code.

01:09.920 --> 01:11.450
And then colon equal.

01:11.450 --> 01:15.440
And well let's just say ABC, I run it.

01:15.470 --> 01:16.250
Okay.

01:16.280 --> 01:17.210
It's still working.

01:17.210 --> 01:18.950
So we haven't renamed the node.

01:18.950 --> 01:21.590
We have just renamed the service inside the node.

01:21.640 --> 01:25.810
Now if I do Ros two service list, you see we have ABC.

01:26.020 --> 01:26.200
Okay.

01:26.200 --> 01:28.270
So all the other services stay the same.

01:28.270 --> 01:30.280
Those are automatically generated.

01:30.280 --> 01:34.780
But that one here add to it becomes ABC.

01:35.020 --> 01:36.820
And now let's run the client.

01:36.820 --> 01:44.980
So Ros to run my Python package for example and add to its client.

01:45.040 --> 01:46.810
Let's just run the script.

01:47.530 --> 01:48.790
Um no.

01:48.820 --> 01:49.210
OOP.

01:49.240 --> 01:50.380
It's going to be the same.

01:50.620 --> 01:56.500
And what you can see we're going to create a client, but then waiting for the server.

01:56.500 --> 01:58.300
So the server is not found.

01:58.510 --> 02:00.850
I'll press control see why the server is not found.

02:00.850 --> 02:08.350
Because this here this node is going to try to reach the add to insert service.

02:08.350 --> 02:10.660
But this service doesn't exist anymore.

02:10.660 --> 02:13.510
It's ABC because we have renamed it here.

02:13.510 --> 02:21.910
So you also need to rename it to do that on the client side with ros args.

02:21.910 --> 02:29.380
And then dash r add to int that becomes ABC.

02:30.550 --> 02:33.910
And you see now it is found and it's correctly working.

02:33.910 --> 02:42.280
So if you rename a service on the server side then for each client that you start you also need to rename

02:42.280 --> 02:43.090
the service.
