Guidance SDK is maintained and updated on GitHub.
Install “Guidance Assistant” software firstly, which provides the USB driver under Windows platform. Restart your PC after installation, there will be “DJI, Inc. - Guidance” in Device Manager when Guidance is powered and connected to PC, which indicates the installation is successful.
Install USB_TO_RS232 driver if you want to use SDK via UART. Notice that Guidance SDK reads port “COM5” by default.
Assume that “Guidance Assistant” software has been correctly installed on Windows.
Notice: You can also subscribe data by API functions provided by the SDK package.
Notice: If you do not close the software Guidance Assistant, you will not be able to use Guidance SDK as the connection to Guidance Core is occupied.
We provide a bunch of property sheet files *.prop including “use_Guidance_*.prop” and “use_opencv_*.prop” under Visual Studio 2010/2013, which are well tested on Win7 x86/x64, you could simply add them to your project. Of course, just choose whatever compiler you like.
Opencv2.4.8/9/11 are well tested with Guidance SDK, you can download the version you like from http://opencv.org/.
Notice that we define $(OPENCVROOT) as a variable of OpenCV path in the provided example and Demo projects, therefore it is suggested to add a variable named OPRNCVROOT in computer environment variable for the ease of use.
For example:
Suppose the installed directory of Opencv2.4.11 in your computer is D:/OPENCV/opencv2411/build[sources].
Remember to copy corresponding DJI_guidance.dll to /PATH/TO/YOUR/EXE. Of course .dll, .h and .lib should be placed at correct places too.
Download and unzip “libusb-1.0.9.tar.bz2” file from http://www.libusb.org/, and install it correctly by instruction. Install from apt-get
is not recommended.
For example, unzip libusb-1.0.9.tar.bz2 first andcd
to PATH/TO/LIBUSB_DIR, then
|
Linux includes USB to UART driver by default.
Refers to Install “Guidance Assistant” software in Windows
Make sure the g++ compiler on your computer is the latest version, check the time on your computer synchrony to real-world!
For example:
|
|
For example:
|
Copy corresponding libDJI_guidance.so to /usr/local/lib.
For example:
|
sudo
command is required to get root privilege of USB port, otherwise an error of permission denied will occur. For example: >> sudo ./guidance_example
To save the trouble of using sudo
every time you run Guidance SDK programs, you can also create a file 51-guidance.rules
in /etc/udev/rules.d/
with the following content:
SUBSYSTEM=="usb", ATTR{idVendor}=="fff0", ATTR{idProduct}=="d009", MODE="0666"
Then disconnect and connect again USB cable of Guidance Core. Now you will be able to run Guidance SDK programs without sudo
.
Set up your environment according to the steps in Developer Guide can avoid most of the errors.
Description: “usb error” or things like that happen, for example:
Solution:
sudo
in Linux.Description:
Error while loading shared libraries : libDJI_guidance.so: cannot open shared object file : No such file or directory.
Solution:
Description:
Cannot open DJI_guidance.dll file:No such file or directory.
Solution: Make sure that corresponding DJI_guidance.dll is placed in the RUNPATH.
Description:
Cannot open OpenCV related *.h or *.dll.
Solution:
Check the configuration of OpenCV, remember that we use $(OPENCVROOT) as an environment variable in examples.
Description:
Data transfer error occurs means you may get a wrong image, for example:
Solution: