The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.31 (Linux)
|
Branch for driver-training project - Printable Version +- Forums (https://www.vdrift.net/Forum) +-- Forum: Project (https://www.vdrift.net/Forum/forumdisplay.php?fid=4) +--- Forum: Development (https://www.vdrift.net/Forum/forumdisplay.php?fid=9) +--- Thread: Branch for driver-training project (/showthread.php?tid=1354) |
Branch for driver-training project - thelusiv - 11-13-2010 It is probably time I posted something about what I'm working on in the driver-training branch. I am responsible for development in a research project which will use VDrift as a simulated driver training tool. The goal of the project is to use simulated driver training to augment real-world driver training. So far, I have developed a simple class to remember some text to display called DRIVERFEEDBACK, and a replacement for the CARTELEMETRY class, called DATALOG. DATALOG works by recording a specified set of variables the entire time the simulation is running. All the recorded data is available for query while the simulation continues running, and may be written to disk (so far, in gnuplot or csv format) when the simulation is ended. Data logging frequency may also be specified; currently it is set to 60 Hz. Currently, variables available for logging are:
The next step is to use the logged data to perform analyses upon the driver's behavior and present feedback to the driver accordingly. I'd really like to implement this as a standalone class; perhaps even as a set of classes derived from an abstract base class. I'm interested in getting feedback on all this. I hope that this code will benefit VDrift besides being useful for the project at hand. Thus, I'm trying to make my code as general as possible. Special thanks to Joe for his feedback and constructive criticism on DATALOG. - thelusiv - 12-02-2010 I have made a bunch of improvements to this branch lately and it is actually becoming useful. Some new classes have been written in datamanager.cpp/h. One is DATAMETRIC, the abstract base class for data-analysis objects, with accompanying factory class TYPEDMETRICFACTORY, and type registration class for the factory METRICTYPEREGISTER. DATAMETRIC-derived objects can put new columns of data back into the data log. The interface to GAME for the data log and metrics is DATAMANAGER. There is also a METRICEVENT class; the manager keeps a queue of metric events. There is only one class derived from DATAMETRIC so far, TESTDATAMETRIC (type "Test") in datametric_test.cpp/h. The log and metrics are configurable via a settings file in ~/.vdrift/data.config. I am not sure yet if I want to just make it part of VDrift.config... here is a sample data.config: Code: [datalog] I have tried to decouple all these classes from each other and GAME as much as possible. I've documented the classes fairly well (the include files are great but cpp files probably lack some). I haven't written much error checking yet, but lots of asserts, some of which I will convert to generate exceptions and disable things instead of just crashing. I have not written any testing code yet but I plan to. Next I will work on creating more classes derived from DATAMETRIC. I will also finish up the code to generate on-screen driver feedback and trigger other functions. - thelusiv - 12-02-2010 DATALOG: http://svn.vdrift.net/viewvc.cgi/branches/driver-training/include/datalog.h?view=markup&root=VDrift http://svn.vdrift.net/viewvc.cgi/branches/driver-training/src/datalog.cpp?view=markup&root=VDrift DATAMETRIC, DATAMANAGER: http://svn.vdrift.net/viewvc.cgi/branches/driver-training/include/datamanager.h?view=markup&root=VDrift http://svn.vdrift.net/viewvc.cgi/branches/driver-training/src/datamanager.cpp?view=markup&root=VDrift DATAMETRIC-derived class: http://svn.vdrift.net/viewvc.cgi/branches/driver-training/include/datametric_full_stop.h?view=markup&root=VDrift http://svn.vdrift.net/viewvc.cgi/branches/driver-training/src/datametric_full_stop.cpp?view=markup&root=VDrift DRIVERFEEDBACK: http://svn.vdrift.net/viewvc.cgi/branches/driver-training/include/driverfeedback.h?view=markup&root=VDrift http://svn.vdrift.net/viewvc.cgi/branches/driver-training/src/driverfeedback.cpp?view=markup&root=VDrift Generator script for DATAMETRIC-derived classes: http://svn.vdrift.net/viewvc.cgi/branches/driver-training/tools/scripts/datametric_generator/create_new_metric.py?view=markup&root=VDrift - thelusiv - 12-02-2010 Now there is a metric type called "FullStop" which waits for the driver to go over 60 MPH, then tells the driver to stop. When the car comes to a complete stop then the reaction time and stopping time are displayed. To enable it, just put this in your data.config: Code: [datalog] I also wrote a script to generate new DATAMETRIC-derived classes from a template. To use it, do something like this: Code: cd tools/scripts/datametric_generator |