Payload SDK for Python

Overview

The Gremsy Payload SDK provides a comprehensive Python interface for controlling and communicating with Gremsy payload systems. This SDK enables developers to integrate payload functionality into their applications with support for camera control, gimbal operations, GPS data transmission, and advanced features like object tracking.

Supported Hardware

  • Computing Platforms:

    • Ubuntu PC (x86_64)

    • NVIDIA Jetson (aarch64)

    • Raspberry Pi

    • Qualcomm RB5165

Supported Payloads

Payload Model
Minimum Firmware Version
Status

VIO Payload

v2.0.0 or higher

✅ Fully Supported

ZIO Payload

v2.0.0 or higher

⚠️ Limited Support

GHardron Payload

v2.0.0 or higher

⚠️ Limited Support

Python Compatibility: 3.7, 3.8, 3.9, 3.10, 3.11, 3.12

Installation

1. Clone the Repository

2. Setup Python Environment

Option A: Using Conda (Recommended)

Option B: Using Virtual Environment

Project Structure

Configuration

All configuration is centralized in libs/config.py. The SDK automatically sets up the environment when imported.

Connection Configuration

UDP Connection (Default)

UART/Serial Connection

The SDK uses MAVLink 2.0 by default for enhanced features and security:

Advanced Configuration Options

  • Camera Settings: Zoom/focus types, capture intervals, recording parameters

  • Gimbal Settings: Angle limits, movement speeds, calibration parameters

  • Communication: Timeouts, message rates, heartbeat intervals

  • Debug Options: Logging levels, error reporting, diagnostic output

Quick Start

Basic Connection Test

Example Usage in Your Code

Example Applications

Camera Control

Gimbal Operations

Advanced Features

Key Features

🔧 Centralized Configuration

  • Single configuration file for all settings

  • Automatic environment setup

  • Parameter validation and error checking

  • Easy IP/port changes without code modification

🔗 Robust Connection Management

  • Automatic connection detection and validation

  • Support for both UDP and UART connections

  • Connection timeout and retry mechanisms

  • Graceful error handling and recovery

📷 Comprehensive Camera Control

  • Image capture and video recording

  • Zoom and focus control (EO and IR cameras)

  • Camera mode switching and settings management

  • Storage management and media download

🎯 Advanced Gimbal Control

  • Precise angle and speed-based movement

  • Multiple control modes (lock, follow, mapping)

  • Automatic calibration procedures

  • Real-time attitude feedback

🤖 AI-Powered Features

  • Object detection and tracking

  • Smart tracking with bounding box control

  • Real-time tracking status feedback

📡 Data Integration

  • GPS position transmission

  • System time synchronization

  • Custom parameter streaming

  • Real-time telemetry data

Troubleshooting

Connection Issues

UDP Connection Problems:

UART Connection Problems:

Common Error Solutions

Error
Solution

ModuleNotFoundError: No module named 'config'

Ensure you're running from correct directory and libs path is set

AttributeError: 'NoneType' object has no attribute 'recv_match'

Connection failed - check network/serial connection

No payload detected after X seconds

Verify payload is powered on and network is accessible

Permission denied: '/dev/ttyUSB0'

Add user to dialout group or use sudo

Debug Mode

Enable detailed logging by modifying libs/config.py:

API Documentation

For detailed API documentation, function parameters, and advanced usage examples, see:

Support and Contact

  • Technical Documentation: See PayloadSDK.md for detailed API reference

  • Example Code: Check the examples/ directory for implementation patterns

  • Configuration Help: Review libs/config.py for all available settings

  • Issue Reporting: Contact Gremsy technical support team

Version Information

  • SDK Version: 3.0.0_build.27052025

  • MAVLink Protocol: 2.0 (with 1.0 compatibility)

  • Supported Software: v2.0.0 and higher

Last updated

Was this helpful?