Development Workflow
Prerequisites
To build an SDK based application the following are required
Programming experience C/C++.
A compatible gimbal.
Your Onboard Computer with an available TTL UART port.
Software tool to build the SDK .
PC to run the required software tool.
Hardware setup guide
Connect the COM2 cable to your Onboard Computer. The hardware connection between gimbal and PC or Linux machine.

The onboard computer communicates to the Gimbal through a UART interface.
Power can be drawn directly from the COM2 port (1A max@5V).
The UART electrical interface for all SDK compatible Gremsy Gimbal is 3.3 volt TTL.
You must ensure that your onboard computer UART port operates at the same voltage to avoid damaging the Gimbal Controller.
For example, RS-232 ports will need a level-shifting circuit.
The UART interface does not require power from the onboard computer.
Connecting to your Onboard Computer
The diagram below shows the hardware connection between a GIMBAL and a PC or LINUX machine. Note that:
The recommended choice of USB to TTL cable is the FT232 module.
Baud rate: 115200
Bit data: 8 bits
Parity: No Parity

Software Environment Setup Guide
This guide details the software environment needed to work with the SDK
Download the gSDK and Required tools
Installing gTune app
Ensure gimbal firmware is updated to the latest version.
Configure Linux Development Environment
Install Development Tools
To build standalone Linux applications based on the gSDK, you need:
A supported C++ compiler.
A bash shell.
A modern Linux distribution.
Add UART Permissions
Please follow the steps below to add UART read and write permissions for users specified in Linux:
Use the
sudo usermod -a -G dialout $ USER
command to add the user to the dialout group.After logging in to the added account again, the account can obtain UART read and write permissions.
Setting up samples
Before you start
Make sure you have followed the steps in the Hardware Setup Guide to get your connection right.
Follow the steps in the Environment Setup guide to get your software ready to run samples.
Run the sample on the Linux.
This is a simple MAVLink to UART interface example for Linux systems that can allow communication between a gimbal and an Onboard Computer.
This example will receive Mavlink messages from the gimbal and send MAVLink messages for controlling and setting the gimbal.
Building the gSDK and running the example.
Building
$ cd gSDK/
$ mkdir build && cd build
$ cmake ..
$ make
Execution
An FTDI cable will show up on a ttyUSB*
. Run the example executable on the host shell:
You have to pick a port name; try searching for it with
$ ls /dev/ttyACM*
$ ls /dev/ttyUSB*
Run the example executable on the host shell:
$ cd gSDK/
$ ./gSDK -d /dev/ttyUSB0
To stop the program, use the key sequence Ctrl-C
.
Last updated
Was this helpful?