Skip to content

Instantly share code, notes, and snippets.

@vo
vo / forwarder.py
Last active May 22, 2020 09:47
mavlink packet inspector
from pymavlink import mavutil
import threading
connection = mavutil.mavlink_connection("udp:0.0.0.0:14592")
local = mavutil.mavlink_connection("udpout:127.0.0.1:14593")
def on_msg_from_uas(msg):
buf = msg.get_msgbuf()
local.write(buf)
@vo
vo / display-video.sh
Last active May 22, 2020 09:47
Raspberry Pi 3 B+ Auvidea B101 Gstreamer Pipeline Example
#!/bin/bash
gst-launch-1.0 udpsrc port=5801 ! 'application/x-rtp,payload=96,encoding-name=H264,clock-rate=(int)90000' ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! autovideosink sync=false
@FrankBuss
FrankBuss / emulator.cpp
Last active June 21, 2025 08:00
RISC-V emulator (RV32I only) in one C++ file
/*
See https://gitlab.com/nedopc/npc5/blob/master/emu-rv32i.c for the latest version, with more features and less bugs :-)
RISCV emulator for the RV32I architecture
based on TinyEMU by Fabrice Bellard, see https://bellard.org/tinyemu/
stripped down for RV32I only, all "gotos" removed, and fixed some bugs for the compliance test
by Frank Buss, 2018
Requires libelf-dev:
@AlexisTM
AlexisTM / mavros_gcs.py
Created November 23, 2018 15:49
Mavros GCS heartbeat simulation => Have status_recv message allowing calibration.
#!/usr/bin/env python2
from __future__ import division
import os
import glob
import rospy
from pymavlink import mavutil
from threading import Thread
from mavros_msgs.msg import Mavlink, StatusText
from mavros import mavlink
#!/bin/sh
sed "
s/title\s*=\s*{\(.*\)},*/%T \1/I
s/author\s*=\s*{\(.*\)},*/%A \1/I
s/publisher\s*=\s*{\(.*\)},*/%I \1/I
s/doi\s*=\s*{\(.*\)},*/%K \1/I
s/journal\s*=\s*{\(.*\)},*/%J \1/I
s/volume\s*=\s*{\(.*\)},*/%V \1/I
s/number\s*=\s*{\(.*\)},*/%N \1/I
s/pages\s*=\s*{\(.*\)},*/%P \1/I
@dbaldwin
dbaldwin / gist:351cd33710e212cbe274757b411f9f76
Last active June 19, 2023 18:01
MAVROS Experimentation w/ Pi and Nano
# PX4 launch command
roslaunch mavros px4.launch
# PX4 launch file (default fcu_url worked fine for Pi 4 running Ubuntu server)
https://github.com/mavlink/mavros/blob/master/mavros/launch/px4.launch
If using the mini USB connector on Pi 4 you can use the default fcu_url
<arg name="fcu_url" default="/dev/ttyACM0:57600" />
If using the telemetry 2 port on Pixhawk you need this.