Data collection and logging to a file

Discussion in 'Programming' started by Supermuskox, Oct 31, 2018.

  1. Ahmed Ibrahim

    Ahmed Ibrahim
    Expand Collapse

    Joined:
    Jan 4, 2022
    Messages:
    1
    Hello all,

    I am new here, researching on BeamNG.drive in a university. I found this datalogger.lua file very useful for our initial task. However, I wanted to know a few more things in this regard.
    Firstly, how can I get to know the units of these parameters like speed, position, orientation, g values, etc.?
    Secondly, is there any document or file or any such thing through which I can determine which possible parameters are there to be extracted from the game engine? Because I want to log the data for speed, acceleration, rotation and several other inputs like steering wheel angle, pedal or clutch values of a simulator etc.

    Looking forward to any helpful leads.

    TiA.
     
  2. Alex19

    Alex19
    Expand Collapse

    Joined:
    Mar 24, 2022
    Messages:
    2

    Hello all,

    I followed the instruction and everything seemed fine...I have found the additional modification, started the datalogger and when i was finished I ended it.
    Unfortunately afterwards I was not able to find the csv File in the directory...
    Maybe i did something wrong...but I don't know what.

    Does anyone have an idea?

    Thanks in advance!!
     
    #22 Alex19, Mar 24, 2022
    Last edited: Mar 24, 2022
  3. Alex19

    Alex19
    Expand Collapse

    Joined:
    Mar 24, 2022
    Messages:
    2
    I have found it. No more help necessary.
     
  4. SimRacer077

    SimRacer077
    Expand Collapse

    Joined:
    Feb 22, 2023
    Messages:
    1
    Thank you all for this resource. Just like others on this forum, I am also using BeamNG to conduct research and this was the only place where I could find information on exporting telemetry data.

    I followed every step exactly as stated, changed the slotType to "etki" and spawned the ETK I Series but nothing happened. I re-downloaded the file multiple times, tinkered within the datalogger file, and everything else imaginable such as reverting back to an older version of BeamNG but no menu ever appeared. I am using version 0.27 (newest), if that matters.

    I would extremely appreciate if someone could provide me some help on how to get the menu in the vehicle configuration tab to appear...
    --- Post updated ---
    If you don't mind, can you tell me how you got the menu to even appear? I've been trying for days and nothing happened.
     
  5. MR.LIU

    MR.LIU
    Expand Collapse

    Joined:
    Mar 22, 2023
    Messages:
    2
    I'm also a student using BeamNG to study driver behaviors, were you successful in acquiring the steering angle, pedal and brakes data?
    if you were, I would really be thankful if you would share how it is done.

    Tia
     
  6. fillman86

    fillman86
    Expand Collapse

    Joined:
    Apr 18, 2020
    Messages:
    122
    I love this mod, and I've got it working, and I don't think it'll stop working unless there's a large shift in lua coding. I also doubt you'll ever not have it show up in the parts selector if you've done it right (meaning it's user error if you can't find it).

    the process is a little jank.
    1) open your mods folder, and in your unpacked folder (if it's not there, create it) unzip the contents into it (the mod was originally packed wrong).

    2) in the datalogging.jbeam file, change -
    "slotType": "etkss_mod",
    so "etkss" is whatever the vehicle zip file is called in "SteamLibrary\steamapps\common\BeamNG.drive\content\vehicles" keeping the "_mod" part.
    If you want to make it for automation cars, call it "Camso_Mod"

    if you want to use with with other mods, you'll usually open the zip folder, and take the name of the folder in the "vehicles" folder... your results may vary (depending on how they made the mod). If this doesn't work, then I suggest you learn how slots work, and how to add them to cars.

    3) ctrl+w and put the part in (should be called "additional mod")
    --it is now data logging--

    4) when you're finished, remove the part
    --it now stops data logging--

    5) the log file directory has now changed to - "C:\Users\[username here]\AppData\Local\BeamNG.drive\[beamng version string]" and the name of the file will be something like "datalog_20230322_195847.csv"

    I may make a video on this mod at some point. To the mod makers, do you mind if I modify it, and put it on the repository with credits for the creators (I believe is Arcanox and Supermuskox ? )

    on top of this, if you want to view it in google sheets, you first import it, select everything, and then insert>chart. With some fiddling, I was able to get something like this -

    upload_2023-3-23_15-11-16.png

    (you'll also note that I removed some logging stuff, and added steering angle, and multiplied throttle and brake by 100)(also this log was a 10 second or so test on grid map)
     
    • Like Like x 2
  7. MR.LIU

    MR.LIU
    Expand Collapse

    Joined:
    Mar 22, 2023
    Messages:
    2
    Plz add it to the repository, this will help my research a lot!! A tutorial video on how to use it would help greatly as well.
    Thanks for the work done and willing to share it with us
    Wish you have a nice day
     
  8. mrkelkel

    mrkelkel
    Expand Collapse

    Joined:
    Aug 18, 2013
    Messages:
    48
    I'm actually using this mod right now; combined it with my own FSAE car mod and it's working 100%. I'm planning to use it to log g-force data and speed, but the focus will be on logging suspension displacement data, which would be fed to a suspension test rig (for public demonstrations). Eventually we'll be moving on to getting suspension data in real time, and having the rig move accordingly (i hope :)). Having some difficulty identifying the data stream though (obj:getBeamLength(yourCid)) but that's neither here nor there.

    Anyways thanks to all of y'all who worked on this mod, with permission I'd like to include the logging code with my mod when it eventually comes out on the Repo, and of course credit will be given :)
     
  9. Lance_

    Lance_
    Expand Collapse

    Joined:
    Oct 17, 2023
    Messages:
    1
    Nevermind, :/
     
    #29 Lance_, Oct 17, 2023
    Last edited: Oct 17, 2023
  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