In this video, we're going to go over the C++ simulation and we'll look at how to use the simulation,
so we'll look at what happens when after you build it and then you start running it, what different
things you can do with it and how to use it to analyze your filters.
So once you've compiled and start running the simulation, this is what you'll be able to see.
And so this is the simulation environment that we're going to be using for this course here.
So first, let's actually have a look at what's shown on the interface.
Off the top here is the number is the profile number that we're currently running and information about
this profile.
So this is saying we're running motion profile one, which is a constant velocity with GPS, gyroscope
and zero initial conditions.
Next, we have the time and then the scaling factor in time so we can make the simulation run faster
or slower using these keys down here.
So we have our speed multiplier case.
So these two brackets here.
So as we run the simulation, we can make the simulation speed up or we can make the simulation slow
down based on the settings up here.
So changing the speed modifier, we also have a reset key.
So when we first will restart the simulation again, we compress space to pause the simulation.
And once this simulation gets to the end of simulation run, we can see the simulation automatically
stops.
So you can see it goes into the finished state here.
We also have the ability, when we're running the simulation to zoom in so we can use a plus and minus
case.
The same in zoom out to see the whole simulation field.
Now we can change what the simulation profile is running by the numbers case, I can see here we have
the motion profile case.
So this is the first profile.
Number one, we have multiple different profiles that we can run each by pressing the different number
and start up the different profile.
So we have profiles one through to nine, including zero.
On the screen at the top here and the top right, we have the vehicle state, so this is the current
state of this vehicle sharing here.
So we have the velocity it made as a second.
We have the heading of the vehicle in degrees.
We have the X and Y position.
The next section here is the field of state.
So this is what the current state estimates of the field are estimating, the vehicle state to be.
And of course, ideally, we want the field of state to the estimated state to be as close as possible
to the vehicle state up here.
Now, as the simulation runs, we calculate the error between these two states here and we accumulated
and this is the main square arrows down here.
So as you can see here, since the field is not running because we actually haven't written it, it
just starts off at a initial state set here.
So as we drive and move around, you can see that this error for the simulation is actually increasing.
So the X and Y position errors are increasing, the heading error is increasing as we're running.
And of course, the errors are increasing as we're running.
Moving back up to the top here, you can see these are the status of the sensors in the simulation.
So we have GPS sensor running at one hurt.
We have a leader sensor running at 10 hertz and we have the gyroscope sensor running at 10 hertz.
So we can see if we change it to profile one.
You can see that we don't have the law doesn't say so.
It's in the off state.
However, if we change your profile for you can see the water is running.
So let's have a look at what's actually shown on the screen here.
So obviously we have the current vehicle.
So this is the vehicle is this symbol here.
And the green cross is where the current vehicle location is, the history of the vehicle shown as is
a dark green line.
So as a vehicle moves around, it drops this line here to show you the history of the vehicle position.
Now, these white crosses here are the GPS measurements.
So as a vehicle run, you can say GPS measurements get generated and you can see the errors on the sensor.
There is some noise.
So they're generating these positions, but they're not exactly at the true vehicle position.
So these are the typical sensor measurements.
These are what we want to filter out and try to estimate this position of the state.
These triangles over here, these yellow triangles over here are the Leida landmarks, which we're going
to try to estimate.
So if we run with a profile that uses Leida, such as profile number five, you can see that the yellow
lines here are the light of measurements to each of the landmarks.
And if we look closely when we first run the simulation, this Red Cross here is the current estimated
state of the field.
So since the field is not running, it just stays at the origin or where we've initialized it.
So now let's switch over to one of the actual completed solutions.
So here's a simulation running with a completely filled up.
So now we can see that the common field of state is moving.
So we can see that the Red Cross is moving with time.
We can see the dark red line is the history of the filter.
And then this bright red circle here are Ellipse.
Here is the uncertainty bound.
So this is how how much uncertainty there is inside the estimates.
And ideally, we want our green cross to stay with inside the circle.
So I can say now when we have the filter working, you can see the field of state is getting estimated
and you can see that our main square errors are staying fairly small.
So you can see this is what a working example or the filter should look like.
We can also test it out when we have the lighter.
So this is a working light diversion as well.
So if using in the light of measurements, so now we can see we get some very small position and velocity
errors and you can see that our uncertainty is very small.
So it tracks the true vehicle state very well.
So this has just been a quick overview of the simulation environment and how we can actually use it
to analyze the different filters that you come up with.
So you would have seen that the simulation supports a number of different profiles that we can use to
test the filter out on the first full profiles, build up the basic maneuvers in different situations,
while the next four profiles are just copies of the original first four.
But we're adding the law d'ascenzo into them as well so we can test it out.
The final two profiles are for the capstone project, so the first profile just looks at a constant
speed and heading manoeuver with the zero initial conditions and using the GPS and jarra measurements.
The second profile is a bit more interesting.
We start at a non-zero initial condition, but again, we just have a constant speed and heading.
And again, this is with the GPS and gyro profiles.
Three and four get a bit more challenging.
Even though we start off at zero initial conditions, we're actually going to have one case.
It has changing things while it's driving and the other one has a changing speed and changing headings
while it's driving.
So the first for the basic scenario is that we can test out all the different types of filters on because
it can be represented as a linear or nonlinear problem.
The next four profiles, again, are the same profiles, but we turn on the light on measurements so
the Leida measurements can only be processed on a nonlinear filter.
So they are only relevant for the extended computer and unscented common filter.
Profiles nine and zero are going to be the two profiles that we use for the capstone project, so they're
basically a big combination of all the different conditions.
They're going to have nonzero initial conditions.
They can have changing speeds, changing headings.
It's going to use all senses.
But we're also going to add different errors onto the sensors.
So the GPS measurements might be faulty.
We might get of measurements out of 40.
We're going to have biases on the gyroscope.
So there's going to be a lot more things that you have to compensate for inside the filter, which is
more like typical Real-Life scenario situations, profile number zero.
It's just again, a copy of profile nine, except now there's a major change.
We don't have any Leida data association.
So in all the profiles before that use Leida, we have a bit of a cheat, though I don't know is what
Landmark is looking at in real life.
He might not actually know this information.
So you'll have to do some sort of optimization procedure to work out what Landmark is actually saying.
So this is the data association problem.
So Profile Zero has no true data association.
So you have to write an optimization procedure or some procedure yourself to work out what landmarked
Lawder is actually looking at before we actually do the filtering into the filter.
So last two profiles of all the capstone project and they're the most challenging.
You're going to have to think about the different solutions to the problem.
And it's a bit of a challenge to see what you can come up with.