Presenter examples¶
This section describes various different kind of presenters you can make using SDK.
Below are a list of tips to keep in mind when making a new presenter:
A presenter needs to be associated to one kind of source in ViCANdo. This is needed when you click from the presentation menu in ViCANdo and select your presenter, you need to select a source to attach to.
A presenter should always have a unique “ID” -> This is specified in the descriptor class. For example, custom-lidar-presenter is the unique descriptor of the CustomLiDAR presenter example. Also the “ID” should be specified in Q_PLUGIN_METADATA
Helloworld presenter example¶
This is a simple presenter shows you how to communicate between C/C++ and QML. In function registerContextProperties() project is registered. It allows you to use the project property in QML according to the QML API in this manual.
To build this example, open the project in Qt and use the Zuragon build kit(contact our support), Release build and go to SDK root directory, under outputrelease folder you will find the DLL file you have built.
There are two ways to load the DLL in ViCANdo, one way is to add the DLL to ViCANdo installation directory, for example paste the DLL to folder C:\Program Files\Zuragon\ViCANdo 3.1\plugins\presenter. Another way is in ViCANdo from menu File->Settings -> Application tab -> SDK section. Check the checkbox and specify the SDK directory, ViCANdo will automatically search the output\release in SDK for custom DLLs next time when it starts.
Remember to fix any compiling errors in the DLL before using it in ViCANdo.
Troubleshooting
If you get below error in ViCANdo console window: File was compiled ahead of time with an incompatible version of Qt and the original file cannot be found. Please recompile
One way is to not using the Qt Quick Compiler while release building the DLL:
LiDAR presenter examples¶
Inside SDK there are examples of IBEO, Panda, Robosense and Velodyne LiDAR presenters. It is also possible to write your own lidar presenter using the SDK to expand your lidar module in ViCANdo. For example, The Custom LiDAR viewer in below image is a plugin based on the Lidar API in SDK. The source code can be found inside the SDK under folder examplespresenterscustomlidar.
The GUI of the lidar viewer is written in QML & Javascript, the logic to process the LiDAR coordinates are written in C++. Check out the customlidar example to learn how to write your own. The detailed instruction can be found in the manual inside the SDK package under examplespresenters folder.
Application tips:
Processing LiDAR point cloud data can be time consuming. We recommend to move the heavy calculation to C/C++ and keep QML light.
Video presenter example¶
There is an example called customvideo presenter which contains GUI for displaying maximum four video sources, for example if you have four surrounding cameras need to be processed, this is a good example to start with. The presenter is written in C/C++.