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


Ignore:
Timestamp:
03/06/14 16:01:33 (6 years ago)
Author:
jasc02
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart/Toolchain/ReadingLogData

    v1 v1  
     1=== Reading log data without a full installation of Rock 
     2 
     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. 
     4 
     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. 
     6 
     7=== Installing Pocolog 
     8 
     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 https://gitorious.org/rock/buildconf-bare/raw/31cdb91b7cfe345a980dc624b6e599a50dedb104:bootstrap.sh -O bootstrap.sh}}} 
     14 * Run the bootstrap command - and use the default option for all questions 
     15{{{sh bootstrap.sh}}} 
     16 * Wait for the build to finish, and the source the environment 
     17{{{source env.sh}}} 
     18 
     19You are done now. You should be able to call 
     20{{{pocolog --help}}} 
     21which will give you the options of the pocolog tool. 
     22 
     23=== Short course on using pocolog 
     24 
     25Once you have pocolog installed, you can run it on your logfiles. 
     26 
     27{{{ 
     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] 
     35}}} 
     36 
     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. 
     38 
     39The command  
     40{{{ 
     41% pocolog xsens_imu.0.log --show xsens_imu.orientation_samples 
     42}}} 
     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. 
     44 
     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. 
     46{{{ 
     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...  
     49orientation.im[0] orientation.im[1] orientation.im[2] orientation.re 
     500.22480970621109009 0.29827189445495605 -0.56142556667327881 0.73844146728515625 
     510.22483809292316437 0.298296719789505 -0.56142890453338623 0.73842024803161621 
     52}}} 
     53 
     54