[Rock-dev] how to customize the synchronization of log replay
Alexander Duda
Alexander.Duda at dfki.de
Mon Jan 17 09:51:26 CET 2011
Hi Jakob
To use your custom code block to synchronize the log replay you can do
the following.
require 'vizkit'
log = Orocos::Log::Replay.open('camera_new.0.log')
log.time_sync do |current_time,actual_time_delta,required_time_delta|
# this is called before each sample is replayed
# for example:
wait = required_time_delta-actual_time_delta
puts wait
wait # must return the number of seconds log replay shall wait until
# this block is recalled. If return value < 0.001 the current
# sample is replayed
end
Vizkit.control log
Vizkit.exec
Alex
PS:
I extended log_control a little bit. You can now see which streams are
replayed. If you click on one of them a new window will open which
displays the content of the stream. At the moment there is only a
plug-in for frames all other types are displayed in a tree view. But
feel free to add more plug-ins.
--
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