The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "lockoutexpiry" - Line: 94 - File: global.php PHP 8.1.31 (Linux)
|
Tracking speed/acceleration statistics - 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: Tracking speed/acceleration statistics (/showthread.php?tid=1110) |
Tracking speed/acceleration statistics - harurenu - 04-15-2009 Good day. I am a computer engineering student, interested in using VDrift as a component in my group capstone project. We are assisting Kentucky Air Education in developing a driving simulator that reports pollutants/etc. outputted by the driver depending on the car. What I am looking for is some information on tracking speed/acceleration statistics for a session. What I am thinking is I can put some custom hooks in the code where the numbers are generated for the odometer to log this information - that is of course if it doesn't already exist. If someone could point me to the area of the source code that populates the odometer, that would be super. Thanks in advance. ~Harlen Compton -University of Louisville -J.B. Speed School of Engineering - joevenzon - 04-16-2009 In include/cardynamics.h there is a CARTELEMETRY class that is designed for this sort of thing, although you may need to extend it a bit to do exactly what you want as the current implementation is pretty basic. To enable telemetry you need to comment in SetupTelemetry() in CARDYNAMICS::SetInitialConditions(). Then, in CARDYNAMICS::SetupTelemetry(), add the parameters that you want to write to a file (the existing code there should give you an idea of what it should look like). The data will be written to some output files that are intended for use with GNUPLOT. The car's speed and acceleration are kept track of in CARDYNAMICS member variable body -- see rigidbody.h, which has accessors for velocity and position. The only caution about the current way the telemetry class is set up is that it expects a pointer to a memory location to watch, so don't give it locations of temporary stack variables. - ntsourak - 05-08-2009 Hi! I added this code fragment in the SetupTelemetry method: std:tringstream str; telemetry.push_back(CARTELEMETRY <T> ("car")); telemetry.back().AddVariable(&(body.GetVelocity()[0]), "velocity x"); telemetry.back().AddVariable(&(body.GetVelocity()[1]), "velocity y"); telemetry.back().AddVariable(&(body.GetVelocity()[2]), "velocity z"); but in the output .dat file i always get the same value for each one of them. Is it certain that the SetVelocity method in rigidbody.h is called somewhere? Finally is there a documentation of all the different measurements as from the names in the code it's not easy to understand their utility. Thanks a lot for your excellent piece of work Nikos - joevenzon - 05-09-2009 The telemetry stuff is pretty simple; it takes a pointer to a variable and then writes the pointed to data every frame. The velocity that's returned from body.GetVelocity() is a temporary value not a reference, so storing a pointer to it doesn't work. This is a problem with the telemetry design. The telemetry class should be rewritten so that it gets a value for each variable every frame. Unfortunately there's no documentation of the different measurements. If you can't figure them out from the function names let me know and I can decode them for you. - ntsourak - 05-11-2009 I am interested in these variables: telemetry.back().AddVariable(&(suspension[WHEEL_POSITION(i)].GetDisplacement()), str.str()+"-displacement"); telemetry.back().AddVariable(&(suspension[WHEEL_POSITION(i)].GetLastDisplacement()), str.str()+"-last-displacement"); telemetry.back().AddVariable(&(suspension[WHEEL_POSITION(i)].GetVelocity()), str.str()+"-velocity"); What are exactly? Is it possible to get car's speed out of these? Is it possible to have the steering wheel angle and the car lane possition? Thanks again! - joevenzon - 05-12-2009 In R2445 I rewrote the telemetry system so it takes values every frame in the UpdateTelemetry() function. Uncomment UpdateTelemetry() at the end of CARDYNAMICS::Tick in include/cardynamics.h to enable it. You'll see it outputs telemetry plots with the x, y, and z velocity plus the magnitude of the velocity (the speed). Does that work better for you? - ntsourak - 05-13-2009 I did a checkout and ran scons, This is the error log Checking for C++ header file GL/gl.h... (cached) yes Checking for C++ header file GL/glu.h... (cached) yes Checking for C++ header file SDL/SDL.h... (cached) yes Checking for C++ header file SDL/SDL_image.h... (cached) yes Checking for C++ header file SDL/SDL_net.h... (cached) yes Checking for C++ header file SDL/SDL_rotozoom.h... (cached) yes Checking for C++ header file vorbis/vorbisfile.h... (cached) yes Checking for C++ header file GL/glew.h... (cached) yes scons: done reading SConscript files. scons: Building targets ... g++ -o build/boost/system/error_code.o -c -Wall -Wextra -Wno-unused-parameter -pthread -g3 -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -Isrc/bullet -I/usr/include/SDL src/boost/system/error_code.cpp src/boost/system/error_code.cpp:12:44: error: boost/config/warning_disable.hpp: No such file or directory In file included from src/boost/system/error_code.cpp:18: include/boost/system/config.hpp:13:28: error: boost/config.hpp: No such file or directory In file included from src/boost/system/error_code.cpp:19: include/boost/system/error_code.hpp:15:29: error: boost/cstdint.hpp: No such file or directory include/boost/system/error_code.hpp:16:28: error: boost/assert.hpp: No such file or directory include/boost/system/error_code.hpp:17:31: error: boost/operators.hpp: No such file or directory include/boost/system/error_code.hpp:18:33: error: boost/noncopyable.hpp: No such file or directory include/boost/system/error_code.hpp:19:39: error: boost/utility/enable_if.hpp: No such file or directory include/boost/system/error_code.hpp:26:29: error: boost/cerrno.hpp: No such file or directory include/boost/system/error_code.hpp:32:68: error: boost/config/abi_prefix.hpp: No such file or directory include/boost/system/error_code.hpp:493:70: error: boost/config/abi_suffix.hpp: No such file or directory In file included from src/boost/system/error_code.cpp:19: include/boost/system/error_code.hpp:57: error: âEAFNOSUPPORTâ was not declared in this scope include/boost/system/error_code.hpp:58: error: âEADDRINUSEâ was not declared in this scope include/boost/system/error_code.hpp:59: error: âEADDRNOTAVAILâ was not declared in this scope include/boost/system/error_code.hpp:60: error: âEISCONNâ was not declared in this scope include/boost/system/error_code.hpp:61: error: âE2BIGâ was not declared in this scope include/boost/system/error_code.hpp:62: error: âEDOMâ was not declared in this scope include/boost/system/error_code.hpp:63: error: âEFAULTâ was not declared in this scope include/boost/system/error_code.hpp:64: error: âEBADFâ was not declared in this scope include/boost/system/error_code.hpp:65: error: âEBADMSGâ was not declared in this scope include/boost/system/error_code.hpp:66: error: âEPIPEâ was not declared in this scope include/boost/system/error_code.hpp:67: error: âECONNABORTEDâ was not declared in this scope include/boost/system/error_code.hpp:68: error: âEALREADYâ was not declared in this scope include/boost/system/error_code.hpp:69: error: âECONNREFUSEDâ was not declared in this scope include/boost/system/error_code.hpp:70: error: âECONNRESETâ was not declared in this scope include/boost/system/error_code.hpp:71: error: âEXDEVâ was not declared in this scope include/boost/system/error_code.hpp:72: error: âEDESTADDRREQâ was not declared in this scope include/boost/system/error_code.hpp:73: error: âEBUSYâ was not declared in this scope include/boost/system/error_code.hpp:74: error: âENOTEMPTYâ was not declared in this scope include/boost/system/error_code.hpp:75: error: âENOEXECâ was not declared in this scope include/boost/system/error_code.hpp:76: error: âEEXISTâ was not declared in this scope include/boost/system/error_code.hpp:77: error: âEFBIGâ was not declared in this scope include/boost/system/error_code.hpp:78: error: âENAMETOOLONGâ was not declared in this scope include/boost/system/error_code.hpp:79: error: âENOSYSâ was not declared in this scope include/boost/system/error_code.hpp:80: error: âEHOSTUNREACHâ was not declared in this scope include/boost/system/error_code.hpp:81: error: âEIDRMâ was not declared in this scope include/boost/system/error_code.hpp:82: error: âEILSEQâ was not declared in this scope include/boost/system/error_code.hpp:83: error: âENOTTYâ was not declared in this scope include/boost/system/error_code.hpp:84: error: âEINTRâ was not declared in this scope include/boost/system/error_code.hpp:85: error: âEINVALâ was not declared in this scope include/boost/system/error_code.hpp:86: error: âESPIPEâ was not declared in this scope include/boost/system/error_code.hpp:87: error: âEIOâ was not declared in this scope include/boost/system/error_code.hpp:88: error: âEISDIRâ was not declared in this scope include/boost/system/error_code.hpp:89: error: âEMSGSIZEâ was not declared in this scope include/boost/system/error_code.hpp:90: error: âENETDOWNâ was not declared in this scope include/boost/system/error_code.hpp:91: error: âENETRESETâ was not declared in this scope include/boost/system/error_code.hpp:92: error: âENETUNREACHâ was not declared in this scope include/boost/system/error_code.hpp:93: error: âENOBUFSâ was not declared in this scope include/boost/system/error_code.hpp:94: error: âECHILDâ was not declared in this scope include/boost/system/error_code.hpp:95: error: âENOLINKâ was not declared in this scope include/boost/system/error_code.hpp:96: error: âENOLCKâ was not declared in this scope include/boost/system/error_code.hpp:97: error: âENODATAâ was not declared in this scope include/boost/system/error_code.hpp:98: error: âENOMSGâ was not declared in this scope include/boost/system/error_code.hpp:99: error: âENOPROTOOPTâ was not declared in this scope include/boost/system/error_code.hpp:100: error: âENOSPCâ was not declared in this scope include/boost/system/error_code.hpp:101: error: âENOSRâ was not declared in this scope include/boost/system/error_code.hpp:102: error: âENXIOâ was not declared in this scope include/boost/system/error_code.hpp:103: error: âENODEVâ was not declared in this scope include/boost/system/error_code.hpp:104: error: âENOENTâ was not declared in this scope include/boost/system/error_code.hpp:105: error: âESRCHâ was not declared in this scope include/boost/system/error_code.hpp:106: error: âENOTDIRâ was not declared in this scope include/boost/system/error_code.hpp:107: error: âENOTSOCKâ was not declared in this scope include/boost/system/error_code.hpp:108: error: âENOSTRâ was not declared in this scope include/boost/system/error_code.hpp:109: error: âENOTCONNâ was not declared in this scope include/boost/system/error_code.hpp:110: error: âENOMEMâ was not declared in this scope include/boost/system/error_code.hpp:111: error: âENOTSUPâ was not declared in this scope include/boost/system/error_code.hpp:112: error: âECANCELEDâ was not declared in this scope include/boost/system/error_code.hpp:113: error: âEINPROGRESSâ was not declared in this scope include/boost/system/error_code.hpp:114: error: âEPERMâ was not declared in this scope include/boost/system/error_code.hpp:115: error: âEOPNOTSUPPâ was not declared in this scope include/boost/system/error_code.hpp:116: error: âEWOULDBLOCKâ was not declared in this scope include/boost/system/error_code.hpp:117: error: âEOWNERDEADâ was not declared in this scope include/boost/system/error_code.hpp:118: error: âEACCESâ was not declared in this scope include/boost/system/error_code.hpp:119: error: âEPROTOâ was not declared in this scope include/boost/system/error_code.hpp:120: error: âEPROTONOSUPPORTâ was not declared in this scope include/boost/system/error_code.hpp:121: error: âEROFSâ was not declared in this scope include/boost/system/error_code.hpp:122: error: âEDEADLKâ was not declared in this scope include/boost/system/error_code.hpp:123: error: âEAGAINâ was not declared in this scope include/boost/system/error_code.hpp:124: error: âERANGEâ was not declared in this scope include/boost/system/error_code.hpp:125: error: âENOTRECOVERABLEâ was not declared in this scope include/boost/system/error_code.hpp:126: error: âETIMEâ was not declared in this scope include/boost/system/error_code.hpp:127: error: âETXTBSYâ was not declared in this scope include/boost/system/error_code.hpp:128: error: âETIMEDOUTâ was not declared in this scope include/boost/system/error_code.hpp:129: error: âENFILEâ was not declared in this scope include/boost/system/error_code.hpp:130: error: âEMFILEâ was not declared in this scope include/boost/system/error_code.hpp:131: error: âEMLINKâ was not declared in this scope include/boost/system/error_code.hpp:132: error: âELOOPâ was not declared in this scope include/boost/system/error_code.hpp:133: error: âEOVERFLOWâ was not declared in this scope include/boost/system/error_code.hpp:134: error: âEPROTOTYPEâ was not declared in this scope include/boost/system/error_code.hpp:183: error: expected class-name before â{â token include/boost/system/error_code.hpp:230: error: âenable_ifâ in namespace âboostâ does not name a type include/boost/system/error_code.hpp:230: error: expected â,â or â...â before â<â token include/boost/system/error_code.hpp:244: error: âenable_ifâ in namespace âboostâ does not name a type include/boost/system/error_code.hpp:244: error: expected unqualified-id before â<â token include/boost/system/error_code.hpp:317: error: âenable_ifâ in namespace âboostâ does not name a type include/boost/system/error_code.hpp:317: error: expected â,â or â...â before â<â token include/boost/system/error_code.hpp:330: error: âenable_ifâ in namespace âboostâ does not name a type include/boost/system/error_code.hpp:330: error: expected unqualified-id before â<â token src/boost/system/error_code.cpp: In member function âvirtual boost:ystem::error_condition<unnamed>:ystem_error_category::default_error_condition(int) constâ: src/boost/system/error_code.cpp:164: error: âE2BIGâ was not declared in this scope src/boost/system/error_code.cpp:165: error: âEACCESâ was not declared in this scope src/boost/system/error_code.cpp:166: error: âEADDRINUSEâ was not declared in this scope src/boost/system/error_code.cpp:167: error: âEADDRNOTAVAILâ was not declared in this scope src/boost/system/error_code.cpp:168: error: âEAFNOSUPPORTâ was not declared in this scope src/boost/system/error_code.cpp:169: error: âEAGAINâ was not declared in this scope src/boost/system/error_code.cpp:173: error: âEBADFâ was not declared in this scope src/boost/system/error_code.cpp:174: error: âEBADMSGâ was not declared in this scope src/boost/system/error_code.cpp:175: error: âEBUSYâ was not declared in this scope src/boost/system/error_code.cpp:176: error: âECANCELEDâ was not declared in this scope src/boost/system/error_code.cpp:177: error: âECHILDâ was not declared in this scope src/boost/system/error_code.cpp:178: error: âECONNABORTEDâ was not declared in this scope src/boost/system/error_code.cpp:179: error: âECONNREFUSEDâ was not declared in this scope src/boost/system/error_code.cpp:180: error: âECONNRESETâ was not declared in this scope src/boost/system/error_code.cpp:181: error: âEDEADLKâ was not declared in this scope src/boost/system/error_code.cpp:182: error: âEDESTADDRREQâ was not declared in this scope src/boost/system/error_code.cpp:183: error: âEDOMâ was not declared in this scope src/boost/system/error_code.cpp:184: error: âEEXISTâ was not declared in this scope src/boost/system/error_code.cpp:185: error: âEFAULTâ was not declared in this scope src/boost/system/error_code.cpp:186: error: âEFBIGâ was not declared in this scope src/boost/system/error_code.cpp:187: error: âEHOSTUNREACHâ was not declared in this scope src/boost/system/error_code.cpp:188: error: âEIDRMâ was not declared in this scope src/boost/system/error_code.cpp:189: error: âEILSEQâ was not declared in this scope src/boost/system/error_code.cpp:190: error: âEINPROGRESSâ was not declared in this scope src/boost/system/error_code.cpp:191: error: âEINTRâ was not declared in this scope src/boost/system/error_code.cpp:192: error: âEINVALâ was not declared in this scope src/boost/system/error_code.cpp:193: error: âEIOâ was not declared in this scope src/boost/system/error_code.cpp:194: error: âEISCONNâ was not declared in this scope src/boost/system/error_code.cpp:195: error: âEISDIRâ was not declared in this scope src/boost/system/error_code.cpp:196: error: âELOOPâ was not declared in this scope src/boost/system/error_code.cpp:197: error: âEMFILEâ was not declared in this scope src/boost/system/error_code.cpp:198: error: âEMLINKâ was not declared in this scope src/boost/system/error_code.cpp:199: error: âEMSGSIZEâ was not declared in this scope src/boost/system/error_code.cpp:200: error: âENAMETOOLONGâ was not declared in this scope src/boost/system/error_code.cpp:201: error: âENETDOWNâ was not declared in this scope src/boost/system/error_code.cpp:202: error: âENETRESETâ was not declared in this scope src/boost/system/error_code.cpp:203: error: âENETUNREACHâ was not declared in this scope src/boost/system/error_code.cpp:204: error: âENFILEâ was not declared in this scope src/boost/system/error_code.cpp:205: error: âENOBUFSâ was not declared in this scope src/boost/system/error_code.cpp:206: error: âENODATAâ was not declared in this scope src/boost/system/error_code.cpp:207: error: âENODEVâ was not declared in this scope src/boost/system/error_code.cpp:208: error: âENOENTâ was not declared in this scope src/boost/system/error_code.cpp:209: error: âENOEXECâ was not declared in this scope src/boost/system/error_code.cpp:210: error: âENOLCKâ was not declared in this scope src/boost/system/error_code.cpp:211: error: âENOLINKâ was not declared in this scope src/boost/system/error_code.cpp:212: error: âENOMEMâ was not declared in this scope src/boost/system/error_code.cpp:213: error: âENOMSGâ was not declared in this scope src/boost/system/error_code.cpp:214: error: âENOPROTOOPTâ was not declared in this scope src/boost/system/error_code.cpp:215: error: âENOSPCâ was not declared in this scope src/boost/system/error_code.cpp:216: error: âENOSRâ was not declared in this scope src/boost/system/error_code.cpp:217: error: âENOSTRâ was not declared in this scope src/boost/system/error_code.cpp:218: error: âENOSYSâ was not declared in this scope src/boost/system/error_code.cpp:219: error: âENOTCONNâ was not declared in this scope src/boost/system/error_code.cpp:220: error: âENOTDIRâ was not declared in this scope src/boost/system/error_code.cpp:224: error: âENOTRECOVERABLEâ was not declared in this scope src/boost/system/error_code.cpp:225: error: âENOTSOCKâ was not declared in this scope src/boost/system/error_code.cpp:226: error: âENOTSUPâ was not declared in this scope src/boost/system/error_code.cpp:227: error: âENOTTYâ was not declared in this scope src/boost/system/error_code.cpp:228: error: âENXIOâ was not declared in this scope src/boost/system/error_code.cpp:232: error: âEOVERFLOWâ was not declared in this scope src/boost/system/error_code.cpp:233: error: âEOWNERDEADâ was not declared in this scope src/boost/system/error_code.cpp:234: error: âEPERMâ was not declared in this scope src/boost/system/error_code.cpp:235: error: âEPIPEâ was not declared in this scope src/boost/system/error_code.cpp:236: error: âEPROTOâ was not declared in this scope src/boost/system/error_code.cpp:237: error: âEPROTONOSUPPORTâ was not declared in this scope src/boost/system/error_code.cpp:238: error: âEPROTOTYPEâ was not declared in this scope src/boost/system/error_code.cpp:239: error: âERANGEâ was not declared in this scope src/boost/system/error_code.cpp:240: error: âEROFSâ was not declared in this scope src/boost/system/error_code.cpp:241: error: âESPIPEâ was not declared in this scope src/boost/system/error_code.cpp:242: error: âESRCHâ was not declared in this scope src/boost/system/error_code.cpp:243: error: âETIMEâ was not declared in this scope src/boost/system/error_code.cpp:244: error: âETIMEDOUTâ was not declared in this scope src/boost/system/error_code.cpp:245: error: âETXTBSYâ was not declared in this scope src/boost/system/error_code.cpp:249: error: âEXDEVâ was not declared in this scope include/boost/system/error_code.hpp: At global scope: include/boost/system/error_code.hpp:211: warning: âboost:ystem::posix_categoryâ defined but not used include/boost/system/error_code.hpp:212: warning: âboost:ystem::errno_ecatâ defined but not used include/boost/system/error_code.hpp:213: warning: âboost:ystem::native_ecatâ defined but not used scons: *** [build/boost/system/error_code.o] Error 1 scons: building terminated because of errors. - joevenzon - 05-13-2009 Sorry, I tried to partially add some of boost due to other stuff I was working on, but now with R2453 I've added a full boost dependency. So install boost (on ubuntu 9.04, sudo apt-get install libboost-dev) and see if that works. - ntsourak - 05-14-2009 New problem....: scons: Reading SConscript files ... Checking for C++ header file boost/asio.hpp... no You do not have the boost/asio.hpp headers installed. Exiting. I have Ubuntu 8.04 - the Hardy Heron and it seems i can only install 1.34.1 boost library :? The asio library is not included in this package. - alex25 - 05-14-2009 ntsourak Wrote:scons: Reading SConscript files ...libasio used to be a separate package. try installing libasio-dev (at least debian has such a package) and then change boost/asio.hpp to asio.hpp (in the code as well). that should work. --alex-- - ntsourak - 05-15-2009 Ok I intalled libasio-dev and did some hacking in the code in order to work. joevenzon: I get results in telemetry.dat file and i have two questions. 1)The velocity in the last column is not the one depicted in the speedometer. I reach to speeds up to 60 MpH but i don't see these high values in the file. 2)Can you explain a little bit what is the velocity of the wheel in the 3-axis. Is it possible to related it somehow with the angle of the wheel? Thanks a lot guys for your immediate responses! - joevenzon - 05-15-2009 Ah, the units in the file are meters per second. I guess I should have mentioned that. The X Y Z velocity units are in world space; that is, if the car is traveling in exactly the +X direction in vdrift, the X velocity will be some number and the Y and Z values will be zero. If you start going up a hill, the X value will decrease slightly and the Z value will increase (Z is up). |