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 / GeometrySample.cpp
Created March 16, 2013 10:46
行列演算ライブラリEigenのGeometry関連(回転行列, クォータニオン)の関数サンプルプログラム
/*
FileName: GeometrySample.cpp
Discription: EigenのGeometry関連の関数のサンプル
Author: Atsushi Sakai
Update: 2013/03/16
@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 / ReductionSample.cpp
Created March 23, 2013 11:24
行列演算ライブラリEigenの換算(Reduction)関連(平均,最大値,最小値,各行・列への演算)の関数サンプルプログラム
/*
FileName: ReductionSample.cpp
Discription:行列演算ライブラリEigenの換算関数のサンプル
Author: Atsushi Sakai
Update: 2013/03/23
@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
//
@AtsushiSakai
AtsushiSakai / BayesianFilter1D.m
Last active December 20, 2015 20:29
一次元の変数のガウス分布に基づくベイズ推定のサンプルプログラム
% -------------------------------------------------------------------------
%
% File : BayesianFilter1D.m
%
% Discription : 1 dimentioanl Bayesian Filter Sample Program
%
% Environment : Octave (Matlab)
%
% Author : Atsushi Sakai
%
@AtsushiSakai
AtsushiSakai / MartinGardnerSolver.py
Last active December 21, 2015 01:48
マーティン・ガードナーの最難問を解くPython Script
#coding:utf-8
'''
マーティン・ガードナーの最難問を解くPython Script
解けるかな? 史上最難問10題 : ギズモード・ジャパン http://www.gizmodo.jp/2013/08/_so_you_th.html?utm_source=rss20&utm_medium=rss
ある数の粘度は、すべての桁を掛けて出る答えが1桁になるまでにかかる積算の回数で表す。
それぞれの桁の数を掛け算して出るのが2番目の数で、そのまた全桁の数を掛けて出るのが3番目の数…こうして1桁の数が出るまでやり、
出るまでに重ねた掛け算の回数を数えるのだ。
例えば、77は粘度4だ。なぜなら1桁になるまで4回掛け算しなきゃならないからね(77-49-36-18-8)。
@AtsushiSakai
AtsushiSakai / TcpLib.hpp
Last active August 9, 2018 17:30
LinuxにおけるTCPソケット通信を利用したプロセス間通信用
/**
@file: TcpLib.hpp
@brief:Linux用TCP通信サーバ用ライブラリ
ユーザが使用するクラス
1.TcpServer サーバ用
2.TcpClient クライアント用
@note TcpMasterクラスは、サーバとクライアントの
共通変数・関数用クラスなので