Changes between Initial Version and Version 1 of WikiStart/Toolchain/ReadingLogData

03/06/14 16:01:33 (6 years ago)



  • WikiStart/Toolchain/ReadingLogData

    v1 v1  
     1=== Reading log data without a full installation of Rock 
     3Sometimes it is useful to be able to access the log data created by the Rock framework, without installing an entire Rock. The log data, which by default is generated from all the modules used in Rock is using the pocolog dataformat. This stores metadata in the file, so that the data can be retrieved in a meaningful way, even if the original types have already changed. 
     5Currently the pocolog package has a few dependencies, which make it impractical to install it manually. The easiest way is to get a bare installation of the rock build system, and a buildconfig, which only has pocolog in it. 
     7=== Installing Pocolog 
     9 * You need a linux supported by Rock, as well as ruby installed on your system 
     10 * Create a new directory 
     11{{{mkdir pocolog}}} 
     12 * Get the boostrap shell script 
     13{{{wget -O}}} 
     14 * Run the bootstrap command - and use the default option for all questions 
     16 * Wait for the build to finish, and the source the environment 
     19You are done now. You should be able to call 
     20{{{pocolog --help}}} 
     21which will give you the options of the pocolog tool. 
     23=== Short course on using pocolog 
     25Once you have pocolog installed, you can run it on your logfiles. 
     28% pocolog xsens_imu.0.log  
     29File data is in little endian byte order 
     30pocolog.rb[INFO]: loading file info from ./xsens_imu.0.idx...  
     31Stream xsens_imu.calibrated_sensors [/base/samples/IMUSensors_m] 
     32  18101 samples from Thu 03/03/2011 17:41:40 to Thu 03/03/2011 17:44:40 [0:03:00.976] 
     33Stream xsens_imu.orientation_samples [/base/samples/RigidBodyState_m] 
     34  18102 samples from Thu 03/03/2011 17:41:40 to Thu 03/03/2011 17:44:40 [0:03:00.986] 
     37This shows that in the xsens_imu.0.log file, there are two streams embedded. The first stream is called xsens_imu.calibrated_sensors, and is of type /base/samples/IMUSensors_m the second stream is called xsens_imu.orientation_samples, and has type /base/samples/RigidBodyState_m. 
     39The command  
     41% pocolog xsens_imu.0.log --show xsens_imu.orientation_samples 
     43Will dump the entire content of the stream. The first line is a header giving the names of the fields. The field names are hierarchical, so you can select subfields to show if you are only interested in parts of the data. 
     45The next command for example will only show the orientation data (quaternion) with the real and the imaginary part. The to option shows the data entries up to this index. 
     47% pocolog xsens_imu.0.log --show xsens_imu.orientation_samples --fields orientation --to 1 
     48pocolog.rb[INFO]: loading file info from ./xsens_imu.0.idx...[0][1][2] 
     500.22480970621109009 0.29827189445495605 -0.56142556667327881 0.73844146728515625 
     510.22483809292316437 0.298296719789505 -0.56142890453338623 0.73842024803161621