Open Interface?

Discussion in 'General Discussion' started by NismoR, Oct 9, 2019.

  1. NismoR

    NismoR
    Expand Collapse

    Joined:
    Oct 9, 2019
    Messages:
    2
    Hello!
    I'm working on my Master Thesis, and I'm trying to develop an ABS algorithm. To test this I need a simulator which has an open interface where I can apply brake torque on the wheels separately.
    Is the BeamNG's interface open enought for this, or I need modding? Can I get vehicle dynamics and car position data, accelerometer, gyroscope, etc out of the game?
    Thanks for your help,
    NismoR
     
  2. estama

    estama
    Expand Collapse
    Developer
    Staff Member

    Joined:
    Aug 7, 2012
    Messages:
    245
    We try to keep all of our interfaces open and accessible. The code for all the high level mechanisms is also open source (in Lua).

    You can find the source code (including our own ABS implementation) below the "lua/vehicle/" directory of your installation. Concerning the wheels you can get individual angular speeds, brake temperatures, etc. You can also set brake torques independently per wheel. Concerning the vehicle we provide accelerometer, gyroscope and lots of other data.
     
    • Like Like x 4
  3. Diamondback

    Diamondback
    Expand Collapse
    Moderator
    Staff Member

    Joined:
    Apr 8, 2014
    Messages:
    1,268
    Adding onto what estama said, replacing specifically the ABS logic is not 100% an expected usecase, but should be doable without much messing around. You could rather easily create your own lua module and use that to implement your own ABS logic. The current interface is called each physics frame (meaning at 2000hz) and expects a desired brake torque as the return value. Building more logic around that is doable and still quite clean.
     
    • Like Like x 1
  4. NismoR

    NismoR
    Expand Collapse

    Joined:
    Oct 9, 2019
    Messages:
    2
    Perfect, thank you for your answers.
     
  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