Skip to content

Instantly share code, notes, and snippets.

View naoki-mizuno's full-sized avatar

Naoki Mizuno naoki-mizuno

  • Kobe, Japan
  • 12:27 (UTC +09:00)
View GitHub Profile
@naoki-mizuno
naoki-mizuno / sands-start
Created May 15, 2018 11:50
SandS startup script
#!/bin/bash
if [[ -n $REMOTEHOST ]] || [[ -n $SSH_CONNECTION ]]; then
exit
fi
if [ -n "$( ps aux | grep -v grep | grep xcape )" ]; then
# xmodmap -e 'keycode 49=Escape asciitilde'
# xmodmap -e 'keycode 9=grave Escape'
killall xcape
#!/bin/bash
while (( $# > 0 )); do
case "$1" in
-*)
if [[ $1 == -- ]]; then
IGNORE_REST=true
shift
continue
elif [[ -n $IGNORE_REST ]]; then
#!/bin/bash
XAUTH=/tmp/.docker.xauth
if [ ! -f $XAUTH ]; then
xauth_list=$( xauth nlist :0 | sed -e 's/^..../ffff/' )
if [ ! -z "$xauth_list" ]; then
echo $xauth_list | xauth -f $XAUTH nmerge -
else
touch $XAUTH
fi
@naoki-mizuno
naoki-mizuno / cddis.py
Last active December 6, 2018 19:57
Script to output download link for MGEX data
#!/usr/bin/env python
import argparse
import datetime
import dateutil.parser
def parse_opts():
parser = argparse.ArgumentParser(add_help=False)
group = parser.add_mutually_exclusive_group(required=True)
#!/usr/bin/env python
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(style='darkgrid')
import os.path
import sys
#!/usr/bin/env python
# Plot in real time the data rate of the IMU sensor messages.
# This script was written in order to debug the IMU not outputting messages at
# the configurade rate of 200Hz.
import rospy
from sensor_msgs.msg import Imu
import numpy as np
@naoki-mizuno
naoki-mizuno / charuco_calib.py
Last active July 5, 2019 06:57
ChArUco calibration and detection from jpeg image files
#!/usr/bin/env python
import cv2
import numpy as np
import matplotlib.pyplot as plt
import glob
import random
import sys
@naoki-mizuno
naoki-mizuno / charuco_webcam.py
Last active October 28, 2023 00:23
ChArUco calibration and detection using a webcam
#!/usr/bin/env python
import cv2
import numpy as np
import matplotlib.pyplot as plt
import glob
import random
import sys
@naoki-mizuno
naoki-mizuno / rpy2q
Last active August 3, 2023 03:07
Convert roll, pitch, yaw to quaternion
#!/usr/bin/env python
import tf.transformations as tft
import numpy as np
import sys
import argparse
def parse_args():
@naoki-mizuno
naoki-mizuno / make_code.bash
Created January 15, 2020 07:33
jsk_rviz_plugins Pictogram code generator
#!/bin/bash
# Path to metadata/icons.yml
FONTAWESOME_YML=$1
# Path to pictogram_font_mapping.h
PICTOGRAM_FONT_MAPPING=$2
echo "Generating C++ code from $FONTAWESOME_YML"
./to_cpp_code.py $FONTAWESOME_YML > ./new_code.cpp