The third section of this course.
In this section, we are going to be dealing with real time things, meaning we are going to first interact
with the software that is visible and without any delay.
Let's get into it.
I am going to create a new launch file and name it to be gazebo dot launch start by its contents are
already copied.
So I would just paste it and I will explain.
What is it containing?
A lot of import libraries and these two are the previous launch Wild Things.
The new things are from this point to this point.
Oh, because he was basically just a software and gazebo and Ross needs to talk to each other with some
sort of API.
And Gazebo also provides a service that requires a call and it brings a robot from a USDA to a gazebos
into gazebo simulation.
These two things.
First, Gazebo needs to talk to ROS, which is very important for us.
It can automatically.
It can without the.
It can.
It can bring a robot into its simulation, but without any Ross interference, without any Ross communication
stuff.
And we don't we don't need to do that.
We don't need that.
So first thing is execute command.
Execute process.
This is basically straight away a command which can be written in a terminal and it is just executing.
If you write this command in the terminal, it is the same is equal minuses.
Live busy for us.
It's not calling any function or any node or any launch file.
It is just a simple command.
It is going to call this live legacy factory that will enable us to make visible and communicate with
each other.
Okay, then there is a next package which makes us able to spawn the robot invisible using rice stream
for cooking, and that requires the name of the robot and the fight.
Okay.
This file is automatically being provided by this bot that we give it to that you you.
If I think we did the same that yes, in our resort launch file we provided exact path to share package
share shareholder of the package to launch files for to these join state publishing and go forward state.
Similarly, we are going to provide that you are but in this you fold it to the spawn entity so it can
spawn the robot in gazebo.
And that's what the basic solution looks like, bringing the robot into gazebo right now let's perform.
The execution of I'll close all the gazebo servers available that we're already running across to our
before that we need to perform all can build a new gazebo that launched or firefly has been created
in the launch folder so it needs to be copied into the shared folder.
Rose to launch Baseboard Gazebo.
Launched by.
Let's take a look.
It is going to be a little funny.
It's sponsored and brings the robot in gazebo simulation.
And here we have our robot.
Whoa.
It is flying in the simulation, although was the simulation to take a look onto the robot.
What is the problem here?
I have a neighbor.
Inertia from this view drop down and we can see there are a lot of lines, but no inertia boxes being
represented.
Oh.
You know, Showbox is being applied on to these bodies.
Let's zoom out and.
Oh, my God.
You see, this is the size of the mesh and the inertia for this mesh is this much bigger.
And this is a huge problem.
They actually forces are applied on the road.
And for this reason, this robot is behaving in such a manner.
The base inertia box is very small.
The wheels and the caster inertia is huge.
We have to fix that.
And I'll show you the simplified form in which the robot does not floats in the air or acts weirdly.
So let me unpause the simulation and let's see what it looks like.
Okay.
It is spinning very fast.
If we disable inertia and see the robot and it is going away just like a ball.
Whoa.
And I have lost it all.
It is going so.
We have some serious problems in our.
You are fine.
We have to fix them.
Okay, let's get to the audio file.
And I have removed the bass frame.
Wow.
Let's start with the first link.
In inertial values.
There are some inertial values randomly given.
Let's not come to the initial value directly.
First, we will take a look into the collision properties which are again, very important.
Now collision properties.
Should be exactly the same as the visual geometric.
In visual geometry, we are providing a mesh and in collision we are providing a box.
So they are very different.
Now I am providing collision for visual and collision same geometries.
Okay, let's check the other things again.
Mesh is provided in visual and in collision.
This is provided.
I'm showing you this for only one reason so you can debug your idea.
ADF issues as well.
I've created many, many, many many you ideas but many of the time in initial stages I was not clear
why this is happening.
So first we will solve the collision issues, visual and collision tags.
Geometry should be same.
Let's take a look on its output as it affects the simulation or not.
Okay.
Logic.
And I think I should keep my mouth on the pause button.
And still we have some serious problems with our robot, if I can posit.
Whoa.
Okay, so are you are if is not ready right now.
So as we have seen, collision properties are safe.
Visual properties are safe, but our robot is not sick.
We need to fix the main thing that is inertial matrix.
And in the next video we are going to see how we are going to utilize MATLAB to solve this problem.