events_h52bag
C++ code to convert event data from HDF5 to ROSbags. By default, data format of h5 input file is expected as in the DSEC dataset. The exact data structure used can be found here.
Author: Suman Ghosh
Installation
- Install ROS. We need the
rosbag
andstd_msgs
packages. - Install libhdf5:
sudo apt-get update
sudo apt-get install libhdf5-dev
- Install the blosc filter plugin for hdf5 for read-only access across all HDF5 applications in your system:
git clone https://github.com/Blosc/hdf5-blosc.git
cd hdf5-blosc
mkdir build && cd build
cmake ..
make
-
Copy the
libH5Zblosc.so
shared library generated inside thebuild
folder into your local hdf5 plugin path, which is usually/usr/local/hdf5/lib/plugin
or/usr/lib/x86_64-linux-gnu/hdf5/plugins
depending on your Linux distro. Installation location of hdf5 can be found usingdpkg -L libhdf5-dev
. -
Add path to your installed
dvs_msgs
header in line 11 ofCMakeLists.txt
. If not already installed, installdvs_msgs
from https://github.com/uzh-rpg/rpg_dvs_ros in your catkin workspace. -
Clone this repository:
git clone https://github.com/tub-rip/events_h52bag.git
-
Compile this repository:
cd events_h52bag
mkdir build && cd build
cmake ..
make
Execution
./events_h52bag <path/to/input/h5file> <path/to/output/bagfile> <output_topic_name>
Working example
- Download input data from DSEC dataset: https://download.ifi.uzh.ch/rpg/DSEC/train/thun_00_a/thun_00_a_events_left.zip
- Extract
events.h5
from zip. - Execute:
./events_h52bag events.h5 out.bag /dvs/left/events