WEBVTT

00:00.230 --> 00:06.200
In this laboratory lesson, we will apply everything we have learned so far in the course to visualize

00:06.200 --> 00:08.750
the Erdf model of the robot in RV's.

00:09.110 --> 00:16.310
To do this, we will use the Ros two parameters to configure some nodes that allows us to publish the

00:16.310 --> 00:18.410
Erdf model within some Ros.

00:18.410 --> 00:25.070
Two topics where Arviz will read the information needed to display the robot so including its links

00:25.070 --> 00:27.980
and joints in its graphical interface.

00:28.220 --> 00:33.140
So let's start by opening a new terminal and let's go to the workspace.

00:33.290 --> 00:34.980
Let's source it.

00:35.000 --> 00:38.120
So let's source the setup dot bash file.

00:38.360 --> 00:42.890
And now let's start by running the robot estate publisher node.

00:43.010 --> 00:53.360
So with the Ros two run command and from the robot state publisher package, let's start the robot state

00:53.360 --> 00:54.560
publisher node.

00:54.860 --> 01:01.590
This node has discussed in the theoretical lessons is a general purpose node that is developed to publish

01:01.590 --> 01:05.760
the RDF model of any robot within our Ros two topic.

01:06.150 --> 01:11.070
Therefore we need to configure it to publish the RDF model of our robot.

01:11.280 --> 01:15.530
So let's assign a value to a parameter that this node offers.

01:15.540 --> 01:23.970
And so as we learned in the previous lesson, to assign a parameter to a node, we use the Ros args

01:24.120 --> 01:29.280
and then minus P to assign a value to the parameter robot

01:31.560 --> 01:32.760
description.

01:33.000 --> 01:41.490
And so since we used the exact format to write the RDF model of our robot, but actually still the official

01:41.490 --> 01:50.910
accepted format for modeling robots is Erdf in Ros two, we first need to convert the model into a plain

01:50.910 --> 01:55.680
Erdf model before passing it to the robot description parameter.

01:56.070 --> 01:59.670
To do so, we can use a small trick, let's say.

01:59.670 --> 02:06.540
And so we can use a command within the parentheses and the command is.

02:07.500 --> 02:14.700
And then to this one we need to pass the directory of the Erdf model, which in my case is located in

02:14.700 --> 02:20.340
OLM, Alien Arduino Bot Workspace.

02:20.950 --> 02:26.520
And then it is in the source folder in the Arduino bot.

02:28.760 --> 02:38.430
Description in the DF and the model is called Arduino bot dot Urdf dot Zarco.

02:38.500 --> 02:47.920
So you have to substitute this directory here with the directory on your PC of the Arduino bot Urdf

02:48.220 --> 02:49.390
Hexaco model.

02:49.570 --> 02:54.100
So let's press enter and now we can leave this node up and running.

02:54.100 --> 03:00.250
So basically we can leave this node publishing the model of the robot within a certain topic.

03:00.640 --> 03:02.650
Now let's split the terminal.

03:02.650 --> 03:07.960
So let's open a new window and here let's again source the workspace.

03:08.530 --> 03:16.960
So the file setup dot bash and let's start a new node with the command Ros to run and this time from

03:16.960 --> 03:23.200
the joint state publish GUI package.

03:23.200 --> 03:27.370
Let's start the joint state publisher, GUI node.

03:27.400 --> 03:35.170
So let's press enter and this starts a graphical interface with some sliders which corresponds to all

03:35.170 --> 03:41.800
the movable joints of our robot which we can use then to move around our urdf model.

03:42.160 --> 03:49.660
So first, in order to see our robot moving, we need to launch our So still opening a new terminal.

03:49.750 --> 03:51.820
Let's again source it.

03:54.280 --> 03:58.990
And now let's run our RVs as if it was a normal Ros two node.

03:59.020 --> 04:00.940
So, Ros to run.

04:01.120 --> 04:04.000
And from the RVs to package.

04:04.000 --> 04:06.280
Let's start RV two.

04:07.600 --> 04:08.200
Here.

04:08.200 --> 04:10.060
This is the RV's window.

04:10.060 --> 04:16.870
And as a first step, as you can see here, we have an error saying that the global status so the fixed

04:16.870 --> 04:22.690
frame map doesn't exist because our first frame was the frame world.

04:22.720 --> 04:28.030
So let's change this one to be the frame world, the first frame of our model.

04:28.740 --> 04:33.120
Now everything is fine and we can add some visualization.

04:33.120 --> 04:37.160
So in order to visualize the links that make up the robot.

04:37.170 --> 04:41.820
And so let's click on Add and let's visualize the TF.

04:42.030 --> 04:43.860
So let's press enter.

04:43.860 --> 04:49.290
And this message contains the position and the orientation of all the links of the robot.

04:49.290 --> 04:55.530
And this one is published by the robot state publisher node, which here we left running.

04:55.530 --> 04:57.660
So it is still in execution.

04:57.960 --> 05:04.410
And now we can also display the robot meshes that are associated with each of these links.

05:04.410 --> 05:06.450
So this is just the structure.

05:06.540 --> 05:14.430
In order to visualize also the meshes, let's add a new plugin and this one is the robot model.

05:14.430 --> 05:16.260
So let's press Enter.

05:16.260 --> 05:23.610
And this plugin basically is subscribed to a topic where the robot description is published and it uses

05:23.610 --> 05:25.620
this topic to display the meshes.

05:25.890 --> 05:29.080
So let's change the name of the topic here.

05:29.080 --> 05:36.100
So here the description is topic and we need to check the robot description.

05:36.100 --> 05:37.870
So let's press enter.

05:37.870 --> 05:43.630
And now we can see that the meshes of the robot are all in place.

05:44.480 --> 05:52.040
Also, we can see that if we take the joint state publisher, so this window here and we move these

05:52.040 --> 05:52.880
sliders.

05:53.970 --> 06:00.210
The robot is moving accordingly so we can move all the joints.

06:01.860 --> 06:04.860
And also we can open and close the gripper.

06:06.160 --> 06:08.530
Before closing this window.

06:08.530 --> 06:10.960
Let's save the current configuration.

06:10.960 --> 06:16.450
So let's save the current configuration in which we have added the visualization of the TF plugin and

06:16.450 --> 06:22.300
the robot model so that the next time that we want to visualize this model, we don't have to add them

06:22.300 --> 06:23.110
manually.

06:23.290 --> 06:30.460
So let's go to file save config as and then let's go into our workspace.

06:30.670 --> 06:38.860
So here in the source folder in the Arduino bot description and here let's create a new folder called

06:39.820 --> 06:40.660
RVs.

06:40.780 --> 06:48.820
And within this folder let's call this visualization display dot RVs.

06:48.970 --> 06:51.130
So let's save this file.

06:52.180 --> 06:54.670
As a conclusion in this laboratory lesson.

06:54.670 --> 07:01.480
I want to point out the number of steps that we had to perform and also the number of terminals that

07:01.480 --> 07:06.160
we had to open in order to visualize and move our robot in RVs.

07:06.670 --> 07:13.300
In the next lessons, we will see how to simplify all of these operations with the use of a single command.

07:13.330 --> 07:16.690
Thanks to the launch files that are available in Ros two.
