Experimental Controlling the vehicle through Ethernet messages

Discussion in 'Content Creation' started by NismoR, Feb 23, 2020.

  1. NismoR

    NismoR
    Expand Collapse

    Joined:
    Oct 9, 2019
    Messages:
    4
    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?
     
  2. torsion

    torsion
    Expand Collapse

    Joined:
    May 31, 2015
    Messages:
    1,600
    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. :p

    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)
     
  3. NismoR

    NismoR
    Expand Collapse

    Joined:
    Oct 9, 2019
    Messages:
    4
    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.
     
    • Like Like x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice