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.

circle-info

Note that: The recommended choice of USB to TTL cable is FT232 module.

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

1

Installing gTune app

2

Ensure gimbal firmware is updated to the latest version.

3

Configure Linux Development Environment

4

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.

5

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

  1. Make sure you have followed the steps in the Hardware Setup Guide to get your connection right.

  2. 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

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

Run the example executable on the host shell:

To stop the program, use the key sequence Ctrl-C.

chevron-rightHere's an example output:hashtag

Last updated

Was this helpful?