[Rock-dev] using parts of log files

Alexander Duda Alexander.Duda at dfki.de
Fri Feb 24 00:27:21 CET 2012


On 02/23/2012 08:29 PM, Henning Kost wrote:
> Hi,
>
> I'm currently trying to implement an automatic test for a task that uses
> sonar data. I want my test to feed the task with several log files and
> analyze the output of the task. But I don't want to process the whole
> files but only parts of it. So my question is if there is a way to edit
> existing log data i.e. store index i to j in a new log file.
> Alternatively, is there a way to handle my log data in a ruby script to
> start and end at specific indices, which would also do the trick?
> Any suggestions?

You can use rock-convert to extract parts of a log file. It is not meant 
for this but it would do the trick (see rock-convert --help).
An other solution would be to use the API from Orocos::Log::Replay to 
replay only parts of the log file to your components.

replay = Orocos::Log::Replay.open(my_logfile)
#do all the connections here
replay.seek(my_index)
while replay.sample_index != my_index2 && replay.step
     Vizkit.process_events #this is only needed if you are using qt 
widgets somewhere in the script
end

Alex

-- 
Dipl.-Ing. Alexander Duda
Unterwasserrobotik

DFKI Bremen
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Phone: +49 (0)421 178-456620
Fax:   +49 (0)421 178-454150
E-Mail: alexander.duda at dfki.de

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.:    DE 148646973
Steuernummer:  19/673/0060/3



More information about the Rock-dev mailing list