Sunday, August 31, 2008

Install NS-2 in ubuntu instantly

ubuntu 8.04にNS-2をインストールするためのパッケージを公開していた方がいました(ベルギーのルーヴァン大学の先生..たぶん).以前苦労して環境準備やソースコンパイルなどをしていたがこのパッケージを使用すれば一瞬で本当に何も必要なくインストールすることができてしまう.Linux不慣れの人でNS-2が必要とする人にはぜひ参考にしてみてください.やり方は以下のとおりです.

以下のリポジトリを自分のリポジトリリストに追加する.追加方法はリポジトリリストファイルに追加するか

[システム]→[システム管理]→[Synapticパッケージマネージャ]を選択し

[設定]→[リポジトリ]→[サードパーティソフトウェア]に下記の2つのリポジトリを追加

deb http://ppa.launchpad.net/wouterh/ubuntu hardy main
deb-src
http://ppa.launchpad.net/wouterh/ubuntu hardy main

次にコマンドラインで sudo apt-get update コマンドを実行し,最後に

sudo apt-get install ns nam

と実行すればNS-2がインストールされます.簡単でしょ!!

Saturday, August 30, 2008

ネットワークシミュレータOMNet++

提案したシステムに対してどのようにシミュレータを使うのかにいろいろ悩んでいる.OPNET,QualnetはOpensourceでないから使うには抵抗がある.NS-2はすごいことはわかっているし,使うつもりもあるし,根性も多少あるが,残りの大切な要素-時間はない.ネットで気になるもう一つのネットワークシミュレータがある.それはOMNet++です.詳細がわからないが,少なくともドキュメントのクラス継承,階層をみるとNS-2と違って,かなり統合的に開発されていることがわかる.NS-2は大きくなりすぎたかもしれない(なんかDebianとUbuntuの関係みたい).GUIは OPNETと似ている.
[追加: 2008-08-31 21:21] OMNet++とNS-2の比較はこちらです.
[追加: 2008-08-31 23:36] Comparision of Network Simulators
[追加: 2008-09-01 8:07 ] How to install OMNet++ on Window XP and 2000

http://www.omnetpp.org/

Friday, August 29, 2008

車の停止・制御距離

   空走期間(thinking distance)
+ 制御時間(braking distance)
----------------------------
停止距離(Stopping distance)

空走距離 = 速度/3600 × 0.75
制御距離 = 速度^2 / (2×9.8×摩擦係数)

摩擦係数(see 江守一郎「自動車事故工学」 p.45, Stopping Distance Cal)

路面・タイヤの状態 摩擦係数
乾燥アスファルト・コンクリート &タイヤ◎ 0.8
乾燥アスファルト・コンクリート &タイヤ○ 0.7
乾燥アスファルト・コンクリート &タイヤ△ 0.6
濡れたコンクリート 0.5
濡れたアスファルト 0.45-0.6
砂利道路 0.55
乾いた非舗装道路 0.65
濡れた非舗装道路 0.4-0.5
固くなった雪 0.15
0.07

空走時間:(高木典雄「自動車による業務上(重)過失致傷事件における過失の認定について」司法研究報告書21-2, p289)

  • 反射時間(preception time):0.4-0.5s(脇見運転+0.4-1,飲酒+0.1-0.2)
  • 踏替時間(human reaction time):0.2s
  • 踏込時間(vehicle reaction time):0.07s(乗用車),0.1s(バス,トラック)

制御時間:

  • 過渡時間:0.1s(乗用車),0.3s(バス,トラック)
  • 主制動時間:

時速60km/h (=16.7m/s)の場合:
16.7 x 0.75 + (16.7)^2 / (2 x 9.8 x 0.7) = 32.7 mの停止距離になる

危険を感じ,ブレーキが必要と判断した時点から,ブレーキペダルを踏み込んでブレーキが効き始める時点までの反応時間(空走時間)は通常人の平均的な反応時間は約0.75秒.

see also:
林洋「自動車事故鑑定学入門」
Jスタナードベーカー
松野う正徳外訳「自動車事故解析の方法」

基盤製作機

image
mini-CNC BLACK 1510
販売価格:99,800円
こんなものを10万以下で買えるなんて...もう買わなきゃ汗.基盤作り放題^^

Thursday, August 28, 2008

Traffic Simulator

Traffic simulatorを探すときにYoutubeで紹介されているいくつかのがあった.その中でUC-win/Roadはすごくよかった.かなりリアルのCGだがAPIなどの情報は不明,気になるV-V Comに使用できるかどうかはわからない.シミュレータ開発の参考材料としては最高.価格は予想通りの100万~(?)ぐらいーー;;今100万もあれば開発中の物理システムを完成できるかもT_T;

車のステアリング

Simple 3d cityscape with road traffic simulation

VIRGEOART - 3D Traffic Simulation, TURKEY

ChaosTraffic - early traffic tests (3)

Paramics - Traffic Simulation One

OKTAL driving simulator SCANeRII

Simax Driving Simulator www.simax.es

UC-win/Road

Wednesday, August 27, 2008

Synergyで日本語入力方法 -パッチは不要

Synergyで日本語入力(IMEオン/オフ)のキー[半角/全角・漢字]を押してもクライアントのPCでは反応しない.調べてみたらパッチを作っている方々はいたが,MacとかLinuxでは必要だがWindowsでは必要がない.なぜならIMEの設定で[半角/全角・漢字]キー以外に別のキーを割り当てればよい,例えばCtrl+JでIMEオン/オフにすればよい.簡単だし,パッチ使用しなくてもよい.

[8/27/2008 10:13:13 AM]

Wednesday, August 20, 2008

Robot parts




ロボサイトギヤモータ(RA250015-58Y91)
商品番号 2340104798990
価格 1,428円 (税込1,500円)
ツクモロボット

Saturday, August 16, 2008

Racer Vs. vDrift

Racer Vs. vDrift

Because I use a mac I will only discuss mac compatible things; a lot of applications I discuss are open-source, so often Windows & Linux versions exist. If you can make a review of any of these programs, please email them to me, I will try to include them in the next week's blog.

This is my comparison of 2 free racing simulators: vDrift & Racer. Overall I prefer Racer, if you can get it set up. vDrift is much easier to set up and configure, but lacks a rear-view mirror and only has a handful of tracks, witch I might add, have all been converted from Racer. Because vDrift comes with a few track and doesn’t have add-ons, it has good network multiplayer potential. And because Racer has so many add-on cars & tracks mismatch of data files are common. With both games, multiplayer is incomplete; Racer has done it best but is hard to set up, I have never set up vDrift to play with anyone else, an it only has a capacity for 2 players. Some cars for Racer have headlights, non on vDrift do. Both games have AI. Both Games have ABS & TCS, but if you use this feature in Racer, you are limited to around 65 KMPH. Most tracks in Racer have MINIMAPS & AI, vDrift has these in every track. Both have manual transmissions and auto or manual clutch. vDrift has automatic joystick recognition and graphical configuration, in Racer you have to tell the game where to find your joystick.And finally vDrift is a universal application, but Racer is a PPC build that has not been updated in years. I recommend you keep both on your computer, because they both have different strong points.

For either game, I strongly you invest in a wheel. a MOMO wheel from Logitech, it’s even supposed to have new FFB driver in Leopard! Currently FFB only works with PPC applications.

source: http://jpenguin.110mb.com/random_thoughts_of_josh_dye/racer_vs_vdrift_2.html

Sunday, August 03, 2008

Visual C# - キー入力処理メモ

フォーム上であるコントロール(例:textbox)にフォーカスを当てたとき,キーボードのキーを押すとKeyDown,KeyPress, KeyUpイベントはそのコントロールにのみ渡される.textboxにフォーカスがあるとき,キーボードの"→"ボタンを押すとカーソルが右に移動するだけ.このキーイベントを受け取って処理を行うにはフォームのKeyPreviewプロパティをTrueにし,これでキーイベントはすべてフォームが受け取って,処理が終了してからフォーカスおあるコントロールにわたされるようになる.またイベント処理メソッドの引数であるパラメータe (System.Windows.Forms.KeyEventArgs)のHandledプロパティをTrueにすると,フォーカスのあるコントロールにキーイベントを渡さないようにすることができる.
確認コード:

private void Button1_Click(object sender, System.EventArgs e)
{
//Change KeyPreview property
this.KeyPreview = !this.KeyPreview;
textbox2.Text = this.KeyPreview.ToString();
}

private void Form1_KeyDown(object sender,
System.Windows.Forms.KeyEventArgs e)
{
//Which key?
textBox1.Tex = e.KeyCode.ToString();
}