Search This Blog

Tuesday, May 3, 2011

Just a quick screen shot

Now that the code is there, my list of things I could implement have grown considerably. But I must remain composed and professional.

The coding for waypoint selection is written, (i.e how to tell the computer, you missed that way point, but dont bother to go back and get it, just keep going down the track), but something is screwy with my matlab so I have spent the day trying to figure out something annoying.

Since my 'driver' is really dumb, he has a tenancy to just crank the steering wheel really hard to the left or right sometimes, because I haven't taught him that traction goes back down at some point. I 'could' cheat and just tell him to max out at some equation, but that would miss out on some realism down the road. If I want to model this such that I can gain from it, certain 'human factors' must be considered. So the 'feel' of when traction starts to decrease is a very important parameter to keep in-mind while developing this. So to make sure that the car I have put my 'dumb driver' in is actually behaving in the right way, I sifted through some data from some runs and found evidence that he is indeed putting the car into a HUGE 4-wheel slide (drift if you're a ricer). Though he is a little smarter than I anticipated. You can see some correction eventually, but I think that has to do more with the car was pointing the wrong way. Any ways. In the picture below, you see the "Velocity" graph, notice how the yellow line drops and the magenta line also 'drops'. The magenta line goes from near 0 to -40ft/sec. That is because the car has turned sideways about 30 degrees and now (from the car's point of view) the x velocity is about 20 and the y velocity is about 40 as well, which evens out to the total of 50 it was at before (these are vectors, you add them sqrt(x^2+y^2) = total). So by the time the kart has turned, it has slowed from about 48 down to a total of 44 ft/sec. Then you see the total velocity decrease towards 0 as the car skreeches to a near stop and the driver recovers.


So the model seems good so far... Once I get the matlab fixed, I should be able to input an actual track path. Then let the car drive it. Then it is time to teach the driver how to 'discover' the best possible driving line and speed.


No comments: