ADI maintains a set of tools to model, interface, and target with ADI time of flight devices within MATLAB and Simulink. These are combined into single Toolbox which contains a set of Board Support Packages (BSP). The list of supported boards is provided below.
The current stable Toolbox can be downloaded from the Time of Flight Toolbox GitHub Release Page. Download the latest mltbx file then open that file within MATLAB. Opening the file will automatically install the Toolbox, adding the necessary components to your MATLAB path. The “Analog Devices, Inc. Time of Flight Toolbox” will appear in your Add-Ons Explore within MATLAB.
The toolbox can only be built under Windows platform currently with Cygwin. Conveniently, the entire process is automated with a Makefile located in the CI/scripts folder of the repository. The following is required on the system before the build process can be run:
First clone the repo and move into it:
git clone https://github.com/analogdevicesinc/TimeofFlightToolbox.git cd TimeofFlightToolbox
To create a installable tlbx file run:
make -C CI/scripts gen_tlbx
Device interfaces which provide control and data streaming are implemented with MATLAB System Objects and traditional video adaptor object. The System Objects can be access under the “adi” namespace in MATLAB and are followed by their part number or board name:
adi.<Part or Board Name>
For example, to instantiate an AD96TOF1EBZ object to control the Time of Flight it can be created as follows:
tof = adi.AD96TOF1EBZ;
Alternatively, you can use the traditional image adaptor API by importing the adaptor manually:
% Import adaptor with helper function imaqregister(adi.TOFAdaptor); % Create object with USB connection vid = videoinput('aditofadapter');
There are a number of examples included with the toolbox and available on github.
To get a list of currently available objects with the BSP installed simply run:
To get more information on a given object run:
help adi.<Part of Board Name>
The following have device-specific implementations in MATLAB and Simulink. If a device has an IIO driver, MATLAB support is possible, but a device-specific MATLAB or Simulink interface may not exist yet.
|Evaluation Card||FPGA Board||Streaming Support||Targeting||Variants and Minimum Supported Release|
|Raspberry Pi||Yes||Yes||ADI (2020a)|
Examples for streaming data and targeting FPGAs are listed within the Toolbox documentation itself. To view run the following with MATLAB: