Note: You will need a DJI lightbridge, a DJI remote controller, an ios/android phone to complete this tutorial.. This tutorial assumes that you have completed the previous tutorials: Getting Started.
(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Control through mobile Onboard SDK

Description: This tutorial talks about how to use the mobile onboard SDK to control vehicle with mobile phone via the ROS package.

Tutorial Level: INTERMEDIATE

Preparation

Before running the example code, please follow the Getting Started tutorial and have the A3/N3 hardware, dji_sdk node and the simulation up and running.

How to set up

Follow the procedures below to enable mobile onboard sdk app control.

Hardware setup

  • Connect your mobile device to the DJI remote controller.
  • Connect the lightbridge to your A3/N3 through the DBUS and RF port respectively. (How to setup the lightbridge). You should see the lightbridge's CTRL and VIDEO LED lights turned on.

http://devusa.djicdn.com/images/hardwaresetup/A3N3_2-903ab2a001.png

Software setup

Note: If the DJI GO app ask to link phone number while using the DJI assistant 2 simulator, change the Latitude and Longitude to your current position.

  • Install DJI GO app and DJI O-SDK on your mobile device.

  • Turn on the DJI remote control, open the DJI go app.
  • In either Inspire 1 or Matrice 100 page, tap on Camera.

    https://github.com/dji-sdk/Onboard-SDK-Doc/raw/dbeta/source/images/ROS/Mobile_comm_1.PNG

  • On top right corner of the screen, tap the ... icon. https://github.com/dji-sdk/Onboard-SDK-Doc/raw/dbeta/source/images/ROS/Mobile_comm_2.PNG

  • In side the Remote Controller Settings, scroll to bottom, and tap 'Linking Remote Controller' https://github.com/dji-sdk/Onboard-SDK-Doc/raw/dbeta/source/images/ROS/Mobile_comm_3.PNG

  • Press down the LINK button on the Lightbridge 2.
  • Tap OK when prompted "link RC?", the remote should sound, and the remote should connect to the lightbridge. The A3/N3 should appear in the DJI GO app.

    https://github.com/dji-sdk/Onboard-SDK-Doc/raw/dbeta/source/images/ROS/Mobile_comm_4.PNG https://github.com/dji-sdk/Onboard-SDK-Doc/raw/dbeta/source/images/ROS/Mobile_comm_5.PNG

  • Open the DJI mobile onboard sdk app, in the log, it should show 'Connection to new product succeeded'.

  • Back to the ROS device, open a new terminal, cd to your catkin workspace root directory, remember to 'catkin_make' and 'source devel/setup.bash'.

  • Type and enter
     $ rosrun dji_sdk_demo demo_mobile_comm
  • Input val 1, now you can use your mobile onboard sdk to take control of the vehicle.

Wiki: dji_sdk/Tutorials/The mobile communication sample code (last edited 2017-06-16 00:45:15 by jifeixu)