VSM for DJI platform (vsm-dji-onboard) implemented using VSM-SDK of Universal ground Control Software and DJI Onboard SDK.
VSM for DJI platform is implemented using C++ language (C++14 standard) and based on the UgCS VSM SDK.
VSM for DJI platform uses CMake as its build system to keep it platform-independent.
The VSM for DJI platform supports the next drones: A3、N3、M100、M210 V1、M600、M600 Pro, M210 V2.
The next DJI OSDK version 4.x is not supported right now, but it can be implemented. The DJI M300 RTK support will be implemented after changing OSDK to 4.x version.
Please follow the next instruction:
-
Install Docker application.
-
Checkout the current repository.
-
Checkout the branch "dev-dji-onboard-vsm" of UgCS VSM SDK from the repository https://github.com/ugcs/vsm-cpp-sdk.git.
-
Checkout the 3.9 tag for the DJI Onboard SDK from the repository https://github.com/dji-sdk/Onboard-SDK.git.
-
Build the docker container:
cd dji-onboard-vsm/docker-cross-armhf docker build . -t docker-cross-armhf
-
Build the dji-vsm-onboard:
6.1 Run the next command:
docker run -it -u root -v $work_dir/git/vsm-cpp-sdk:/vsm-cpp-sdk -v $work_dir/Onboard-SDK:/dji-onboard-sdk -v $work_dir/dji-onboard-vsm:/dji-onboard-vsm -v $work_dir/dji-onboard-vsm/out:/out docker-cross-armhf ./build.sh $architecture Where: $work_dir/git/vsm-cpp-sdk - path to the local copy of the https://github.com/ugcs/vsm-cpp-sdk $work_dir/Onboard-SDK - path to the local copy of the https://github.com/dji-sdk/Onboard-SDK.git $work_dir/dji-onboard-vsm - path to the local copy of the https://github.com/ugcs/dji-onboard-vsm.git $work_dir/dji-onboard-vsm/out - path to the output folder $architecture - select one of available architecture x86, arm64 or armhf
6.2 After successful build you will have two files in the output folder: vsm-dji-onboard and vsm-dji-onboard.conf.
Please follow the next instruction:
-
Checkout latest UgCS VSM SDK from the repository https://github.com/ugcs/vsm-cpp-sdk.git.
-
Compile vsm-dji-onboard
5.1 Clone the vsm-dji-onboard and common repositories:
git clone [email protected]:UgCS/vsm-cpp-common.git git clone [email protected]:UgCS/dji-onboard-vsm.git
5.2 Make and enter into build directory:
mkdir -p build/vsm-dji-onboard cd build/vsm-dji-onboard
5.3 Create make files:
cmake -DVSM_SDK_DIR=$HOME/install/opt/vsm-sdk -DPROTOBUF_INSTALL_DIR=~/vsm-cpp-deps/toolchain/linux/protobuf/ -DCOMMON_SOURCES=$HOME/vsm-cpp-common -G"Unix Makefiles" $HOME/vsm-dji-onboard
5.4 Launch the build:
If build suceeds you'll have vsm-ardupilot executable in current directory. cmake --build .
There is a configuration file in the sources: vsm.conf.
This file contains many settings with description, but for successfully connection, we need to set up the next settings:
vehicle.dji.app_id - DJI OSDK App IP, please find more info there https://developer.dji.com/onboard-sdk/
vehicle.dji.app_key - DJI OSDK App Key, please find more info there https://developer.dji.com/onboard-sdk/
vehicle.dji.serial - serial device port connected with DJI Autopilot. (ex. /dev/ttyUSB0 )
Please execute the next command:
vsm-dji-onboard --config vsm-dji-onboard.conf
After successful build and configuration, you could connect this vsm to UgCS server. Please run the server and vsm in the same network and your vehicle will be availiable in UgCS.