Okay so in this post, I’m going to give the raw, unfiltered story about the car physics series of mine, expected to cover:

Block

Why I decided to do it in the first place

Okay so wind back to around end of February - end to Spring break, I decided on this simulation + autonomous vehicle direction very recently. About that time I was looking at various vehicle simulation / vehicle model because I haven’t felt confident enough to touch the heavy stacks like Autoware from Tier IV if I haven’t got familiar with such concepts, you will see this clearly at the beginning of the Model 1 post.

Also this semester, I have both a differential equations course and a design algorithm analysis course (DAA or some shit). And during that time I also happened to discover the Macro Monster reference, so I think to myself, oh what the hell, seems like stars are aligning.

Because I was thinking, this vehicle dynamics stuff definitely have to involve DEs, and then im pretty sure the path planning stuff can involve some DSA stuff too, it felt like the perfect project to take considering my direction.


Explain choices made in Model 7 very briefly

Discouragement from Model 6 onwards

To really get to the heart of this section, I have to confess something, I kinda lost interest in this roadmap starting from the 6th model (kinematic turning with longitudinal dynamics). Honestly that model already feel sufficient for urban driving already, which usually consist of stop-go traffic and low speed turning, because of that, I was already extremely discouraged since the 6th model, and I have written the first report for the DE course with the longitudinal model already (model 1 - 5, and that course require you to write 2 damn report can you believe ts).

But yeah after that, any model with higher fidelity felt really heavy to me, not to mention model 7 was really starting to fry my brain (Check model 7 post).


Choices made in Model 7 that sealed the roadmap

Yeah, my brain was frying from all these new stuff, so I used AI to help me understand it, and eventually, I finished the model, completed simulator 7, and finalized all 3 of my github repos dedicated for this series, however, the AI has also made some suggestion that I failed to foreseen that would make me more convinced to drop this specific series.

Originally in Model 8, I planned a full coupled tire model with friction circle, but most importantly: upgrade the integrator from Euler to RK4, and this is kinda the deathtrap here.

In model 7, the AI suggested using a sideslip-based state representation vector, so because of that, instead of deriving Sideslip Beta from a Cartesian system of velocity, Beta got its own ODE.

This is actually a really fascinating topic that I did not regret how I learned it here, specifically the differentiation between specific coordinates system in robotics, some might be more useful for calculation, while some might be more straightforward for the control module, I will definitely be looking deeper into this.

But anyway, thats the problem, I could not for the life of me debugged and refactor the codebase which has evolved from Model 1 to the sideslip based Model 7, to become the system that can naturally be upgraded to Model 8, or at least, I did not have the time nor the motivation to make it happen. the biggest issue lie in this state vector instability when using it with RK4, it seems RK4 prefers Cartesian based states. I’m gonna be real I’m not sure if thats the case or not, but the thing here is, the codebase is messy, I’ve lost interest in this specific roadmap, so if i wanted to work on model 8, it probably wont be from upgrading from simulator 7…


The pivot that happened in model 7

So yeah, because of the above, and the fact that, at its current state, im actually quite happy with simulator 7, I think it actually encapsulate the MM reference quite nicely, considering that model 8 wasnt even in the MM reference and was more of my own choice.

I think this hurdles is partly caused by me having to balance this project with all the deadlines of these fuckass courses too, I wanted to go deeper into my work, especially in this model 6-7 transition phase, if i had the time, i believe i could have tried to research it further, but honestly I dont know, in hindsight, in order to avoid this limitation i think i would have had to basically finish both model 7 and 8 at the same time.

But yeah, for the simulator 7, you can see in the repo that I’ve pivoted it to be much more “video game fun”, allowing Asphalt-like drifting and unrealistic physics at high speed, but I think its fun, and like I said, Im happy with it considering I was using frickin “car physics for games” as a reference lol.

Honestly, the Macro Monster reference wasn’t that easy to digest, but I think im happy with what I was able to learn from it.


Model 8 going forward

So, I did reworked the roadmap to end this series at model 7, but I actually have not yet intend to abanddon model 8, I’ve actually discovered this new reference:

https://escholarship.org/content/qt3xb8f3d3/qt3xb8f3d3.pdf?t=pdniw2

(Might need a VPN to access, I did need one, its a PDF)

Its like a doctoral thesis from UC Berkeley, skimming through it I found very detailed formulation of various vehicle models that resembles what I want for model 8 and are actually used in industries rather than the video game stuff, so I think if i were to really take this series to the end, Id use this.

This roadmap is done. I’m just not continuing Model 8 from this codebase.


But yeah anyway, really informal post I know, I kinda got a lot going on right now, I also plan to take the kinematic model i learned from this journey to make a project about automatic parking for that DAA course, but yeah, these courses still suck, this school still sucks, but ill try my best, I love doing these things, I just wish I had more time to go deeper into them.