WEBVTT

00:00.140 --> 00:07.430
Now that we have modeled our robot following the Urdf convention, we can move on and visualize it using

00:07.430 --> 00:10.460
one of the most useful tools available in Ros two.

00:10.940 --> 00:12.950
We are talking about RVs.

00:13.910 --> 00:19.100
RV indicates the second version of the Ros visualization tool.

00:19.100 --> 00:26.300
And this is a graphical interface that allows us to visualize the content of some Ros two messages that

00:26.300 --> 00:28.370
are published on some topics.

00:29.360 --> 00:36.230
The way it works is very simple, and it basically uses the publisher subscriber communication protocol.

00:36.590 --> 00:44.540
In fact, are these creates a subscriber node that receives messages from one or more ros2 topics.

00:45.330 --> 00:52.890
Whenever a new message is published on a topic, the subscriber receives it and interprets it based

00:52.890 --> 00:59.550
on the message type, and then it displays it in the GUI in an understandable and intuitive way.

01:00.430 --> 01:06.310
Arby's provides several plugins for the visualization of the most common rescue messages.

01:06.760 --> 01:13.330
For example, it is possible to visualize the map of a building that the robot can use for the navigation

01:13.330 --> 01:21.340
purposes in which three areas are marked in white occupied areas are marked in black and unknown areas

01:21.340 --> 01:24.280
or unexploited areas are marked in gray.

01:25.860 --> 01:32.820
It is also possible to visualize data from the robot sensors such as laser scanner, that measure the

01:32.820 --> 01:34.610
distance from obstacles.

01:34.620 --> 01:42.210
And that you can see here in Irvis represented as a set of red points or even it is possible to visualize

01:42.210 --> 01:47.220
images coming from the cameras that might be mounted on the robot.

01:48.700 --> 01:55.990
All of this information that we can visualize with RVs are basically transmitted as standard rescue

01:56.020 --> 01:58.800
messages in some ros2 topic.

01:58.810 --> 02:06.820
And so arviz simply allows us to visualize such messages with plugins that can interpret the message

02:06.820 --> 02:11.320
and create an understandable and user friendly visualization for it.

02:11.950 --> 02:18.400
I will try to give you some more examples to convince you that this is a key tool in the hands of any

02:18.400 --> 02:22.690
robotic software developer and that you will always find yourself using it.

02:23.110 --> 02:29.290
For this reason, I want to introduce you to this tool so early in the course so that you have time

02:29.290 --> 02:31.780
to play and to experiment with it.

02:32.750 --> 02:39.440
Until now, we have worked only with string messages in Ros2 and so with messages that were really simple

02:39.440 --> 02:45.980
to read and visualize in the terminal just by using the command Ros2 topic Echo.

02:46.190 --> 02:53.510
And so actually we didn't need to use a graphical interface like Arviz to visualize this kind of information.

02:54.080 --> 03:00.380
However, very often the messages that pass in the topics can be very complex and almost impossible

03:00.380 --> 03:05.060
to read and to understand only by displaying their content in the terminal.

03:05.720 --> 03:07.720
For example, this is what happened.

03:07.730 --> 03:15.740
If we use the command Ros2 topic echo to read the content of a topic where a map message is being published.

03:16.580 --> 03:17.960
The message Thatrillionepresents.

03:17.990 --> 03:25.310
A map is called occupancy grid and contains a very long vector full of numbers, each of them representing

03:25.310 --> 03:32.270
a single cell, a single pixel of the map, and also it has a number associated with it that indicates

03:32.270 --> 03:37.460
if the area of the map is free, occupied by an obstacle or unknown.

03:37.460 --> 03:39.020
So still unexplored.

03:40.170 --> 03:46.380
Let's assume that you implemented your code that adds some obstacles to the map and you want to actually

03:46.380 --> 03:47.580
see that it works.

03:47.580 --> 03:52.200
And so that these obstacles have been added in the correct position of the map.

03:52.960 --> 03:59.380
It would be impossible for you to do so only by reading the message in the terminal, just using the

03:59.380 --> 04:06.400
command Ros2 topic echo and by reading one by one each value each pixel of the map.

04:06.820 --> 04:14.650
For this reason, we use RVs to view in a clearer and more understandable way the content of this message.

04:15.970 --> 04:20.090
Similarly in the Ross, two topics can also be published.

04:20.110 --> 04:24.910
All those messages that contain the sensor readings such as laser scanner.

04:25.360 --> 04:30.940
Also in this case, the message that is published in the scan topic is incomprehensible.

04:30.940 --> 04:37.810
If you just read its content in the console, since it contains the distances from the obstacles in

04:37.810 --> 04:41.050
all the directions that are detected by the laser scanner.

04:42.080 --> 04:48.530
Finally, if I still haven't convinced you to use our reach to analyze all the messages that are published

04:48.530 --> 04:55.370
in the two topics, consider also that this not only allows you to visualize the difficult messages

04:55.370 --> 05:02.780
to understand, but it also does that when these messages are being published with high frequency in

05:02.780 --> 05:08.660
those two topics, consider, for example, the case of the streaming video coming from a camera.

05:09.260 --> 05:15.950
In this case, not only you have a message that is difficult to understand since it contains RGB colors

05:15.980 --> 05:20.990
of each pixel of the image, but also since we are dealing with a streaming video.

05:21.020 --> 05:28.130
This is obtained by constantly publishing images frames with high frequency inside the topic.

05:28.880 --> 05:35.360
In the following lessons of this section, we will use this tool to visualize our RDF model of the robot,

05:35.360 --> 05:42.020
and then along the course we will continue using it to visualize other messages that are still published,

05:42.020 --> 05:44.570
still available in some Ros topics.
