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

fixes rosbag storage_id and EventCDConverter import #9

Closed
wants to merge 2 commits into from

Conversation

JackPieCZ
Copy link

@JackPieCZ JackPieCZ commented May 30, 2024

Changes

  1. Since the recommended tool to create bag files from raw files (event_camera_tools) generate mcap files by default, storage_id in read_bag_ros2.py file was changed from sqlite3 to mcap to avoid the following error when running src/mv_vs_frequency_cam.py file with defined --bag:
[ERROR] [1717085906.299389849] [rosbag2_storage]: Could not open '/mnt/d/_FEL/CMP/event_cam_experiments/event_cam_experiments/experiments/02_drill_slow_longer/drill_slow_bag/drill_slow_bag_0.mcap' with 'sqlite3'. Error: Failed to setup storage. Error: Error when processing SQL statement. SQLite error (26): fi
le is not a database
[ERROR] [1717085906.299537250] [rosbag2_storage]: Could not load/open plugin with storage id 'sqlite3'
Traceback (most recent call last):
  File "/mnt/d/_FEL/CMP/event_cam_experiments/event_cam_experiments/frequency_cam/src/mv_vs_frequency_cam.py", line 264, in <module>
    events, res, offset, _, _ = read_bag(
  File "/mnt/d/_FEL/CMP/event_cam_experiments/event_cam_experiments/frequency_cam/src/read_bag_ros2.py", line 117, in read_bag
    bag = BagReader(bag_path, topic)
  File "/mnt/d/_FEL/CMP/event_cam_experiments/event_cam_experiments/frequency_cam/src/read_bag_ros2.py", line 39, in __init__
    self.reader.open(storage_options, converter_options)
RuntimeError: No storage could be initialized. Abort
  1. EventCDConverter is not defined in frequency_cam.py file as used on line 304 in file src/mv_vs_frequency_cam.py. To mitigate this error, EventCDConverter is imported from read_bag_ros2 as it was before the last commit.

Additional help required

After these two mentioned fixed, the mv_vs_frequency_cam.py starts without any errors or warnings. However, it produces a Seg fault at line 343 in file mv_vs_frequency_cam.py: mv_algo.process_events(evs). With this line commented out, the seg fault does not occur. Here is the full console output:

DESKTOP:~$/usr/bin/python3 ./src/mv_vs_frequency_cam.py --bag ./bag/
took 0.326548s to process 118, rate: 361.35538384819984 msgs/s, 6.73576234961081 Mev/s
Segmentation fault

JackPieCZ added 2 commits May 30, 2024 18:40
EventCDConverter is not defined in frequency_cam file as used on line 304. To mitigate this error, EventCDConverter is imported from read_bag_ros2 as it was before the last commit
@JackPieCZ JackPieCZ changed the title fixex rosbag storage_id and EventCDConverter import fixes rosbag storage_id and EventCDConverter import May 30, 2024
@berndpfrommer
Copy link
Owner

Please email me your raw file (or link to cloud storage) so I can have a look at it.

@JackPieCZ
Copy link
Author

JackPieCZ commented May 30, 2024

Here is the data I used link
I know the mv_vs_frequency_cam.py was more for testing purposes than general use, but I thought you might want to know about this issue.

@berndpfrommer
Copy link
Owner

The way events are stored is now completely different from how it was way back when I wrote this experimental python code.
I created a new branch ("resurrect_python_code") which has some fixes for bag reading ("run_frequency_cam.py"). At least it reads the events now and feeds them into frequency cam. But much else is still broken.

@JackPieCZ
Copy link
Author

Great! Thank you very much!

@berndpfrommer
Copy link
Owner

I fixed the worst of brokenness and added a README with PR #11.
The code quality is low and there are now tests. I tried it on the drill dataset you sent and it seemed to work.

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

Successfully merging this pull request may close these issues.

2 participants