OpenIPC / pyosd

OSD python app to run on MacOS

Home Page:https://openipc.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenIPC logo

pyosd

simple python OSD app for openipc groundstation to run on MacOS / Ubuntu

using gtk3.0 transparent window + pymavlink

work in progress

Installation

1. Install dependencies

$ pip3 install PyGObject pymavlink

2. Install gstreamer for playing video stream

This osd app could show only osd elements. so gstreamer is needed to play the video stream from air unit.

  • using homebrew on MacOS
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
$ brew install gstreamer
  • using apt-get on Ubuntu
$ sudo apt-get update
$ sudo apt-get install gstreamer1.0-tools gstreamer1.0-alsa \
 gstreamer1.0-plugins-base gstreamer1.0-plugins-good \
 gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly \
 gstreamer1.0-libav
$ sudo apt-get install libgstreamer1.0-dev \
 libgstreamer-plugins-base1.0-dev \
 libgstreamer-plugins-good1.0-dev \
 libgstreamer-plugins-bad1.0-dev 

3. Git clone this repository and run pyosd.py

$ git clone https://github.com/OpenIPC/pyosd.git
$ cd pyosd
$ python3 pyosd.py 

Usage

  1. udp packets of video and telemetry from air unit are needed ( running wfb-ng )

  2. playing video stream by gstreamer pipeline.

$ gst-launch-1.0 -vvvv udpsrc port=5600 ! application/x-rtp, payload=32, clock-rate=90000 ! queue max-size-buffers=1 \
! rtph265depay ! h265parse ! avdec_h265 ! autovideosink sync=false -e
  1. running pyosd.py on the pyosd directory
$ python3 pyosd.py 

*** If you want to use pyosd on Ubuntu, replacing the pymavlink connection from 'udpin:224.0.0.1:14550' to 'udpin:127.0.0.1:14550'

self.mavlink_connection = mavutil.mavlink_connection('udpin:127.0.0.1:14550')

*** If you want to use pyosd on MacOS, mulitcating the udp packets from utm virtual machine is needed. by replacing peer of video mavlink and video 'connect://224.0.0.1:14550' of utm virtual ubuntu-server.

$ sudo nano /etc/wifibroadcast.cfg
...
[gs_mavlink]
peer = 'connect://224.0.0.1:14550'  # outgoing connection
# peer = 'listen://0.0.0.0:14550'   # incoming connection

[gs_video]
peer = 'connect://224.0.0.1:5600'  # outgoing connection for
                                   # video sink (QGroundControl on GS)

*** when starting this app on MacOS, there are some gliches. then minimizing and re-maximizing window could be helpful.

Examples

  1. MacOS (14.2.1 Sonoma)
MacOS
  1. Ubuntu (23.10 mantic)
Ubuntu

About

OSD python app to run on MacOS

https://openipc.org

License:MIT License


Languages

Language:Python 99.5%Language:CSS 0.5%