Skip to content

Instantly share code, notes, and snippets.

@yoneken
yoneken / ubx2velodyne.py
Created August 12, 2022 10:36
This script transports NMEA messages from a u-blox module to a Velodyne LiDAR.
import socket
from pyubx2 import UBXReader
from pynmeagps.nmeamessage import NMEAMessage
st_ubx = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
st_ubx.connect(("localhost", 2001)) # RTKLIB's strsvr or something
st_vel = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
ubr = UBXReader(st_ubx, protfilter=7)
@yoneken
yoneken / cam_stream.py
Last active April 6, 2022 13:34
Tipron scripts
from urllib.request import Request, urlopen
import json
from socket import socket, AF_INET, SOCK_DGRAM
import cv2
import numpy as np
SELF_IP = '192.168.0.102'
TIPRON_IP = '192.168.0.106'
RECEIVE_PORT = 8082
@yoneken
yoneken / readDynPick.py
Last active August 23, 2021 16:31
Minimum sample code to read from a DynPick 6-axis force sensor.
# coding: utf-8
import serial
import time
def calibration(s):
s.write(str.encode('p'))
time.sleep(0.1)
reply = s.read(100).decode("shift_jis")
s_calib = reply.split(",")
return [float(s) for s in s_calib]
@yoneken
yoneken / mimic_parallel_link.urdf
Created January 14, 2015 18:31
This file is a urdf which mimics a parallel linkage.
@yoneken
yoneken / remove_CLI_tools.sh
Created August 7, 2012 11:03
Xcode Command Line Tools Uninstaller
# remove_CLI_tools.sh
# written by cocoanetics:http://www.cocoanetics.com/2012/07/you-dont-need-the-xcode-command-line-tools/
# modified by yoneken
#!/bin/sh
RECEIPT_FILE1=/var/db/receipts/com.apple.pkg.DevSDK.bom
RECEIPT_PLIST1=/var/db/receipts/com.apple.pkg.DevSDK.plist
RECEIPT_FILE2=/var/db/receipts/com.apple.pkg.clang.bom
RECEIPT_PLIST2=/var/db/receipts/com.apple.pkg.clang.plist
@yoneken
yoneken / kicad-macosx.patch
Last active October 31, 2019 22:31 — forked from jboone/kicad-boost-polygon-sort-adaptor.patch
KiCAD and wxWidgets patches to build on Mac OS X and add jboone's hacked-in "magnify" touchpad support
=== modified file 'common/drawpanel.cpp'
--- common/drawpanel.cpp 2013-02-21 20:53:50 +0000
+++ common/drawpanel.cpp 2013-09-02 15:14:40 +0000
@@ -870,6 +870,42 @@
wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED );
cmd.SetEventObject( this );
+ int x, y;
+ GetViewStart( &x, &y );
+
@yoneken
yoneken / icarbot_test.cpp
Last active September 11, 2019 02:51
Test application to control icarbot through btle.
/*
*
* ROS iCarbot driver
*
* Copyright (C) 2017 Kenta Yonekura <yoneken@ieee.org>
*
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@yoneken
yoneken / console.out
Created March 11, 2015 13:24
hector_slam does not provide map..
catkin yoneken$ roslaunch hector_slam_example hector_hokuyo_eth.launch
... logging to /Users/yoneken/.ros/log/474a123a-c7f1-11e4-873a-600308a9ac9c/roslaunch-***.***.***.***-42487.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
started roslaunch server http://***.***.***.***:62399/
SUMMARY
========
@yoneken
yoneken / 2_2.py
Created February 5, 2017 14:26
Answer of Probabilistic Robotics Exercise 2-2
#!/usr/local/bin/python
import random
import collections
(
Sunny,
Cloudy,
Rainy,
) = range(0, 3)
@yoneken
yoneken / setup.bash
Created January 26, 2016 07:16
Setup ROS environment variables on OSX
export ROS_MASTER_URI=http://localhost:11311
export ROS_IP=`ifconfig en0 | grep 'inet ' | sed -e 's/^.*inet //' -e 's/ .*//'`