July:
3:スケジューリング
4:プロッタのアルゴリズムを決める。
5
6:X,Y軸ユニットの完成 。ペンユニットの完成。
7
8
9
10:ペンユニットの調整
11:X,Y軸ユニットのプログラムを書く。ペンユニットの上下移動のプログラムを書く
12
13:完成、動作確認
14
15
16
17:改良
18:発表用ドキュメントの作成。
19
20:発表場所に制作物を移動
21
22:opencampus
朝
注:プロッタ、マインドストームの搬送は慎重に。
- E棟一階へプロッタを置く台を搬送。
- 発表用のボードの搬送。パソコンも搬送
- プロッタの搬送
- プロッタの動作確認
- プロッタを二階へ格納
- Open campusに向けて注意点があれば報告
前回から進んだ点
7/6
X,Y軸機構の完成
X軸とペンユニットの合体
外観がほとんどできあがった
アルゴリズムの進行具合はどうなんですかね?
7/17
X軸ユニットの新規開発
現在の問題点
7/6
- 土台が未完成であること。
土台を薄い板状のマグネットで挟んで固定したいらしいっすけど、どうっすか??
- ペンユニットのペンを持つ機構が安定しない。
- X軸の動作の制御ができていない
- X軸に押しボタンスイッチを取り付けたのでセンサーの制御をできるように
7/17
- プログラムの調整
アルゴリズム
文字コードのアウトラインの座標をモーター回転のベクトルに変換して文字を書くアルゴリズム |
アウトラインフォントの"A"を出力させるようなプログラムを作りたい。という教授からの要望です。
文字のコード表からアウトラインフォントで描けるように変換するソフトを作る。
- 文字を入力させる。
- A,B,C,D....Zを条件分岐させてそれぞれのサブルーチンへ
switch文で分岐させる。
switch(式)(
case
- 文字コードからアウトラインフォントに変更するサブルーチンを作る
- 線の座標の数値の演算を行うサブルーチンを作る。
- ペンの上下や軌跡を描くようなサブルーチンを作る。
- ボタンスイッチのセンサ割り込みで改行や終了
今後行っていきたいこと。
PCとMindstorms,Mindstorms間での通信が行えるようにしたい。
PCに主プログラムを持たせておいて、値の入出力をさせる。
マインドストーム側では受信したらその数値通りに動いて、処理の途中経過や、終了を通信しあうようにしたい。
オープンキャンパスのプレゼン資料
LEGO Mindstorms
テーマ
比較的単純な命令を行う個体同士が全体で通信しあって全体で機能するものがある。
個体としては自立して動くが、協調して動作したり、データの送受信の場合には各機体と通信し合うので、
結果として全体で一つの目的が達成される。これを協調分散処理という。
この協調分散処理をLEGO MINDSTORMSを用いて実現できるよう研究を進めている。
LEGO Mindstormsとは?
LEGOブロックとセンサ、モータを組み合わせることによりロボットや機械が作れます。
また、そのロボットをプログラミングするときには命令をパーツごとに分けたものがあるので
プログラミングの知識がなくても視覚的にプログラミングすることができます。
プロッターとは?
建築や設計図などの図面を引く際に用いられる装置。
ペンプロッタとは、コンピュータから送られた命令の通りにペンを持つ機構が動き、図を描く装置。
プロッタはペンのユニットが縦横に動いて描写するタイプと、
ペンが縦、紙が横に動いて描写するタイプのプロッタがある。
プロッタで描写するときにはプログラム側で線の長さをモータの回転のベクトルに変換して描写させる。
文字を描くプロッタ機構
入力する文字のデータとプログラムをコンピュータに格納する。
プログラムを実行させると文字を書き始める始点までX,Y軸のユニットを移動させる。
ペンをおろして文字を書き始める。このときプログラムの通りにX,Y軸を移動させることにより文字を描くことができる。
文字を書き終わるとペンを上げて次の文字を書き始める位置まで移動する。
もし、そこで文字を書き終えていたなら、終了して元の位置まで戻る。
オープンキャンパスの準備
プロッタの作成。
3color ploter作る。
簡単なアセンブリラインみたいなのを作る。
デモ用の映像を作成。
●y軸プログラムソース
#define
plus OnFwd(OUT_C+OUT_A);
#define
minus OnRev(OUT_C+OUT_A);
#define
dmove Off(OUT_A+OUT_C);
task main()
{
Wait(50);
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(10);}
ClearMessage();
until (Message() != 0);
if ( Message() == 11 ) dmove;
plus;
Wait(300);
dmove;
Wait(50);
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(1);}
ClearMessage();
until (Message() != 0);
if ( Message() == 1 ) minus;
Wait(150);
dmove;
Wait(50);
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(2);}
ClearMessage();
until (Message() != 0);
if ( Message() == 2 ) plus;
Wait(75);
dmove;
Wait(50);
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(3);}
ClearMessage();
until (Message() != 0);
if ( Message() == 3 ) plus;
Wait(225);
dmove;
Wait(50);
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(4);}
ClearMessage();
until (Message() != 0);
if ( Message() == 4 ) minus;
Wait(300);
dmove;
Wait(50);
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(5);}
ClearMessage();
until (Message() != 0);
if ( Message() == 5 ) plus;
Wait(150);
dmove;
Wait(50);
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(6);}
ClearMessage();
until (Message() != 0);
if ( Message() == 6 ) minus;
Wait(150);
dmove;
Wait(50);
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(7);}
ClearMessage();
until (Message() != 0);
if ( Message() == 7 ) plus;
Wait(150);
dmove;
Wait(50);
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(12);}
ClearMessage();
until (Message() != 0);
if ( Message() == 13 ) minus;
Wait(300);
dmove;
Wait(50);
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(8);}
}
●x軸プログラムソース
sub pen_down()
{
OnFwd(OUT_C);
Wait(50);
Off(OUT_C);
}
sub pen_up()
{
OnRev(OUT_C);
Wait(50);
Off(OUT_C);
}
#define
plus OnFwd(OUT_A);
#define
minus OnRev(OUT_A);
#define
dmove Off(OUT_A);
task main()
{
ClearMessage();
until (Message() != 0);
if ( Message() == 10 ) pen_down();
Wait(5);
dmove;
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(11);}
ClearMessage();
until (Message() != 0);
if ( Message() == 1 ) plus;
Wait(150);
dmove;
pen_up();
plus;
Wait(225);
dmove;
Wait(10);
pen_down();
Wait(1);
minus;
Wait(150);
dmove;
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(1);}
ClearMessage();
until (Message() != 0);
if ( Message() == 2 ) plus;
Wait(150);
dmove;
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(2);}
ClearMessage();
until (Message() != 0);
if ( Message() == 3 ) minus;
Wait(150);
dmove;
pen_up();
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(3);}
ClearMessage();
until (Message() != 0);
if ( Message() == 4 ) plus;
Wait(225);
dmove;
pen_down();
Wait(5);
plus;
Wait(150);
dmove;
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(4);}
ClearMessage();
until (Message() != 0);
if ( Message() == 5 ) minus;
Wait(150);
dmove;
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(5);}
ClearMessage();
until (Message() != 0);
if ( Message() == 6 ) plus;
Wait(150);
dmove;
pen_up();
Wait(50);
plus;
Wait(75);
dmove;
pen_down();
Wait(5);
plus;
Wait(150);
dmove;
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(6);}
ClearMessage();
until (Message() != 0);
if ( Message() == 7 ) minus;
Wait(150);
dmove;
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(7);}
ClearMessage();
until (Message() != 0);
if ( Message() == 12 ) pen_up();
Wait(50);
dmove;
ClearTimer(0);
while(Timer(0) <= 10){SendMessage(13);}
ClearMessage();
until (Message() != 0);
if ( Message() == 8 ) minus;
Wait(675);
dmove;
}
最終更新:2007年07月18日 10:42