Guidance SDK have provided examples to get data from Guidance system. This section guides you how to execute these examples.
1. Setup the environment.
The Guidance SDK use libusb-1.0.9 library to read data from Guidance system. Please reference http://www.libusb.org/ to compile and install the libusb-1.0.9 library from source.
2. Copy related files.
Makefiles are provided and tested. The user does not need to change anything to run the example code.
To use Guidance in their own projects, the user can follow the instructions below:
|
3. Compile the example project.
Enter the project directory and type
|
Note: Here we assume you don't have OpenCV installed and uses Makefile_noOpenCV. You can specify the makefile during make according to your own case. For example if you have OpenCV installed, use the other makefile:
|
4. Connect Guidance via USB and run.
You need root permission to run this example if you have not added the 51-guidance.rules
file to /etc/udev/rules.d/
directory as instructed in the Developer Guide
.
|
The results look like the following figure.
1. Setup the environment.
The Guidance SDK uses the libusb library to read data from Guidance system. Please make sure the Guidance Assistant Software is installed properly which includes DJI USB driver for Guidance.
2. Configure Visual Studio.
Solutions for different versions of Visual Studio are provided and tested. The user do not need to change anything to run the example code.
To use Guidance in their own projects, it is suggested to use the property sheet files provided in the examples\usb_example folder. The user only needs to change the directories of header and library files in the property sheet files.
Alternatively, the user can directly copy the files and configure Visual Studio as follows:
3. Compile the example project.
Compile the example project using Microsoft Visual Studio.
4. Connect the Guidance system for testing.
The results look like the following figure.
1. Subscribe UART data.
Please reference Section 2.1.2 to activate UART.
2. Compile the example project.
Go to the directory uart_example
and type make
:
3. Connect the Guidance system for testing.
1. Subscribe UART data.
Please reference Section 2.1.2 to activate UART.
2. Compile the example project.
Compile the example project using Microsoft Visual Studio.
3. Connect the Guidance system for testing.
The results look like the following figure.