Another major problem that you'll encounter in the real world is the filter initialization or setting
the initial conditions of the filter, the quality of the initial conditions of the filter can have
a direct impact on how accurate the filter is and how robustly it can run.
The filter state must be initialized close to the truth.
And this is because we use approximations in all the different types of the common filter.
It also means that all the states inside of you don't need to be initialized as well.
Now the filter American parents must also be small.
This is so that it doesn't include the nonlinearities in the error range.
So even though the common filters, the extended and uncynical Matilda can work on non-linear systems,
we always want the estimated error to be small.
So we want the filter.
Eric invariance to be as small as possible so that when we do the transformations, we do not get too
much error in these uncertain transformations.
So the error averages need to be set to be approximately the true uncertainty size in the system.
And we want this to be as small as possible.
So we should not start the filter until we have a good estimate of the starting state and the amount
of error inside that starting state estimate.
This means we might need a initialization filter, a process to estimate the starting or initial emissions
if we can't make appropriate assumptions.
Now, a trade off of this process is that we need to wait until the filter has started and values have
converged before.
We can robustly use the output for different purposes such as control.
So if we try to estimate so far a self-driving car, we need to have a good estimate of the state of
the vehicle before we can actually start to use that state inside the control process.
If we don't have a good estimate of what the value is for control, we could actually make the filter
unstable and actually cause a car to drive out of control.
So following on with a 2D self-driving car example, we need to find the initial conditions for the
zwi position, for the velocity and the heading of the vehicle.
We can estimate the position directly from the GPS position measurement.
We could estimate the velocity by measuring how quickly sequential GPS samples are changing, such as
the position derivative.
However, this is only going to work if we are actually moving in the first place and moving fast enough
that the amount of noise inside the differentiation process is larger than the noise of the GPS.
However, this will not tell us the heading of the vehicle.
We won't know whether we're moving forwards or backwards or being stationary just by looking at the
GPS of lost information.
This is because it is given in the world frame.
It is not given relative to the body frame.
So we can't imply what the heading of the vehicle is going to be.
So for a 30 vehicle example, a better initialization process might be to first use the GPS position
measurements to initialize the X Y position states, we then filter the GPS position measurements to
estimate the X Y velocity or Travelocity.
We then can use the GPS position and a lot of measurements to know landmarks when available to estimate
the heading of the vehicle as well as the position information.
Again, if we want.
So now using all this information, we can combine the outputs of the three processes above to generate
the full instrumentation and then start the four common filter.
Using all the information above.
We get the X Y states, we get the velocity and we get the heading.
So this would be a better initialization process for a for the 2D vehicle example.
So to recap, all the states must be initialized close to the real truth.
So they even need to be measured or appropriate approximations need to be made of what the value would
be.
All the error variances should be as small as possible to avoid non-linear effects.
Now, this might require a special initialization process specifically written to initialize the filter
before I can actually start running it.