Skip to content

Instantly share code, notes, and snippets.

View knorth55's full-sized avatar
🎓
三十而立

Shingo Kitagawa knorth55

🎓
三十而立
View GitHub Profile
percol-search-travis-history() {
if [ "$READLINE_LINE" = "travis logs " ]; then
local l=$(travis history --limit 20 | percol | sed -e "s/#\([0-9]\+\).*/\1/g")
READLINE_LINE="$READLINE_LINE$l"
READLINE_POINT=${#READLINE_LINE}
elif [ "$READLINE_LINE" = "travis open " ]; then
local l=$(travis history --limit 20 | percol | sed -e "s/#\([0-9]\+\).*/\1/g")
READLINE_LINE="$READLINE_LINE$l"
READLINE_POINT=${#READLINE_LINE}
fi
@knorth55
knorth55 / 32FC1_depth_image_to_uint8.cpp
Last active May 23, 2018 12:25
Processing 32FC1 image by pixel, convert it to uint8 array and put data in to ROS sensor_msgs/Image
sensor_msgs::Image depth_image;
std::vector<uint8_t> depth_image_vector;
int32_t width = 320; // width example
int32_t height = 240; // height example
float* depth_data; //original data
depth_image.step = 4*width; // one pixel data size of 32FC1 is 4 bytes;
for (int count=0; count < width * height; count++)
{
@knorth55
knorth55 / cube-vertices.l
Last active June 22, 2016 03:55
roseus cube vertices bug
(let (cube)
(setq cube (make-cube 100 200 300))
(send cube :locate #f(100 200 300))
(setq *local-vertices* (send cube :vertices)))
(setq *cube* (make-cube 100 200 300))
(send *cube* :locate #f(100 200 300))
(setq *global-vertices* (send *cube* :vertices))
#!/bin/bash -e
LINUX_BRANCH=$1
# Obtain and apply Ubuntu patches
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/$LINUX_BRANCH/SOURCES
THE_BRANCH=`echo $a | awk 'NF>1{print $(NF-1)}' SOURCES`
# Obtain Linux Kernel sources
(dolist (sym (mapcar #'car (methods))) (print (format nil "~A" sym)))
(defun read-file-into-string (filename)
(with-open-file (f filename :direction :input)
(let (buf (str-list nil))
(while (setq buf (read-line f nil))
(setq str-list (append str-list (list (format nil buf)))))
(reduce #'(lambda (x y) (concatenate string x y)) str-list))))
(read-file-into-string "sample.json")
(require :json-decode "package://roseus_mongo/euslisp/json/json-decode.l")
(defun read-file-into-string (filename)
(with-open-file (f filename :direction :input)
(let (buf (str-list nil))
(while (setq buf (read-line f nil))
(setq str-list (append str-list (list (format nil buf)))))
(reduce #'(lambda (x y) (concatenate string x y)) str-list))))
(defun read-json-into-string (filename)
(json::parse-from-string (read-file-into-string filename)))
for f in *.so; do ldd $f | grep pcl | grep 1.7 ; done
<launch>
<node name="interactive_adjust_kiva_pod"
pkg="jsk_interactive_marker" type="marker_6dof">
<rosparam command="load" file="$(find jsk_2015_05_baxter_apc)/config/kiva_pod_interactive_marker.yaml" />
</node>
<node name="publish_bin_boxes"
pkg="jsk_apc2016_common" type="publish_bin_bbox.py">
<remap from="~boxes" to="~output" />
<rosparam file="$(find jsk_apc2016_common)/config/bin_upper_shelf.yaml" command="load" ns="upper_shelf"/>
<rosparam file="$(find jsk_apc2016_common)/config/bin_lower_shelf.yaml" command="load" ns="lower_shelf"/>
- git:
local-name: FOR_MOVEIT/moveit
uri: git://github.com/ros-planning/moveit.git
version: indigo-devel
- git:
local-name: FOR_MOVEIT/moveit_robots
uri: https://github.com/ros-planning/moveit_robots.git
version: indigo-devel
- git:
local-name: FOR_MOVEIT/moveit_python