Skip to content

Instantly share code, notes, and snippets.

View AtsushiSakai's full-sized avatar
:octocat:

Atsushi Sakai AtsushiSakai

:octocat:
View GitHub Profile
@AtsushiSakai
AtsushiSakai / MontyHall.py
Last active August 29, 2015 13:57
モンティ・ホール問題をシミュレーションするPythonプログラム
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# @brief モンティ・ホールゲームを指定した回数実施し、
# 勝った回数を比較するシミュレーションソフト
#
# @Author Atsushi Sakai
import random #乱数発生用
@AtsushiSakai
AtsushiSakai / RvizRuler.py
Last active August 29, 2015 13:58
RvizRuler plugin.xml
#!/usr/bin/env python
#-*- coding:utf-8 -*-
#
# @brief rviz上で定規の機能をするrqtモジュール
# @author Atsushi Sakai
import roslib
roslib.load_manifest('RvizRuler')
import os
import rospy
@AtsushiSakai
AtsushiSakai / DijkstraSample.m
Last active August 29, 2015 14:00
ダイクストラ法による最短経路探索プログラム
function [] = DijkstraSample()
%DijkstraSample() ダイクストラ法による最短経路探索プログラム
%
% Author: Atsushi Sakai
%
% Copyright (c) 2014, Atsushi Sakai
% All rights reserved.
% License : Modified BSD Software License Agreement
clear all;
@AtsushiSakai
AtsushiSakai / AStarSamle.m
Last active August 29, 2015 14:00
A*による最短経路探索MATLABプログラム
function [] = AStarSample()
%AStarSample() A*法による最短経路探索プログラム
%
% Author: Atsushi Sakai
%
% Copyright (c) 2014, Atsushi Sakai
% All rights reserved.
% License : Modified BSD Software License Agreement
clear all;
close all;
@AtsushiSakai
AtsushiSakai / Topics2CSV.py
Last active August 29, 2015 14:09
Topics2CSV
#!/usr/bin/env python
import rospy
import sys
import socket
import rosgraph
import roslib.message
def msgevalgen(pattern):
"""
Generates a function that returns the relevant field (aka 'subtopic') of a Message object
@AtsushiSakai
AtsushiSakai / GoldenSectionSample.m
Last active December 15, 2015 04:49
線形探索アルゴリズムの代表ロジックである黄金分割法のMATLABサンプル
% ------------------------------------------------------------------------
% Sample file of Golden section method for linear search
%
% file : GoldenSectionSample.m
%
% Latest Update: 2013/03/20
%
% Author : A.Sakai
%
% ----------------------------------------------------------------------------------
@AtsushiSakai
AtsushiSakai / tf_broadcaster_sample.cpp
Created March 23, 2013 23:47
座標変換ライブラリtfのBroadcast サンプルコード
#include "tf/transform_broadcaster.h"
//TF Broadcasterの実体化
tf::TransformBroadcaster glabal_robot_broadcaster;
//Robot位置と姿勢(x,y,yaw)の取得
double x=GetRobotPositionX();
double y=GetRobotPositionY();
double yaw=GetRobotPositionYaw();
@AtsushiSakai
AtsushiSakai / tf_listener_sample.cpp
Created March 23, 2013 23:49
座標変換ライブラリtfのlistenerサンプルコード
#include "tf/transform_listener.h"
tf::TransformListener tflistener;
//それぞれの座標系におけるレーザの点群のデータ変数
sensor_msgs::PointCloud laserPointsRobot;
sensor_msgs::PointCloud laserPointsGlobal;
//robot座標系におけるレーザ点群の情報の取得
laserPointsRobot=getLaserPoints();
@AtsushiSakai
AtsushiSakai / ExtendedKalmanFilterLocalization.m
Last active December 16, 2015 04:28
移動ロボットにおける拡張カルマンフィルタを使用した自己位置推定のサンプルプログラム
% -------------------------------------------------------------------------
%
% File : ExtendedKalmanFilterLocalization.m
%
% Discription : Mobible robot localization sample code with
% Extended Kalman Filter (EKF)
%
% Environment : Matlab
%
% Author : Atsushi Sakai
@AtsushiSakai
AtsushiSakai / EigenMatLib.h
Last active December 18, 2015 04:48
EigenMatLib.h : C++行列演算ライブラリEigenを使った,MATLABの便利関数を模倣したヘッダライブラリ.
//-------------------------------------------------------------------------
//
// File : EigenMatLib.m
//
// Discription : Eigen Library inspired by Matlab functions.
//
// Environment : C++
//
// Author : Atsushi Sakai
//