Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using rosbag file #11

Closed
jprodriguezg opened this issue Jan 22, 2019 · 1 comment
Closed

Using rosbag file #11

jprodriguezg opened this issue Jan 22, 2019 · 1 comment

Comments

@jprodriguezg
Copy link

Hello,

I am wondering if there is a way of using a rosbag file with a video as input. I saw something related to it in the data_provider_rosbag.cpp file. However, it's not clear to me how to use use the simulator with this configuration.

Could you please give me any hint?

@supitalp
Copy link
Contributor

Hello,
As you saw, there is some (experimental) code for simulating events from images in a rosbag. You may try it with a config file as follows:

--data_source=3
--bag_filename=/path/to/rosbag.bag
--topic_cam0=/name/of/the/image/topic
--path_to_output_bag=/tmp/out.bag

--contrast_threshold_pos=0.5
--contrast_threshold_neg=0.5
--contrast_threshold_sigma_pos=0
--contrast_threshold_sigma_neg=0

--exposure_time_ms=0
--use_log_image=1
--log_eps=0.001

--ros_publisher_frame_rate=100

However, note that the simulated events will not be accurate since nothing guarantees that the optical flow between two frames in a rosbag is small enough to yield accurate events. What ESIM will do in this case is simply apply linear interpolation between the frames and simulated events in between (relevant code is here: https://github.com/uzh-rpg/rpg_esim/blob/master/event_camera_simulator/esim/src/event_simulator.cpp#L21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants