Skip to content

Instantly share code, notes, and snippets.

Ryohei Ueda garaemon

Block or report user

Report or block garaemon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@garaemon
garaemon / settings.json
Created Apr 25, 2020
C++ settings for customize-indentation-rules extension
View settings.json
"customizeIndentationRules.rules": [
{
"language": "cpp",
"increaseIndentationPattern": "^.*\\{[^}\"\\']*$|^.*\\([^\\)\"\\']*$|^\\s*(public|private|protected):\\s*$|^\\s*@(public|private|protected)\\s*$|^\\s*\\{\\}$",
"decreaseIndentationPattern": "^\\s*(\\s*/[*].*[*]/\\s*)*\\}|^\\s*(\\s*/[*].*[*]/\\s*)*\\)|^\\s*(public|private|protected):\\s*$|^\\s*@(public|private|protected)\\s*$"
}
]
View init.el
(use-package gist :ensure t
:bind
(("C-c C-g" . gist-region-or-buffer))
)
View init.el
(defun ros-catkin-make (dir)
"Run catkin_make command in DIR."
(interactive (list default-directory))
;; clear compilation buffer first not to occupy memory space.
(if (get-buffer "*catkin_make*")
(kill-buffer "*catkin_make*"))
(let* ((default-directory dir)
(compilation-buffer-name-function (lambda (major-mode-name) "*catkin_make*")))
(compile "catkin bt --no-status"))
(switch-to-buffer-other-window (get-buffer-create "*catkin_make*"))
@garaemon
garaemon / emacs-gc.el
Last active Aug 3, 2019
emacsのGCのしきい値を増やし, 入力がないときにGCを走らせる
View emacs-gc.el
;; Increase threshold to fire garbage collection
(setq gc-cons-threshold 1073741824)
(setq garbage-collection-messages t)
;; Run GC every 60 seconds if emacs is idle.
(run-with-idle-timer 60.0 t #'garbage-collect)
@garaemon
garaemon / wstool-chekcout-default.sh
Created Mar 8, 2019
Checkout default branch for all the repositories under catkin workspace
View wstool-chekcout-default.sh
#!/bin/bash
wstool foreach "bash -c 'git symbolic-ref refs/remotes/origin/HEAD | sed s@^refs/remotes/origin/@@ | xargs git checkout'"
@garaemon
garaemon / helm-ros.el
Last active Feb 10, 2019
catkin packages helm source
View helm-ros.el
(let ((cmake-prefix-path (getenv "CMAKE_PREFIX_PATH")))
(when cmake-prefix-path
(setq helm-source-catkin-root
(format "%s/../src" (car (split-string cmake-prefix-path ":"))))))
(defun helm-catkin-packages-list ()
(let ((string-output (shell-command-to-string (format "find %s -name package.xml -exec dirname {} \\\;" helm-source-catkin-root))))
(let ((dirs (split-string string-output "\n")))
dirs)))
@garaemon
garaemon / catkin.el
Created Feb 9, 2019
Run catkin build in emacs
View catkin.el
;; Based on https://www.seas.upenn.edu/~chaoliu/2018/03/12/ros-programming-in-emacs/#org8817889
(require 'ansi-color)
(defun endless/colorize-compilation ()
"Colorize from `compilation-filter-start' to `point'."
(let ((inhibit-read-only t))
(ansi-color-apply-on-region
compilation-filter-start (point))))
(add-hook 'compilation-filter-hook
#'endless/colorize-compilation)
@garaemon
garaemon / notify.py
Created Feb 7, 2019
Notify pull requests closed today on ros/rosdistro to slack
View notify.py
from datetime import datetime, timedelta
import slackweb
from github import Github
REPO = 'ros/rosdistro'
g = Github()
repo = g.get_repo('ros/rosdistro')
pulls = repo.get_pulls(state='closed', sort='created', direction='desc')
View robot_settingsjaxon_red.diff
diff --git a/VSProjects/TransHost/TransHost/robot_settingsjaxon_red.fs b/VSProjects/TransHost/TransHost/robot_settingsjaxon_red.fs
index a271e38..10c1cf8 100755
--- a/VSProjects/TransHost/TransHost/robot_settingsjaxon_red.fs
+++ b/VSProjects/TransHost/TransHost/robot_settingsjaxon_red.fs
@@ -36,13 +36,17 @@ let waist_default_motor_param =
let dgain48 = -10*16
(default_maxcurrent,default_motortemplimit,pgain48,dgain48)
-let leg_default_motor_param =
- let default_maxcurrent = 50us // 50 * 1.38105 = 69.1 [A]
View tracking.yaml
global:
layout: vertical
legend_font_size: 12
plots:
- title: geometry_msgs/TwistStamped
type: line
topic: [/particle_filter_tracker/output/velocity, /particle_filter_tracker/output/velocity, /particle_filter_tracker/output/velocity]
field: [twist/linear/x, twist/linear/y, twist/linear/z]
label: ["$v_x$", "$v_y$", "$v_z$"]
- title: std_msgs/Float32
You can’t perform that action at this time.