• Home of the RD Le Mans Series by Vesaro
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Record diver input and position data

Discussion in 'Racer Physics and Technical' started by ls908, Dec 4, 2011.

  1. Hi,

    I am trying to find a way to record user data in Racer. With this I mean the user inputs (accelerator position, brake pedal position, steering angle,...) as well as the users car position (current track segment, exact track position, speed, de/acceleration, direction,...). Ideally I am trying to achieve something that outputs a text file (or anything else really) for every completed lap but any other output would be great as well.

    Is this possible in Racer or any other racing simulation for that matter?

    Thanks a lot in advance.
  2. Brilliant! Thanks a lot for the quick response. Thats exactly what I was looking for.
  3. Is it also possible to obtain similar data for the AI? I realise that an AI component is already included with the ai_line_delta variable but this obviously doesnt include the controls and steering of the AI opponents which I'd be interested in as well.

    Just to give you an idea for why I am asking all this: I am trying to develop a racing simulation training program that uses all sorts of variables (including heart rate, brain activity, user inputs, track position etc.), compares it to a benchmark (currently I am thinking about using AI drivers to have some consistency) in order to suggest tracks (which I will build from scratch) that could tackle problem areas. This is for a final year project in my electrical engineering university studies. Currently I am trying to find the best sim for this purpose which allows me to focus more on the actual algorithm rather than finding cumbersome ways of getting the data out of the sim. So far Racer seems to tick most boxes.
    • Like Like x 1
  4. You can set the player car to run in AI mode with shift+A, then if you run logging like that it should give you info on the AI.
    • Like Like x 1
  5. Cool project ls908 !
    Hope to see your results !

    Don't forget, you can use Matlab & Racer Simulink features to get a graphical representations of your variables...
  6. Hi All,

    Thanks a lot for all your help so far across the couple of threads I have created over the past months. I have encountered a small problem that I need to fix in order to progress.

    I need to obtain the track borders of the track I am racing on. Initially I thought I could reconstruct it using the yaw and the normalised track position based on two separate log files to obtain the real track width (as opposed to the normalised track width). However, I just realised that this is total garbage as the yaw of the car on the track has only very little to do with the track direction itself, so I am back to square one.

    Is there any other way I can obtain a good estimate for the track borders? Maybe through using Bob's Track Builder which I plan to use for building tracks?

    Another idea I had was using the default AI line. I notice that in Carlswood the AI line is pretty much dead on the centre of the track. Using the yaw here might prove to be more useful (although not perfect), especially on tracks where the track width is more or less uniform. How do I set up an AI line that does just that (stay on the centre of the track) for other tracks?

    Any alternative ideas would be very appreciated as well.

    Thanks a lot in advance.
  7. spline.ini contains track boundaries (that the AI uses) as a series of lines, if I remember right they're defined as the left and right side of the track, when driving a forward lap. The set of cp0 points would define one edge of the track and cp1 would define the other, anyway.
  8. Thanks a lot Stereo. That seems to solve the problem for now.

    I have written a few lines of c++ code (its not very well written, but does the job) that extract these points into a space delimited text file for each side of the track which can be imported straight into Matlab, in case anyone is interested.
  9. Without wanting to open a new thread: can anyone explain to me how I get Racer to run in Ubuntu through Wine?

    I have searched this forum and a few others but havent had any luck so far. I can only find how to install games that have an installer. So far I have copied my racer folder into the Program Files folder in my wine c drive. Now how do I get Wine to understand that this program is already installed/does not need to be installed? Launching racer.exe just yields a black screen.
  10. Hi All,

    I just have one short question about the logging telemetry function: are the variables steer, throttle and brake the "raw user inputs" (i.e. what the user is doing to the physical steering wheel he is using) or are they the signals that reach the car after processing such as ABS, TC etc. are included?

    I noticed a comment on the logging telemetry page about the throttle/brake inputs but wasnt quite sure whether that meant that ABS is included or is not included. Also there is no mention about it in the steering section.

    And, yes, I am still working on this project. Unfortunately it has become a lot less spectacular than planned, but if people are interested I'd be happy to share it once all relevant university deadlines pass (i.e. sometime in July).

    The code could be useful to someone who might want to create a telemetry program like the LFS Replay Analyzer. Should be quite easy to modify to achieve something similar. All the data is there, just needs a nice GUI to make use of it. Mine will be very basic and only contain the essentials. If I am motivated or sufficiently bored I might give it a go myself, given enough feedback/input/requirements/demand from the community.
  11. In case anyone is interested, this is what this project turned out to be in the end:

    What my program does is the following:

    The user trains on a base track (usually consisting of at least half a dozen different corner types etc.) and his fastest lap time is recorded (e.g. from a 15 minute session). The telemetry data from this lap is then compared to a benchmark lap.

    Then we use a timing analysis for very short track sectors (e.g. 100m) to identify where the user is losing most of the time. We then decompose the track into corners and straights based on the curvature of the track layout and from that, using the identified problem sectors, construct track segments which contain enough layout context to accurately depict the track segments with which the user is having difficulties.

    Based on these segments we then use a shape matching algorithm to identify tracks which contain a high concentration of these segments and suggest to the user to continue training on these in order to focus training on the problem segments. We derived some track suggestion metric which takes into account how much time you are losing in particular segments compared to the maximum time loss encountered as well as how highly concentrated the identified track segments appear in each track that is searched. This process is repeated to keep narrowing down the problem segments until the user reaches a track which consist only of one or two different corner types.

    Then the user returns to the base track and does another 15 minute training session in order to assess the training progress made.

    At each stage of the program the user is being shown telemetry data comparisons (e.g. plots of the racing line which show braking points, throttle on points, full throttle points, gear selection, rpm, speed etc.) in order to start understanding why he is losing time against the benchmark.

    Essentially the aim of this is to make use of the additional freedom offered by virtual simulators as opposed to real life race tracks. In real life, if you are struggling to get this one particular corner right, you will have to keep racing through the entire circuit before you get back to the problem corner. Even through segments that you are perfectly fine with. This is a bit of a waste of time and hence our approach tries to focus this type of training and attempts to allow you to concentrate on particular segments.

    Obviously our implementation is far from perfect but I think it is an interesting concept.

    Hope you all like it. Thanks again for all you assistance throughout. I have acknowledged this forum in my final report so please believe me when I say that I have truly appreciated the assistance I received on this board.
    • Like Like x 2