External simulator using a game engine (Godot)

Some background: I have been using AgOpenGPS quite successfully on my tractors for a few months now. Earlier I have also made some experimental(ish) things with Godot game engine, one of them was kind of GNSS-based “autopilot” testing simulator for a ferry that was meant to be used as a testing simulator for a real thing (the project itself, however, soon kind of died, so the effort didn’t materialize in real life).

However, as AOG/AgIO use UDP-communication, the idea of implementing almost same kind of simulator for AOG kept nagging at me. Finally I decided to spend some days to try if the idea could be feasible and got it working somehow. Took a look at AIO’s teensy-code and pretty much copy-pasted and migrated to Godot’s GD script some UDP-related parts. So from AOG’s (or AgIO’s) perspective this simulates AIO-board (partly). Here’s a video about the simulator in action:

I couldn’t find any similar things (“external” simulators for AOG) anywhere. Does something like this exist already? There’s AOG’s internal simulator of course, but I’d say it serves a bit different purpose. And there was some discussion about using AOG with Farming Simulator (Farming Simulator 22 - #16 by heusken ).

Although this “external” simulator’s PoC-version only has very basic functionalities, it could potentially be expanded to include all kind of non-linearities, unfavorable conditions (like drifting) and such. For example it could be possible to model a front axle with all the links and sensor in the game(/physics) engine so that it could be simulated quite accurately if needed. Or it is be possible to add deliberate slowness to steering for testing or something. It might, however, be quite late for this kind of thing, as AOG already works quite well(?)

At this state this is really just a proof of concept. If going forward with this, the structure of the whole thing should be rethought, implements with sections should be implemented with painting and much more.

However, as some issues arose when recording the video (I didn’t cut them away or re-record those parts as they are actually quite interesting, whatever (this simulator or AOG) is causing those), this might be used to test some scenarios already as is. Unfortunately I wasn’t able to re-create the worse issue happening during the recording. And those issues are likely caused by this simulator as some message contents/timings and such may not be correct.

How people here think, is there be need for this kind of “external simulator”?

You can download the project from github: https://github.com/GNSS-Stylist/AgOpenGPSSimPoC (read the README.md for some instructions)
This needs Godot engine, V 4.1.1 (later ones will probably also work when available): Index of /godotengine/4.1.1/

8 Likes

Made a lot of improvements to this and added support for force feedback steering wheels. Video:

4 Likes