In this video we will briefly go over Ross message types, also known as interfaces.
In the last couple of lectures, we made a publisher and subscriber script which used the string message
type.
However, there will be a lot of instances where we want to use other message types to process data
in a more organized way other than string.
So let's head over to the Raw Materials page to see what messages and interfaces entail.
Now you can go ahead and read the background information, but the part I'm most interested in is section
2.1.
Here we can see how a message file in ROS is organized.
Essentially, it is just a basic type available in computer programming associated with a name for the
data.
Ros comes with so many default message types you will most likely want to take advantage of them.
So let's take a look at the standard Messages library, which we use last time to get our string message
type.
So here there are some brief explanations about the messages and the library itself.
And here you have the primitive types which we've been using, including the string.
Now, if I go ahead and right click on this and open it in a new tab, this takes us to the source file,
which, as you can see, is a basic type of string and an attribute name of data.
That's why in our code, when we wanted to utilize the message, we called message dot data to load
in our string Hello world message because that's the attribute name specified by these base message
types.
So here we see in the standard Messages Ross package, we have other basic primitives such as Boolean
floats and even some arrays of those basic types.
To use them, all we have to do is add it to what is imported in our Python script as such.
And then we could use it the same way we're using our string message type.
Let's take a look at another set of commonly used rasp messages use with robots called sensor messages.
So I'll go ahead and scroll down.
Here we see various message types use with common sensors.
You would put on a robot.
For starters, you probably want a camera on your robot so you can see what is going on here.
The image and compressed image message types would be useful as they efficiently send the image pixel
data over ROS.
If you have a GPS on your robot nav, stat fix would be of use as it displays latitude, longitude and
your variances if they are available.
There are also message types for laser scan.
If you have a single point light or point cloud.
If you have a 3D leader, I am.
You is of course good.
If you have an IMU giving you acceleration and orientation data of your robot to include it in our Python
scripts, we can simply call the sensor messages library and import any other messages you are interested
in that's mentioned in that list.
Can also list what message types are available in your current terminal environment by running the ROS
to interface list command.
Here we are given a long list which contains different message types from different packages.
It's organized into three sections messages.
Services and actions.
Messages are used by publishers and subscribers.
Service and action interface corresponds to utilizing that particular service or action.
Feel free to look through the different message types that are available.
But for now, let's review what we went over.
In this lecture, we talked about interface types.
We were able to look at different interfaces that are readily available to us by running the ROS to
interface list command.
We then took some time to look at some commonly used interfaces from the standard messages and sensor
messages.
ROS Packages centered messages.
The collection of primitive ROS data types similar to computer programming.
While sensory messages is a popular message library related to commonly used robot sensors.