-
Notifications
You must be signed in to change notification settings - Fork 3
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
Incorrect events decoding #19
Comments
Not much to go by from this. from bag_reader_ros2 import BagReader
from event_camera_py import Decoder
topic = '/event_camera/events'
bag = BagReader('foo', topic)
decoder = Decoder()
while bag.has_next():
topic, msg, t_rec = bag.read_next()
decoder.decode(msg)
cd_events = decoder.get_cd_events()
print(cd_events)
trig_events = decoder.get_ext_trig_events()
print(trig_events) |
I've tried with the camera renderer and the events are displayed correctly, also with the dump tool from event_camera_tools the events are correct. I've tried your code snippet but the output is the same as mine. So the problem is with the python decoding i guess. |
Would you mind sending me a ros2 bag that shows the problem? The shorter the better. |
bag.zip |
I ran the following code on your bag and it did not raise an exception. Strange. Could be a systems problem.
from bag_reader_ros2 import BagReader
from event_camera_py import Decoder
topic = '/event_camera/events'
bag = BagReader('../bag', topic)
decoder = Decoder()
x_min, x_max, y_min, y_max = (0, 1280, 0, 720)
while bag.has_next():
topic, msg, t_rec = bag.read_next()
decoder.decode(msg)
cd_events = decoder.get_cd_events()
x = cd_events['x']
y = cd_events['y']
if (x < x_min).any() or (x >= x_max).any() or (y < y_min).any() or (y >= y_max).any():
print(cd_events)
raise Exception('event coordinates out of bounds')
print('no out-of-bounds coordinates found') |
I'm using ROS Humble on ubuntu 22.04 (x86_64) i used the master branch from github (i followed the instruction on the repo). Maybe there is a problem with some python packages version. |
Did you make any more progress on this issue? |
Closing this due to inactivity. |
OK, so I'm hitting the same issue when trying to use JAX. The decoder doesn't crash, but it gives garbled data. This has to do with the virtual environment I'm using. Looking into it. |
The breakage occurs when I switch from numpy 1.x to numpy 2.x. The modules in this repo are compiled for numpy 1.x. |
Apparently pybind11 updated the header with pybind 2.12 such that the modules would work with both Alas, even Ubuntu 24.04 currently only ships with pybind 2.11.1. |
Solution to this problem: |
Hi,
I'm trying to decode events from a ROS bag recorded with the sensor Prophesee EVK4 (IMX636) so the event codec should be EVT3.0.
Using the example provided I obtain events that are not correct (i.e x > senso_with, y > sensor_height, polarity not in {-1, 1} wrong timestamps).
Here's my code:
Some events i'm obtaining:
[( 879, 16, 0, 5962275) (59904, 16948, 37, 14287178)
(64039, 90, 116, 1110764033) ... (32480, 16922, 100, -1017008928)
(24158, 52683, 1, 449) (32480, 16922, 100, -1017008928)]
Thank you in advance for the help.
The text was updated successfully, but these errors were encountered: