Closed sbrodeur closed 7 years ago
There are more sensors/information that we could export to videos and display:
Support is to be added in file: https://github.com/sbrodeur/ros-icreate-bbb/blob/master/src/action/scripts/record/data/visualize_hdf5.py
Currently, the implementation is very slow with Matplotlib generating animations. This should be optimized. See: http://bastibe.de/2013-05-30-speeding-up-matplotlib.html
It seems that the encoding process is responsible for the slow processing, even with simple codec (e.g rawvideo, mjpeg) compared to H.264. Using libx264 is still the fastest (33 FPS) and leads to smaller size videos. The only way to gain speed is to parallelize computation across CPU cores, but encoding multiple videos on different threads / processes. This would be easy since we have a lot of sensors to process, and this is done sequentially right now.
See commit f6b1679 about how to use multiprocessing and downsampling to have considerable speedup.
See commit 6fccca0 for the last visualizations that needed to be implemented.
We can use or adapt available source codes for that: https://github.com/OSUrobotics/bag2video https://github.com/mlaiacker/rosbag2video