NOTE This article is Machine-Translated. If you have any questions about this article, please send an E-mail to DJI, we will correct it in time. DJI appreciates your support and attention.
This article describes the process of setting up the software environment. After connecting the hardware and setting up the software environment, the developer could create the project and run the sample code.
NOTE The following installation steps take Manifold 2 as an example to introduce the steps to configure the development environment for developing applications using OSDK.
Please follow the steps below to add UART read and write permissions for users specified in Linux:
sudo usermod -a -G dialout $ USER
command to add the user to thedialout
group.To use the vision function in OSDK on the M210 series of drones to enable the Linux system to obtain and identify DJI devices, please add the DJI USB device node in Linux as follows:
DJIDevice.rules
in the/etc/udev/rules.d/
directory.SUBSYSTEM=="usb", ATTRS {idVendor} =="2ca3", MODE ="0666"
in the DJIDevice.rules
file.
3. After restarting the computer, the system can recognize the DJI USB device.NOTE The following installation steps take Manifold 2 as an example to introduce the steps to configure the development environment for developing applications using OSDK.
mkdir catkin_ws cd catkin_ws mkdir src cd src catkin_init_workspace |
Obtain the DJI Onboard SDK from Github and install the DJI Onboard SDK using the following command in the DJI Onboard SDK directory.
$ mkdir build |
Use the following command to install nema-comms
$ sudo apt install ros- {release} -nmea-comms
NOTE When using Advanced Visual on the ROS, be sure to install nema-comms.
After installing the ACM (Abstract Control Model) driver, developers can use an onboard computer or a third-party onboard computer to implement application simulation and external power supply through the USB interface.
Use the dmesg
command to query the ACM driver information in the system, as shown in Figure 1.
Figure 1. Install ACM Driver
After installing FFmpeg, developers can use video onboard computers or third-party onboard computers to implement video-related functions. Use the following command to install FFmpeg:
sudo apt-get install libavcodec-dev libswresample-dev |
After installing OpenCV, developers can use an onboard computer or a third-party onboard computer to visually obtain information on application functions such as stereoscopic perception and object recognition.
Please follow the steps below to add UART read and write permissions for users specified in Linux:
sudo usermod -a -G dialout $ USER
to add the user into thedialout
group.Install LibUSB
After installing LibUSB, developers can use Manifold and third-party onboard computers to obtain image data received by the drone.
Use the following command to install LibUSB: 1.0.17 and later.
sudo apt-get install libusb-1.0-0-dev
Add DJI USB Device Node To use the vision function in OSDK on the M210 series of drones to enable the Linux system to obtain and identify DJI devices, please add the DJI USB device node in Linux as follows:
DJIDevice.rules
in the/etc/udev/rules.d/
directory.SUBSYSTEM =="usb", ATTRS {idVendor} =="2ca3", MODE ="0666"
in the DJIDevice.rules
file.There are relatively many topics subscribed by ROS by default. In order to ensure sufficient communication bandwidth between ROS and applications developed based on OSDK, the baud rate of UART should be greater than 921600.
NOTE
- Since the baud rate of Manifold 2-G may deviate slightly from the actual value, please set the baud rate to 1000000. For details, please refer to Manifold 2 User's Manual .
- Only Linux and ROS systems support the use of DJI's advanced vision features.
- When using the vision function of the DJI drone to implement advanced applications, please add the driver and the third dependency library required by the application.
- The following installation steps take Manifold 2 as an example to introduce the steps to configure the development environment for developing applications using OSDK.
Keil MDK 5.22 and above (armcc 5.06)
After activating Keil MDK software, use Keil Pack Installer or <a href="http://www.keil.com/dd2/Pack/"target="_blank"> manual download the latest STM32F4xx_DFP.2.xx Driver package, as shown in Figure 2. Install Pack package.
Figure 2. Install Pack