Hi! I'm developing an ABS system for my Master Thesis with BeamNG. I want to control the vehicle only by UDP messages (steering wheel angle, throttle and brake requests). I've managed to request throttle and brake data with overwriting the electrics.values.throttle and electrics.values.brake values, but overwritting electrics.values.steering or electrics.values.steering_input doesn't affect the vehicle at all. I can see in the console, that the values are set properly, but I don't think those variables what really controls the cars. Can somebody help me, how can I achieve this, which are the variables that I should modify?
The game has some built in interfaces for external control / gauges. Have you looked at the official smartphone controller app? Maybe a wireshark capture of that traffic would be helpful. I assume it uses UDP. On the face of it doing the control over UDP rather than locally seems a bit odd to me, but it's your thesis. dumpToFile("filename.json",electrics.values) or similar is very good. I'd dump "electrics" and "v" to separate files. also take a look at "ai.lua"... after looking there I tested this command in vehicle lua and it worked: Code: input.event("steering",720,1)
Hi torsion, sorry for the late reply. Thank you for your comment, with the help of it, I was able to control the vehicle from my simulink model. It really accelerates my research.