-
Notifications
You must be signed in to change notification settings - Fork 31
Adding support for Inivation's DVXplorer Micro camera #223
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
base: main
Are you sure you want to change the base?
Conversation
mikihiroikura
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @jorou125
I'm so sorry to be late for the review because I was very busy.
I added some comments and requested some changes. Please have a look.
| # dv-processing | ||
| # Add toolchain PPA and install gcc-13/g++-13 | ||
| RUN apt update && \ | ||
| apt install -y software-properties-common && \ | ||
| add-apt-repository ppa:ubuntu-toolchain-r/test && \ | ||
| apt update && \ | ||
| apt install -y gcc-13 g++-13 | ||
|
|
||
| # Add inivation PPA and install dv-processing dependencies | ||
| RUN add-apt-repository ppa:inivation-ppa/inivation && \ | ||
| apt-get update && \ | ||
| apt-get install -y \ | ||
| boost-inivation \ | ||
| libcaer-dev \ | ||
| libfmt-dev \ | ||
| liblz4-dev \ | ||
| libzstd-dev \ | ||
| libssl-dev && \ | ||
| apt-get -y install dv-processing | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding dv-processing in Dockerfile.
However, it's important to reduce the docker image size as much as possible by simplifying Dockerfile.
Currently, this Dockerfile contains metavision-sdk and dv-processing, meaning it's redundant.
Therefore, I recommend you to create some Dockerfiles for metavision-sdk and dv-processing separately.
Could you please make them in the following folder structure?
event-driven/
├── docker/
│ ├── Prophesee/
│ ├── Dockerfile_Ubuntu2004
│ └── Dockerfile_Ubuntu2204
│ ├── Inivation
│ ├── Dockerfile_Ubuntu2004
│ └── Dockerfile_Ubuntu2204
| message(STATUS "Found prophesee_core: (found version ${prophesee_core_VERSION})") | ||
| endif() | ||
|
|
||
| find_package(libcaer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the installation guide for dv-processing.
Is it correct that we need libcaer to use dv-processing?
| using namespace yarp::os; | ||
|
|
||
|
|
||
| class dvbridge : public RFModule, public Thread { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used camelCase for class names, so change dvbridge to dvBridge.
| int bufferSize{0}; | ||
| int bufferUsed{0}; | ||
| int bSel{0}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use snake_case for parameters, so please change bufferSize to buffer_size.
| bool bgaFilter{false}; | ||
| int bgaDuration{2000}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change them to snake_case format
| const dv::Duration backgroundActivityDuration = dv::Duration(bgaDuration); | ||
| dv::noise::BackgroundActivityNoiseFilter<> BGAFilter(resolution.value(),backgroundActivityDuration); | ||
| while(cam.isRunning()) { | ||
| // wait for data and then switch buffers so the callback can keep | ||
| // filling the second buffer while we are sending | ||
|
|
||
| if (auto events = cam.getNextEventBatch(); events.has_value()) { | ||
| if (bgaFilter){ | ||
| BGAFilter.accept(*events); | ||
| dv::EventStore BGAFiltered = BGAFilter.generateEvents(); | ||
| if (BGAFiltered.isEmpty()) { | ||
| continue; // skip empty batches | ||
| } | ||
| fill_buffer(BGAFiltered); | ||
| } | ||
| else { | ||
| fill_buffer(*events); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some parts are indented with two spaces. Please use indents with four spaces.
Hi, just as discussed with @arrenglover, I have made a
dv-bridge-sdk. I based it on theatis3-bridge-sdk. Using it allows me to use the DVXplorer Micro camera from Inivation with YARP. The bridge could easily be adapted for the other Inivation sensors, but I only have the DVXplorer Micro, so I focused on that sensor for debugging purposes. Have a good day!