This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 第1回 Scheme コードバトン | |
;; | |
;; ■ これは何か? | |
;; Scheme のコードをバトンのように回していき面白い物ができあがるのを楽しむ遊びです。 | |
;; 次回 Shibuya.lisp で成果を発表します。 | |
;; Scheme 初心者のコードを書くきっかけに、中級者には他人のコードを読む機会になればと思います。 | |
;; | |
;; ■ 2 つのルール | |
;; | |
;; (1)自分がこれだと思える変更をコードに加えて2日以内に次の人にまわしてください。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<node pkg="amcl" type="amcl" name="amcl" machine="amcl-machine"> | |
<param name="odom_alpha1" value="5"/> <!-- dtheta -> x --> | |
<param name="odom_alpha2" value="10"/> <!-- dx -> theta --> | |
<param name="odom_alpha3" value="5"/> <!-- dx -> x --> | |
<param name="odom_alpha4" value="5"/> <!-- dtheta -> theta --> | |
<param name="odom_alpha5" value="5"/> <!-- slip --> | |
<param name="update_min_d" value="0.05"/> | |
<param name="update_min_a" value="0.1"/> | |
<!-- for AmclNode::uniformPoseGenerator bug --> | |
<param name="recovery_alpha_slow" value="0.000"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; utility functions to define class methods | |
(defun extract-argument-symbols (args) | |
(mapcar #'(lambda (x) (if (listp x) (car x) x)) args)) | |
(defun has-class-method-p (method class arguments) | |
(let ((methods (compute-applicable-methods method (cons class arguments)))) | |
(dolist (m methods) | |
(let ((specializers (closer-mop:method-specializers m))) | |
(if (typep (car specializers) 'closer-mop:eql-specializer) | |
(return-from has-class-method-p t)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require :closer-mop) | |
(defpackage :clap-metas) | |
(defclass clap-metas::clap-base--meta (standard-class) ()) | |
(defmethod closer-mop:ensure-class-using-class :around ((class null) name | |
&rest options | |
&key metaclass | |
direct-superclasses | |
&allow-other-keys) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun extract-argument-symbols (args) | |
(mapcar #'(lambda (x) (if (listp x) (car x) x)) args)) | |
(defconstant +built-in-class-instances-table+ | |
`((arithmetic-error . ,(make-condition 'arithmetic-error)) | |
...)) | |
(defun lookup-built-in-class-object (class) | |
(cdr (assoc class +built-in-class-instances-table+))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun enumerate-all-classes (&optional (result nil) | |
(prepended (list (find-class 't)))) | |
(if (null prepended) | |
result | |
(let ((subclasses (closer-mop:class-direct-subclasses (car prepended)))) | |
(let ((new-subclasses (remove-if | |
#'(lambda (c) | |
(member c (append prepended result))) | |
subclasses))) | |
(enumerate-all-classes (cons (car prepended) result) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 2.4.6) | |
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) | |
# Set the build type. Options are: | |
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage | |
# Debug : w/ debug symbols, w/o optimization | |
# Release : w/o debug symbols, w/ optimization | |
# RelWithDebInfo : w/ debug symbols, w/ optimization | |
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries | |
#set(ROS_BUILD_TYPE RelWithDebInfo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import roslib | |
roslib.load_manifest("sensor_msgs") | |
roslib.load_manifest("message_filters") | |
roslib.load_manifest("rxtools") | |
import rospy | |
import rxtools | |
import rxtools.rosplot | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require 'cairo' | |
require 'gtk2' | |
format = Cairo::FORMAT_ARGB32 | |
width = 300 | |
height = 200 | |
radius = height / 3 | |
window = Gtk::Window.new('Graph') | |
window.set_default_size(width, height) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define DICT(...) ([NSDictionary dictionaryWithObjectsAndKeys:__VA_ARGS__, nil]) | |
#define MDICT(...) ([NSMutableDictionary dictionaryWithObjectsAndKeys:__VA_ARGS__, nil]) | |
#define FORMAT(...) ([NSString stringWithFormat:__VA_ARGS__]) | |
#define ARRAY(...) ([[NSArray alloc] initWithObjects:__VA_ARGS__, nil]) | |
#define MARRAY(...) ([[NSMutableArray alloc] initWithObjects:__VA_ARGS__, nil]) | |
#define ASSOC(D, K) ([D objectForKey:K]) | |
#define PREDICATE(F, ...) ([NSPredicate predicateWithFormat:F, __VA_ARGS__]) | |
#define LOCALIZED_STRING(S) (NSLocalizedString(S, S)) | |
#define IS_VALID_STRING(s) (s && s != NULL && ![s isEqual:[NSNull null]]) | |
#define CG_RECT_MAKE_SHORT(N) (CGRectMake(N##_X, N##_Y, N##_WIDTH, N##_HEIGHT)) |
OlderNewer