Documentation/Allspark2-Orin NX WikiEnglish · NX
Browse documentation
12 Application Examples

12.1 DJI PSDK

The DJI PSDK kit includes a DJI PSDK version of the onboard computer, a DJI PSDK adapter board, and a mounting bracket. The DJI PSDK kit makes it easy to combine AMOVLAB's high…

4 min read · English documentation

I. DJI PSDK Kit Introduction

The DJI PSDK kit includes a DJI PSDK version of the onboard computer, a DJI PSDK adapter board, and a mounting bracket. The DJI PSDK kit makes it easy to combine AMOVLAB's high-performance edge onboard computer with DJI's industry-leading flight platforms, providing a simple and complete DJI PSDK hardware development platform. Developers can use basic functions provided by the DJI PSDK API, such as information acquisition, data transmission, and power management, as well as advanced functions such as camera, gimbal, payload coordination, and precision positioning. Various recognition and control algorithms can be deployed on the onboard computer according to industry application requirements to improve the intelligence of the UAV. Typical applications include indoor flight, automated inspection, and intelligent image recognition and tracking.

Onboard Computer DJI Aircraft Aircraft Role Communication Connection
Allspark2-Orin NX M300 Device USB, serial
Allspark2-x86 M300 Device USB, serial
Allspark2-Orin NX M350/M30 Host Ethernet (ETH), serial
Allspark2-x86 M350/M30 Host Ethernet (ETH), serial

II. Hardware Installation Instructions

1. The DJI PSDK adapter board interfaces are detailed below:

图片.png

图片.png

2. M30/M350 and Allspark2-Orin NX Connection Diagram

图片.png

3. M300 and Allspark2-Orin NX Connection Diagram

图片.png

Note

When connecting the serial port, connect TX, RX, and GND as shown below:

图片.png

4. DJI PSDK Kit Installation Procedure (M30 Example)

Step 1: Confirm that the DJI PSDK package contains the following items

图片.png

Step 2: Confirm that the DJI PSDK ribbon cable is connected as shown and that the slide switch points in the direction indicated by the red arrow

图片.png

Step 3: Install the M3*15+4 hex standoffs on the UAV

图片.png

Note

Use a socket wrench to secure the standoffs firmly to the aircraft.

Step 4: Secure the AMOVLAB DJI PSDK adapter board to the aircraft with M3*8 screws.

图片.png

Note

Confirm that the orientation of the DJI PSDK adapter board relative to the aircraft and the cable routing direction match the figure.

Step 5: Install the onboard computer on the DJI PSDK adapter board and secure it with M3X8 screws

图片.png

Note

1. As shown, make sure the onboard computer's cooling air outlet faces the rear of the aircraft.

2. Use pliers to tighten the nut and screw. (Pliers are also required to hold the nut during removal.)

Step 6: Connect the communication cables as shown below

图片.png

Step 7: Power on and verify. The Allsaprk2-Orin NX starts automatically when power is applied

Note

1. If power is not supplied, refer to Step 2. Check whether the DJI PSDK coaxial cable is inserted in the wrong orientation, confirm that the silkscreen orientation is correct, and confirm that the slide switch is in the Power On position.

2. If the communication connection is incorrect, confirm that all three slide switches are in the correct positions and that the serial cable is connected to UART2.

Video Reference

III. Allspark2-Orin NX DJI PSDK Software Activation and Demo

Preparations:

  1. Check the runtime environment:
sudo apt install cmake
sudo apt install ffmpeg
sudo apt install build-essential

To receive a video stream, you must also install openCV. You can run openCV-version to check whether openCV is installed in the environment.

  1. Configure the IP address:

If you use ETH to connect to the DJI PSDK, configure an IP address. For example, the M30 IP address is 192.168.90.2. Follow these steps:

A. Open Settings and locate Network.

B. Click the plus sign at the top to add a network.

C. M30 IP: 192.168.90.2;

M350 IP: 192.168.100.2;

The M300 connects via USB.

图片.png

D. Select manual IP address entry (enter the IP address for the applicable aircraft model).

图片.png

Note

If video streaming becomes stuck: 1. Connect to Wi-Fi. 2. Switch the network connection.

Software Activation Procedure:

  1. Download the PSDk source code software (if there is no Amovlab_Dji_PSDK directory under /home/amov). Use the following command to enter root mode:
sudo su
  1. Enter Amovlab_PSDK.

  2. Run Amov_LaunchPSDK.sh.

./Amov_LaunchPSDK.sh

图片.png

  1. Press 3 to clear the cache.

图片.png

  1. Press 2 to compile DJI PSDK.

图片.png

Demo:

  1. Press 1 to run DJI PSDK.

图片.png

  1. Enter c to select Camera stream view sample; enter 0 to select Normal RGB image display.

图片.png

  1. Enter 1 to select Main camera (the UAV gimbal camera). The onboard computer receives video from the Main camera, indicating that the communication link between the DJI UAV and the onboard computer is operating normally and is ready for use.

图片.png

图片.png

图片.png

The following shows AMOVLAB SpireCV software recognizing a QR code using a DJI aircraft.

图片.png

Note

For DJI PSDK application development, refer to the following links:

For a DJI UAV PSDK tutorial, refer to the DJI official website

DJI SDK Technical Support Forum

DJI PSDK API

For the onboard computer (X86) Wiki, refer to the AMOVLAB official website

For the onboard computer (ORIN) Wiki, refer to the AMOVLAB official website

AMOVLAB Onboard Computer Forum

AMOVLAB Official Website