Skip to content

Instantly share code, notes, and snippets.

(defun open-with-shiba ()
"open a current markdown file with shiba"
(interactive)
(start-process "shiba" "*shiba*" "zsh" "-ic" (format "shiba --detach %s" buffer-file-name))
)
(define-key markdown-mode-map (kbd "C-c C-c") 'open-with-shiba)
(make-irtviewer :draw-origin nil)
(setq *a* (make-cube 240 150 2))
(setf (get *a* :face-color) :yellow)
(send *irtviewer* :change-background (gl::find-color :white))
(objects (list *a*))
(send (send (send *irtviewer* :viewer) :viewsurface) :color (float-vector 1 0 0))
(dotimes (i 1000)
(dotimes (j 1000)
(let ((x (- (* 10 i) 200))
@garaemon
garaemon / 3d_footstep_algorithm.tex
Last active August 29, 2015 14:27
footstep algorithm
\begin{algorithm}
\caption{3-D Footstep Planning with A*}
\begin{algorithmic}
\STATE $O \Leftarrow <S>$
\STATE $C \Leftarrow \emptyset$
\WHILE{$O$}
\STATE $N \Leftarrow pop(O)$
\IF{$N$ is $G$}
\RETURN $path(N)$
\ENDIF
@garaemon
garaemon / footstep.l
Created August 9, 2015 10:21
Footstep projection
(make-irtviewer :draw-origin nil)
(setq *a* (make-cube 240 150 2))
(setq *b* (make-cube 240 150 2))
(setq *plane* (make-cube 300 200 1))
(send *b* :locate (float-vector 0 0 150) :world)
(send *b* :rotate (deg2rad 20) :y)
(setf (get *plane* :face-color) :green)
(gl::transparent *plane* 0.2)
(send *plane* :newcoords (send *b* :copy-worldcoords))
#!/usr/bin/env python
import xml.etree.ElementTree as ET
import sys
tree = ET.parse(sys.argv[1])
root = tree.getroot()
print root
def printRemappiing(node):
if len(node.findall("remap")) != 0:
@garaemon
garaemon / README.md
Last active August 29, 2015 14:25
Bond problem of nodelet
roslaunch test_connection3.launch
@garaemon
garaemon / README.md
Created July 20, 2015 17:01
ConnectionBasedNodelet race condition bug

terminal 1

roslaunch test_connection2.launch RESPAWN:=true

terminal 2

rostopic hz relay_19/output -w 10
<launch><node pkg="rostopic" type="rostopic" name="input"
args="pub /input std_msgs/String '{data: input}' -r 1">
</node>
<node pkg="jsk_topic_tools" type="relay" name="relay_0">
<remap from="~input" to="input" />
</node><node pkg="jsk_topic_tools" type="relay" name="relay_1">
<remap from="~input" to="relay_0/output" />
</node><node pkg="jsk_topic_tools" type="relay" name="relay_2">
<remap from="~input" to="relay_1/output" />
</node><node pkg="jsk_topic_tools" type="relay" name="relay_3">
#!/bin/sh
FORCE_SENSORS="/lfsensor /rfsensor /rhsensor /lhsensor"
IMAGES="/multisense_local/left/image_rect_color /multisense_local/right/image_rect_color /multisense/depth /multisense_local/left/camera_info /chest_camera/image_raw"
LASERS="/multisense/lidar_scan"
rosbag record /joint_states /imu ${FORCE_SENSORS} ${IMAGES} ${LASERS} -e '/motor_states.*' --duration=60
@garaemon
garaemon / plot_drc_timeline.py
Created July 13, 2015 13:57
drc timetable visualization
#!/usr/bin/env python
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
from matplotlib.dates import DateFormatter, MinuteLocator, SecondLocator
import csv
ax = plt.gca()
# ax.xaxis_date()
# myFmt = DateFormatter('%H:%M:%S')