HAL EVK4 Sample Plugin

The sample metavision_hal_evk4_sample_plugin provides a basic example of how to create a camera plugin for the Prophesee EVK4 using Metavision HAL. This sample is designed to demonstrate the implementation of various facilities and how they integrate into the broader Plugin architecture.

This plugin is limited in both features and performance, and would require significant enhancements to be production-ready, particularly in the area of data transfer. For a more robust example of an EVK4 plugin, you can check the code of Prophesee Camera Plugin that is available in OpenEB (see the hal_psee_plugins folder) and check our doc page on “Customizing Prophesee plugin and firmware for CX3-based camera”

The source code of this sample can be found in <install-prefix>/share/metavision/hal/cpp_samples/metavision_hal_evk4_sample_plugin when installing Metavision SDK from installer or packages. For other deployment methods, check the page Path of Samples.

How to start

Warning

Currently, this sample is available exclusively on Ubuntu, as it simplifies the compilation process. However, adapting it to work on Windows would primarily involve managing the linkage of libusb.

First, compile the sample as described in this tutorial.

To use the sample plugin when running an executable, you need to set the environment variable MV_HAL_PLUGIN_PATH. For example, if you want to run metavision_viewer with the sample plugin, run:

MV_HAL_PLUGIN_PATH=<build-directory>/lib/hal_evk4_sample_plugin metavision_viewer

Due to the limited data transfer capacity of this plugin, there is a possibility that some packets may be lost, which could lead to decoding warnings such as [HAL][WARNING] Evt3 protocol violation detected : InvalidVectBase. These errors are detected by our EVT3 decoder, as detailed on the EVT3 Decoding Configuration page. To suppress these messages, you can configure the decoder to operate in unsafe mode:

MV_FLAGS_EVT3_UNSAFE_DECODER=1 MV_HAL_PLUGIN_PATH=<build-directory>/lib/hal_evk4_sample_plugin metavision_viewer

If you want to ensure that the sample plugin is utilized instead of accidentally defaulting to the official EVK4 sample, you can leverage the MV_HAL_PLUGIN_SEARCH_MODE variable. By setting this variable, you can explicitly control the search behavior, directing it to prioritize your custom sample plugin over the official one.

MV_HAL_PLUGIN_SEARCH_MODE=PLUGIN_PATH_ONLY MV_HAL_PLUGIN_PATH=<build-directory>/lib/hal_evk4_sample_plugin metavision_viewer