1
00:00:01,100 --> 00:00:06,680
In this video we will briefly go over Ross message types, also known as interfaces.

2
00:00:07,160 --> 00:00:13,280
In the last couple of lectures, we made a publisher and subscriber script which used the string message

3
00:00:13,280 --> 00:00:13,880
type.

4
00:00:14,060 --> 00:00:19,520
However, there will be a lot of instances where we want to use other message types to process data

5
00:00:19,520 --> 00:00:21,880
in a more organized way other than string.

6
00:00:21,890 --> 00:00:26,600
So let's head over to the Raw Materials page to see what messages and interfaces entail.

7
00:00:28,180 --> 00:00:32,710
Now you can go ahead and read the background information, but the part I'm most interested in is section

8
00:00:32,710 --> 00:00:33,880
2.1.

9
00:00:33,910 --> 00:00:37,360
Here we can see how a message file in ROS is organized.

10
00:00:37,390 --> 00:00:42,430
Essentially, it is just a basic type available in computer programming associated with a name for the

11
00:00:42,430 --> 00:00:43,030
data.

12
00:00:43,570 --> 00:00:48,130
Ros comes with so many default message types you will most likely want to take advantage of them.

13
00:00:48,130 --> 00:00:54,880
So let's take a look at the standard Messages library, which we use last time to get our string message

14
00:00:54,880 --> 00:00:55,360
type.

15
00:00:55,360 --> 00:00:59,950
So here there are some brief explanations about the messages and the library itself.

16
00:00:59,950 --> 00:01:05,090
And here you have the primitive types which we've been using, including the string.

17
00:01:05,110 --> 00:01:09,640
Now, if I go ahead and right click on this and open it in a new tab, this takes us to the source file,

18
00:01:09,640 --> 00:01:16,180
which, as you can see, is a basic type of string and an attribute name of data.

19
00:01:16,690 --> 00:01:22,630
That's why in our code, when we wanted to utilize the message, we called message dot data to load

20
00:01:22,630 --> 00:01:30,280
in our string Hello world message because that's the attribute name specified by these base message

21
00:01:30,280 --> 00:01:30,970
types.

22
00:01:32,560 --> 00:01:37,810
So here we see in the standard Messages Ross package, we have other basic primitives such as Boolean

23
00:01:37,810 --> 00:01:41,800
floats and even some arrays of those basic types.

24
00:01:41,830 --> 00:01:47,110
To use them, all we have to do is add it to what is imported in our Python script as such.

25
00:01:50,930 --> 00:01:54,660
And then we could use it the same way we're using our string message type.

26
00:01:54,680 --> 00:02:01,070
Let's take a look at another set of commonly used rasp messages use with robots called sensor messages.

27
00:02:01,640 --> 00:02:03,080
So I'll go ahead and scroll down.

28
00:02:05,840 --> 00:02:09,500
Here we see various message types use with common sensors.

29
00:02:09,500 --> 00:02:10,700
You would put on a robot.

30
00:02:11,030 --> 00:02:15,860
For starters, you probably want a camera on your robot so you can see what is going on here.

31
00:02:15,860 --> 00:02:21,050
The image and compressed image message types would be useful as they efficiently send the image pixel

32
00:02:21,050 --> 00:02:22,430
data over ROS.

33
00:02:22,580 --> 00:02:28,670
If you have a GPS on your robot nav, stat fix would be of use as it displays latitude, longitude and

34
00:02:28,670 --> 00:02:30,890
your variances if they are available.

35
00:02:31,400 --> 00:02:33,770
There are also message types for laser scan.

36
00:02:33,770 --> 00:02:35,840
If you have a single point light or point cloud.

37
00:02:35,840 --> 00:02:38,390
If you have a 3D leader, I am.

38
00:02:38,390 --> 00:02:39,230
You is of course good.

39
00:02:39,230 --> 00:02:45,080
If you have an IMU giving you acceleration and orientation data of your robot to include it in our Python

40
00:02:45,080 --> 00:02:50,450
scripts, we can simply call the sensor messages library and import any other messages you are interested

41
00:02:50,450 --> 00:02:52,190
in that's mentioned in that list.

42
00:02:54,080 --> 00:02:59,300
Can also list what message types are available in your current terminal environment by running the ROS

43
00:02:59,300 --> 00:03:01,070
to interface list command.

44
00:03:04,590 --> 00:03:09,250
Here we are given a long list which contains different message types from different packages.

45
00:03:09,270 --> 00:03:12,270
It's organized into three sections messages.

46
00:03:14,670 --> 00:03:17,700
Services and actions.

47
00:03:17,820 --> 00:03:20,640
Messages are used by publishers and subscribers.

48
00:03:20,820 --> 00:03:26,160
Service and action interface corresponds to utilizing that particular service or action.

49
00:03:26,400 --> 00:03:29,060
Feel free to look through the different message types that are available.

50
00:03:29,070 --> 00:03:31,770
But for now, let's review what we went over.

51
00:03:33,090 --> 00:03:36,060
In this lecture, we talked about interface types.

52
00:03:36,180 --> 00:03:40,950
We were able to look at different interfaces that are readily available to us by running the ROS to

53
00:03:40,950 --> 00:03:42,690
interface list command.

54
00:03:43,110 --> 00:03:47,730
We then took some time to look at some commonly used interfaces from the standard messages and sensor

55
00:03:47,730 --> 00:03:48,270
messages.

56
00:03:48,270 --> 00:03:50,460
ROS Packages centered messages.

57
00:03:50,460 --> 00:03:54,090
The collection of primitive ROS data types similar to computer programming.

58
00:03:54,090 --> 00:03:59,640
While sensory messages is a popular message library related to commonly used robot sensors.
