We will now look at the simulation framework that we're going to use for the extent to theater, and
this is just going to continue on building on the framework we use for any upcoming theater.
So in the extended coming theater, we're going to implement a 2D vehicle filter.
The problem is to estimate the position, velocity and orientation of a moving vehicle based on Leida
like measurements to know landmarks or features using GPS measurements and gyroscope measurements.
So this type of filter has many different applications.
It's used potentially in self-driving cars.
It's used in robotics, is used in navigation, in GPS denied areas.
It's a very common problem to try to navigate a vehicle based on the sensor measurements of these types.
So let's assume that the vehicle can travel at a constant speed in the 2D, X, Y plane in the direction
it is facing, let the inputs be the turn right or the vehicle from a gyroscope and assume that the
acceleration is a random variable.
This is going to be the precise model of the filter, and this is going to be similar to what we did
in the video coming through by assuming that the acceleration is random variable.
But now we're going to add the nonlinear system into it and we're going to input the JavaScript measurements
into it as well.
We will assume that we get position measurements of the vehicle location, such as a sensor, like a
GPS.
So this is going to be the first sensor model.
We also are going to use data fusion to fuse in a different sensor model.
We're going to assume that we get a number of range and relative bearing measurements to known landmark
locations.
And this is going to be a bit like a light sensor.
So this is going to be the second sensor model that we're going to implement and fuse into the extent
to come and filter.
So breaking it down, we're going to have the dynamics of the vehicle looking at this, we're going
to represent the vehicle position in X and Y coordinates so we can have a Y, we're going to have the
velocity of the vehicle traveling in the direction it's facing.
So we're going to have Vocativ and it's going to be facing with a heading angle.
Now we're going to assume that we get PSI measurements.
So they're heading right measurements from a gyroscope.
But we're going to assume that the acceleration right out of right is going to be sampled from a normal
distribution with a certain uncertainty.
So this is going to be the random variable for the acceleration.
So this is going to be very similar to what we did in the linear theater.
Now, for the first since the measurement, we're going to get GPS measurements.
So they're basically just going to be pure measurements of the position of the vehicle.
So they're going to give us pay X and pay Y with some noise.
As a vehicle travels in this direction here, we're going to get these measurements of the vehicle's
position from the GPS sensor as the valves.
We also going to fuse in our light our sensor measurements to basically what the light gives us is a
range and bearing information to know landmarks.
So these dots here, these processes are going to be landmarks inside the environment and they're going
to be at known positions.
So we can have like a landmark here, landmark here, here and here.
Now, when the landmarks in Orange Range, the leader is going to measure them and it's going to give
us the range to Landmark from the vehicle.
It is also going to give us the relative bearing of the landmark from the vehicle.
So these are very angles.
They are going to be the difference between the angle that the vehicle is facing this direction here
and where the landmark is located.
So as the vehicle turns, we're going to get different relative bearing measurements.
So these are going to be the dynamics and measurements of we want the non-linear mattilda using the
extended of diffusion.
Now, when we start to look at the simulation code again, what we want to do is we want to investigate
these two functions here so we have the common filter to have an answer and current field IQF student.
So we want to do is to rename this fall here the one that's highlighted the common field of Akef, underscore
a student.
We want to rename that to Common Filter.
Once we do that, then we can build the simulation and then we can go through the different exercises
building in the changes to this file here.
If you want to know what the full, complete simulation should look like, once you finish, you can
do the same thing with the common thread.
Underscore NKF, underscore ANSYS.
If you rename Miss Tucumán to build the application, then you should be able to see what the complete
simulation looks like before the exercises that we're going to complete for the external filter.
We first want to start with this file here.
So I want to rename this to Come and Filter and then we're going to make all your changes into this
common filter code here.
So now let's have a look at the end result of the simulation, so this is going to be running the common
thread and so far so we're going to look at what you're going to try to build up towards.
So now that we're using the normal and you feel the excitement coming forward, we can include a nonlinear
process model and this allows us to use the gyroscope measurements as part of the process model.
So when we run the simulation, we've profiled number three.
We can include this gyroscope information, which gives us information about the right of the vehicle.
So now that you can see that as we turn when the vehicle turns, it can be filled up at the state a
lot quicker.
So you can see that now we get more uncertainty in the direction that's traveling because we're using
a random acceleration, but we can turn a lot better so we no longer have the filter blowing out large
areas.
And as we're doing the turn because we're using the JavaScript to update the heading of the vehicle.
So this is one of the advantages of using a gyroscope, which means that we can get a lot more turning
precision.
We can also include the measurements.
So when we run the same thing with the lighter enabled, we can see that the filter is detecting these
light landmarks and then the yellow lines are the current measurement.
So when we include this information inside the field, you can see that our uncertainty ellipse is a
lot smaller.
So we get a lot higher precision data because we're using these lighter measurements compared to as
if we're just using the GPS measurements, which are the white crosses.
So I can say that including this information allows us to get a higher precision result.
So by the end of this exercise, you should be able to write the external Campbellfield to perform these
two functions.
It should be able to fuse the gyroscope in a non-linear model and use the GPS and other measurement
models to come up with this even better model of how we can represent the state of the vehicle.