Driving mode was created previously Nordstrom to get ahead of it and start working with the theory that
we have just taken.
And that is our go to go, right?
I have created a download here go to Google Dot fight.
And so one of the most important step is to add that in do not go to go into setup by file of the package
and that has been already done.
So basic stuff is ready.
My simulation is running, robot is in the simulation.
I just need to write the code to write the go to world behavior.
What I am going to do is do utilize this driving, no dirt bike and I'm going to edit it to our needs
so we can get started with the development of go to work.
Okay.
One common thing between driving load and go to goal is going to be the command velocity.
It is going to be publishing command velocity.
I will need to add a lot of things like the publisher, the subscribers that are going to be required
here.
Okay.
So minimum publisher is not going to be the name of this specific node.
It is going to be robot go to Google.
That is going to be the name of the class that we are going to be dealing with.
And it is not going to be with the minimum publisher.
It is going to be GDG Node and here we are.
No, it's not a velocity publisher.
It is going to be
goal movement, node and gold movement load.
Basically able to load coming to the point that velocity publishing is going to be on the same topic.
Yes, it is going to be.
And we need this time.
Lord, I know we are doing its timer callback.
It is going to be the time we call back or let's see what it is going to be.
It is publishing and a timer call back has been said.
Okay, fine, let's create a subscriber for that.
Let's just go to the Google.
And I have already opened up Ros Vicky to show you how you can get the code of published subscriber.
I am say published again and again coming to the subscriber in this specific thing, the specific project
we are requiring multiple publishers and subscribers to do common one is the first we want to send the
velocity.
The second one we want to send.
We want to get the powers of the robot.
For that we are going to create this subscriber ID start renaming things to our requirements.
It is not going to be a string.
It is going to be a pause and the topic is going to be pause or dawn.
How do I do that?
Let me open up my terminal and the ROS two topic list is going to tell us everything about what we are
requiring.
So it is going to be in order and if I get information about it, Ros to topic I can Ros to interface.
Sure.
Or that is from navigation stack, I guess navigation messages and then navigation messages.
And if I double press tab or dormitory.
Yes, I think that is the message.
But how do how do I know that Ros to topic info or dome is going to reveal that information?
To me it is utilization, navigation, messages, message or imagery.
If I go here, there are some things posted.
I will look into it later.
But first, let's define certain things.
Geometric message and from navigation message message dot message import or give me tree and sorry it
is not going to pause.
It is going to be the tree from the ordering topic.
And I'm going to say Bose call back
and that suits very well for this specific problem.
We have a publisher, we have a subscribe, but I don't want it to be named as a publisher and a subscriber.
I would say that it is going to be a velocity publisher.
Rename it I'm for the subscription.
Okay, that is dangerous because it is going to be here as well.
I'm just going to say pause some.
Okay.
Makes sense.
I'm just writing in front of you to make you comfortable with discord as well so you can write it in
this manner.
Publisher and a subscriber.
Now we need to do.
Now what we need to do is to understand how we can deal with the data of our subscriber.
Okay.
We currently are not using any timer.
We can create a timer as a
last name and go to goal function.
And that function is going to be defined here, defined go to go function and I'm going to just say
is equal to one for now.
Not that doing nothing there.
So whenever I get the pause, I'm going to come back to this specific piece to say I'm going to come
back at the pause callback whenever the pause is received.
So for that, I need to understand the data that it is receiving.
And when it is receiving a data, we need to assign that data to something that we can perform to processing
the variables.
If we take a look, it says there is a child ready frame.
This gives us information, but I think more accurate information can be obtained like this and more
understandable data can be understood, can be ROS, can be visualized visually.
We can see it when we echo the topic.
Okay.
Just stopping it, putting it on full screen.
This is one single message headed till the next header.
From this point.
At this point.
Okay, headdress.
10 seconds.
We have pause.
Indeed, there is a pause and it is a position.
And then there is an X pause.
Pause position.
Okay, let's write it down.
So the robot pause in x is equal to data.
Pause dot pause dot position dot x.
Is that correct.
Data full message.
Pause that pause the position.
Yes, that's correct.
For Y as well.
We are going to require y, robot pause, y and Z is going to be what we will be using.
It is going to be the intention.
The Z.
Okay, seems good.
You don't need to publish the velocity here.
You are going to be publishing velocity and it will be required here.
Okay.
For now, just get out of the quote.
These are the data that we are receiving.
What is our script working correctly?
We need to check it.
So I'm going to use ROS logging functionality.
That is really amazing.
When we are developing first we define a message and then we put this message in do set of don't get
longer.
They have already given me the option.
I get longer I think in full.
I think yes, that is the syntax text, whatever it is not we can get it from the wiki.
Where was the wiki.
Do I have the log it hit get longer info.
Yes I have, I have written correctly.
You know what is the message here.
Message is going to be first I'm going to say X and then I'm going to say Y and then I'm going to say
Z off the date of Z of x, y, z of my robot.
And when I say that Z X, it is going to be I'm defining a placeholder with the float value of three,
meaning I think after the decimal there are going to be three values, up to three decimal points for
all of them.
And then I had a write format and I will be giving the values the rule board pause x call my robot for
y call my robot.
It is giving me the values by itself.
I think the code is ready for just starting.
I am going to bring in my domain.
Then let me squeeze it down and I'm going to say going to my repository part planning perform can build.
Build the package because I've written this new go to work load.
It took 6 seconds for care rice to run me bought.
Is it sourced?
No installed setup nor do sourced rice to run mes board.
And the name of the node is go to toward.
Let's run it and bring our simulation side by side.
Only one argument was given.
There is some sort of a syntax error.
Go to google function.
Take zero positional argument but one was given.
Where did I?
I think it requires the set of function, not sourcing.
We need the collagen building and let's bring the simulation and dominant as well to see what the values
that we are getting are correct or not.
And under load.
Where is the line.
Yes.
Hit it is lost to run me port.
Okay.
In X is 0.2 -0.7 and some angular side as well.
So let me change.
The orientation of the robot is complete pause and we'll see that if the rotation part is working or
not.
Okay, let me rotate the robot now.
The values have changed to 0.9 and if I change it to another side, 0.9 and as again change, okay,
if I put this robot here, x and Y are not going to change X and y values have not changed a lot.
If I put on the negative side of y, I think it was negative side of the x and the values have shifted.
What I was testing here that are basic good we are just logging the basic go to goal is to some extent
ready.
We need to add the equations and then we'll move forward.