Skip to content

Instantly share code, notes, and snippets.

View hauptmech's full-sized avatar

Hauptmech hauptmech

View GitHub Profile
@hauptmech
hauptmech / example.cpp
Last active December 5, 2015 18:30
Rough single process multi-thread robot control
#include <boost/circular_buffer.hpp>
#include <thread>
#include <mutex>
struct sense_packet {
uint16_t pressure;
uint8_t bus_voltage;
};
boost::circular_buffer<sense_packet> sense_buff(2);
std::mutex sense_mutex;
@hauptmech
hauptmech / aur_in_dependency_order.bash
Last active January 18, 2016 09:27
List AUR packages in dependency order so that they can be rebuilt
#!/bin/bash
#
# Get all AUR dependencies in the order which they must be built.
#
# Author: hauptmech@gmail.com
# Keep track of packages we've seen already
declare new_pkg=''
# Only dive deeper if we haven't seen this pkg before
@hauptmech
hauptmech / aruco_test.py
Created July 15, 2016 07:05
Quick test of aruco with python
import numpy as np
import cv2
cap = cv2.VideoCapture(0)
#dictionary = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_5X5_1000)
dictionary = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_4X4_50)
#dictionary = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_ARUCO_ORIGINAL)
while(True):
# Capture frame-by-frame
@hauptmech
hauptmech / PKGBUILD
Created July 30, 2016 08:10
ros-indigo-moveit-ros-planning patch
# Script generated with import_catkin_packages.py
# For more information: https://github.com/bchretien/arch-ros-stacks
pkgdesc="ROS - Planning components of MoveIt that use ROS."
url='http://moveit.ros.org'
pkgname='ros-indigo-moveit-ros-planning'
pkgver='0.6.5'
_pkgver_patch=0
arch=('any')
pkgrel=4