Skip to content

Instantly share code, notes, and snippets.

View rosterloh's full-sized avatar

Richard Osterloh rosterloh

View GitHub Profile
@rosterloh
rosterloh / help.log
Created May 6, 2023 16:29
ROS Iron testing for #829
rosterloh@gardinbot:~$ ros2 -h
usage: ros2 [-h] [--use-python-default-buffering] Call `ros2 <command> -h` for more detailed usage. ...
ros2 is an extensible command-line tool for ROS 2.
options:
-h, --help show this help message and exit
--use-python-default-buffering
Do not force line buffering in stdout and instead use the python default buffering, which might be affected by PYTHONUNBUFFERED/-u and depends on whatever stdout is interactive or not
@rosterloh
rosterloh / index.yaml
Last active February 14, 2023 07:54
Mixin to optimise builds for Raspberry Pi 4
mixin:
- tune-pi4.mixin
@rosterloh
rosterloh / test.py
Last active September 21, 2021 09:43
Cli application to test dynamixel servos
import atexit
import argparse
from datetime import datetime, timedelta
from dynamixel_sdk import PortHandler
from dynamixel_sdk.robotis_def import COMM_SUCCESS
from dynamixel_sdk.packet_handler import PacketHandler
import logging
from logging.handlers import TimedRotatingFileHandler
import os
import sys
@rosterloh
rosterloh / Control.srv
Last active July 29, 2021 08:54
MicroROS zephyr demo
uint8 module # module to control
uint8 command # value to set
---
bool success # indicate successful run of triggered service
import cv2
import numpy as np
from datetime import datetime
import array
import fcntl
import os
import argparse
from utils import ArducamUtils
import Jetson.GPIO as GPIO
from time import sleep
@rosterloh
rosterloh / covid-19.service
Created March 27, 2020 16:03
COVID-19 tracker on a PiminiTFT
[Unit]
Description=COVID-19 Tracker Service
After=multi-user.target
[Service]
User=pi
Type=simple
WorkingDirectory=/home/pi/CovidTracker
ExecStart=/usr/bin/python3 /home/pi/CovidTracker/main.py --update 3600
Restart=on-failure
[Unit]
Description=Jupyter Notebook Service
[Service]
Type=simple
User=user
ExecStart=/bin/sh -c "jupyter lab --ip=0.0.0.0 --no-browser"
WorkingDirectory=/home/user
Restart=always
@rosterloh
rosterloh / OscScreenGrabLAN.py
Created July 15, 2019 09:10
python OscScreenGrabLAN.py png|bmp|csv oscilloscope_IP
#!/usr/bin/env python3
"""Take screen captures from DS1000Z-series oscilloscopes
This program captures either the waveform or the whole screen of a Rigol
DS1000Z series oscilloscope, then saves it on the computer as a CSV, PNG
or BMP file.
The program uses the LXI protocol, so the computer must have a LAN
connection with the oscilloscope.
"""
#!/bin/sh
if [ -z "$SCOPE_IP" ]; then
echo "Need to set SCOPE_IP"
exit 1
fi
if [ -z "$1" ]; then
echo "Need to pass filename (without extension) as argument"
exit 1
#!/usr/bin/env bash
# 2019 Michael de Gans
set -e
# change default constants here:
readonly PREFIX=/usr/local # install prefix, (can be ~/.local for a user install)
readonly DEFAULT_VERSION=4.1.0 # controls the default version (gets reset by the first argument)
readonly JOBS=1 # controls the number of jobs
# (recommend leaving JOBS to 1 since each `cc1plus` process towards the end of