This repository contains a ROS1 wrapper for the real-time event simulator library.
If you use this code in an academic context, please cite the following publication:
Paper: Real-time event simulation with frame-based cameras
Video: YouTube
Project: See here
@inproceedings{Ziegler2023icra,
title = {Real-time event simulation with frame-based cameras},
booktitle = {2023 {International} {Conference} on {Robotics} and {Automation} ({ICRA})},
publisher = {IEEE},
author = {Ziegler, Andreas and Teigland, Daniel and Tebbe, Jonas and Gossard, Thomas and Zell, Andreas},
month = {may},
year = {2023},
}
This code has been tested on Ubuntu 20.04 with ROS noetic.
Dependencies:
- OpenCV
- ROS Noetic
- roscpp
- prophesee_event_msgs
- image_transport
- cv_bridge
- event_simulator
-
Source ROS
source /opt/ros/noetic/setup.bash
-
Create a ROS workspace
mkdir -p ~/event-simulator_ws/src
-
Clone repositories:
cd ~/event-simulator_ws/src
git clone https://github.com/cogsys-tuebingen/event_simulator.git src/event_simulator
cd src/event_simulator/
git submodule update --init --recursive
cd ../..
git clone https://github.com/cogsys-tuebingen/event_simulator_ros.git src/event_simulator_ros
git clone https://github.com/prophesee-ai/prophesee_ros_wrapper.git
cp -r prophesee_ros_wrapper/prophesee_event_msgs src/
rm -rf prophesee_ros_wrapper/
git clone https://github.com/ros-drivers/usb_cam.git src/usb_cam
- Build:
source /opt/ros/noetic/setup.bash
catkin config -DCMAKE_BUILD_TYPE=RelWithDebInfo
catkin build
- Run:
ROS node:
source devel/setup.bash
rosrun usb_cam usb_cam_node
rosrun event_simulator_ros event_simulator_ros
Note: event_simulator_ros
expects frames in the /usb_cam/image_raw
topic.
Using videos:
source devel/setup.bash
rosrun event_simulator_ros event_simulator_video --video /path/to/video --record_video
Note: Use --help
to see all the options.
Calculate the timings:
source devel/setup.bash
rosrun event_simulator_ros event_simulator_timings --video /path/to/video
Note: Use --help
to see all the options.
type
: The event simulator type (possible options aredifference_cpu
,difference_gpu
,sparse_cpu
,sparse_gpu
,dense_farneback_cpu
,dense_farneback_gpu
,dense_dis_lq
,dense_dis_hq
)publish_events
: Set toTrue
to publish the event streampublish_event_frames
: Set toTrue
to publish the accumulated event frames
In the docker
folder, you will find Dockerfiles
for setups with and without CUDA. When building the docker image, you will need metavision.list
which you can get from Prophesee here.
In the scripts
folder, you can find a couple of helper scripts for the statistics experiments.
A default config for the timing measurement can be found in the config
folder.
This software is issued under the Apache License Version 2.0.