2013b/Member/kk/Mission2
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[2013b/kk/missoin]]
*ロボコン [#rc648b11]
***今回のロボコンの課題 [#p3d4f813]
~ライン上に設置された缶を集めポイントの枠内にどれだけ積み...
&ref(.png);
~ルールの概要は大まかに
-缶を積みゴール枠内(境界可)に収める基礎点が主
-缶を積み上げる動作
-缶を運ぶ動作
-連携の良さ、見た目等の技術点が加えられる。
~詳しくは[こちら:http://yakushi.shinshu-u.ac.jp/robotics/...
**二班 kk matsuro trtr 6638 [#nf1d3d4c]
~私たちのグループの方針としてはロボットを「缶を集める」役...
&BR;それぞれロボットを分け2段の缶を複数積みあげて得点を...
#ref(separate.jpg)
~缶をあつめてくるロボットは前回の課題の応用で、ライントレ...
&br;缶を積み上げるロボットでは、何かエレベーター式の仕組...
*ロボットの説明 [#bc577471]
~缶を集めてくる側のロボットです。基本形はライントレースの...
こちらはkkとmatsuroが主に制作を担当しました。
&br;大きな特徴としては缶の受け渡しのため、つかんだ缶を押...
&br;機体の底を最大のタイヤを使用して持ち上げ、缶を押し出...
けました。この時、重たいモーターを固定するのに苦労しまし...
&ref(soko.jpg);
L字のブロックと蝶番のブロックを使用して強固にしました。...
&br;ハサミの先についた光センサーで缶を掴んだことを感知し...
#ref(bou.jpg);
試合直前には缶押し出しの精度を上げるため以下の様になりま...
#ref(bou2.JPG);
~ハサミはシンプルに棒二本。トレース中に重量の軽い缶を安定...
~缶を積み上げるロボットでは、背面にあるタイヤを用いて缶を...
&ref(up.JPG);
こちらはtrtr、6683が主に担当しました。
&br;ゴールに行く途中の缶?と?をつかみながら進行していきま...
&br;大まかな仕組みと動きは理解していますが缶積み上げロボ...
&br;[こちら:http://yakushi.shinshu-u.ac.jp/robotics/?2013...
&br;[:http://yakushi.shinshu-u.ac.jp/robotics/?2013b%2FMe...
*プログラム{缶を運ぶ側} [#p4e8727b]
-定義文
#define WHITE 46 //白の値
#define BLACK 40 //黒(ライン上)の値
//境界の値は上の二つから+、-をも...
#define CATCH 44 //缶をつかんだ時の光センサー3の値
#define power SetPower(OUT_AC,1); //...
#define go_forward power;OnFwd(OUT_AC); /...
#define go_back power;OnRev(OUT_AC); //パ...
#define LEFT power;OnRev(OUT_A);OnFwd(OUT_C); ...
#define left power;Off(OUT_A);OnFwd(OUT_C); /...
#define RIGHT power;OnFwd(OUT_A);OnRev(OUT_C); ...
#define right power;OnFwd(OUT_A);Off(OUT_C); //...
#define PUSH power;OnRev(OUT_B);Wait(3);Off(OUT_B); W...
//缶を押し出す動作です。モーターの向きからOnRevで棒が飛...
-サブルーチン
ライントレース(右側)
sub trace1_R(){
if (SENSOR_1 < BLACK){
RIGHT;
} else if (SENSOR_1 < BLACK +2){ //黒寄りの境界...
right;
} else if (SENSOR_1 > WHITE -2){ //白寄りの境界...
left;
} else if (SENSOR_1 > WHITE){
LEFT;
}
}
ライントレース(左側)
sub trace1_L(){
if (SENSOR_1 < BLACK){
LEFT;
} else if (SENSOR_1 < BLACK +2){
left;
} else if (SENSOR_1 > WHITE -2){
right;
} else if (SENSOR_1 > WHITE){
RIGHT;
}
}
交差点を判断するライントレース(右側)
sub trace2_R(){
while (FastTimer(0) < 25){ //交差点と判断するま...
if (SENSOR_1 < BLACK){
RIGHT;
}else if (SENSOR_1 < BLACK +2){
ClearTimer(0);
right;
}else if (SENSOR_1 > WHITE -2){
ClearTimer(0);
left;
}else if (SENSOR_1 > WHITE){
ClearTimer(0);
LEFT;
}else{
ClearTimer(0);
go_forward;
}
}
if(FastTimer(0) >= 25){ //交差点での動作です。
ClearTimer(0);
LEFT;
Wait(40);
go_forward;
Wait(20);
Off(OUT_AC);
ClearTimer(0);
}
}
交差点を判断するライントレース(左側)
sub trace2_L(){
while (FastTimer(0) < 25){
if (SENSOR_1 < BLACK){
LEFT;
}else if (SENSOR_1 < BLACK +2){
ClearTimer(0);
left;
}else if (SENSOR_1 > WHITE -2){
ClearTimer(0);
right;
}else if (SENSOR_1 > WHITE){
ClearTimer(0);
RIGHT;
}else{
ClearTimer(0);
go_forward;
}
}
if(FastTimer(0) >= 25){
ClearTimer(0);
RIGHT;
Wait(40);
go_forward;
Wait(20);
Off(OUT_AC);
ClearTimer(0);
}
}
缶の受け渡し(右側トレース時)
sub trace3_R(){
while (FastTimer(0) < 25){
if (SENSOR_1 < BLACK){
RIGHT;
}else if (SENSOR_1 < BLACK +2){
ClearTimer(0);
right;
}else if (SENSOR_1 > WHITE -2){
ClearTimer(0);
left;
}else if (SENSOR_1 > WHITE){
ClearTimer(0);
LEFT;
}else{
ClearTimer(0);
go_forward;
}
}
if(FastTimer(0) >= 25){
go_forward;
Wait(10);
LEFT;
Wait(70);
Off(OUT_AC);
Wait(100);
PUSH;
go_back; //ハサミの接触を避けるため
Wait(100);
Off(OUT_AC);
ClearTimer(0);
}
}
缶の受け渡し(左側)
sub trace3_L(){
while (FastTimer(0) < 25){
if (SENSOR_1 < BLACK){
LEFT;
}else if (SENSOR_1 < BLACK +2){
ClearTimer(0);
left;
}else if (SENSOR_1 > WHITE -2){
ClearTimer(0);
right;
}else if (SENSOR_1 > WHITE){
ClearTimer(0);
RIGHT;
}else{
ClearTimer(0);
go_forward;
}
}
if(FastTimer(0) >= 25){
RIGHT;
Wait(70);
Off(OUT_AC);
PUSH;
go_back;
Wait(50);
Off(OUT_AC);
ClearTimer(0);
}
}
メインタスク
task main()
{
SetSensor(SENSOR_1, SENSOR_LIGHT);
SetSensor(SENSOR_3, SENSOR_LIGHT);
ClearTimer(0);
int n=0;
while(n==0){
Wait(100); //相手を待つ...
until(SENSOR_1 < BLACK){ //黒になるま...
go_forward;}
Off(OUT_AC);
Wait(100);
go_back; //感知から動作までに進んで...
Wait(15);
Off(OUT_AC);
Wait(30);
n++;
}
while(n==1){
if (SENSOR_3 > CATCH){
PlaySound(SOUND_UP); //缶をつ...
ClearTimer(0);
until(FastTimer(0) > 500){ //?で...
trace1_R();}
LEFT; //?で渡るときの...
Wait(55);
go_forward;
Wait(20);
until(SENSOR_1 < BLACK){
go_forward;}
ClearTimer(0);
until(FastTimer(0) > 500){ //?を渡...
trace1_R();}
ClearTimer(0);
trace3_R();
n++;
} else if (SENSOR_1 < BLACK){
RIGHT;
} else if (SENSOR_1 < BLACK +2){
right;
} else if (SENSOR_1 > WHITE -2){
left;
} else if (SENSOR_1 > WHITE){
LEFT;
}
}
while(n==2){ //二つ目の缶を運ぶプログラムです。
RIGHT;
Wait(40);
go_forward;
Wait(150);
until(SENSOR_1 < BLACK){
right;}
if (SENSOR_3 > CATCH){
until(SENSOR_1 < BLACK){
LEFT;}
ClearTimer(0);
trace3_L();
n++;
} else if (SENSOR_1 < BLACK){
LEFT;
} else if (SENSOR_1 < BLACK +2){
left;
} else if (SENSOR_1 > WHITE -2){
right;
} else if (SENSOR_1 > WHITE){
RIGHT;
}
}
}
&ref(skime.png);
*結果 [#lc992438]
|結果|缶の個数|基礎得点| 技術点 |
| | 1 | 5 |ave:10.1|
今回はたくさんの時間があるにも関わらず缶を一つしか運ぶ...
&br;結果だけ見れば、前回の課題1からの進歩がほとんどなか...
&br;制作に時間をかけた、缶の押し出しの仕組みも本番では半...
&br; また積み上げ側のロボットが動作できなかった要因とし...
&br;作成の役割分担をしたために、積み上げ側の負担が大きく...
&br;始めの案を変更すると楽にできた部分もあったかもしれな...
終了行:
[[2013b/kk/missoin]]
*ロボコン [#rc648b11]
***今回のロボコンの課題 [#p3d4f813]
~ライン上に設置された缶を集めポイントの枠内にどれだけ積み...
&ref(.png);
~ルールの概要は大まかに
-缶を積みゴール枠内(境界可)に収める基礎点が主
-缶を積み上げる動作
-缶を運ぶ動作
-連携の良さ、見た目等の技術点が加えられる。
~詳しくは[こちら:http://yakushi.shinshu-u.ac.jp/robotics/...
**二班 kk matsuro trtr 6638 [#nf1d3d4c]
~私たちのグループの方針としてはロボットを「缶を集める」役...
&BR;それぞれロボットを分け2段の缶を複数積みあげて得点を...
#ref(separate.jpg)
~缶をあつめてくるロボットは前回の課題の応用で、ライントレ...
&br;缶を積み上げるロボットでは、何かエレベーター式の仕組...
*ロボットの説明 [#bc577471]
~缶を集めてくる側のロボットです。基本形はライントレースの...
こちらはkkとmatsuroが主に制作を担当しました。
&br;大きな特徴としては缶の受け渡しのため、つかんだ缶を押...
&br;機体の底を最大のタイヤを使用して持ち上げ、缶を押し出...
けました。この時、重たいモーターを固定するのに苦労しまし...
&ref(soko.jpg);
L字のブロックと蝶番のブロックを使用して強固にしました。...
&br;ハサミの先についた光センサーで缶を掴んだことを感知し...
#ref(bou.jpg);
試合直前には缶押し出しの精度を上げるため以下の様になりま...
#ref(bou2.JPG);
~ハサミはシンプルに棒二本。トレース中に重量の軽い缶を安定...
~缶を積み上げるロボットでは、背面にあるタイヤを用いて缶を...
&ref(up.JPG);
こちらはtrtr、6683が主に担当しました。
&br;ゴールに行く途中の缶?と?をつかみながら進行していきま...
&br;大まかな仕組みと動きは理解していますが缶積み上げロボ...
&br;[こちら:http://yakushi.shinshu-u.ac.jp/robotics/?2013...
&br;[:http://yakushi.shinshu-u.ac.jp/robotics/?2013b%2FMe...
*プログラム{缶を運ぶ側} [#p4e8727b]
-定義文
#define WHITE 46 //白の値
#define BLACK 40 //黒(ライン上)の値
//境界の値は上の二つから+、-をも...
#define CATCH 44 //缶をつかんだ時の光センサー3の値
#define power SetPower(OUT_AC,1); //...
#define go_forward power;OnFwd(OUT_AC); /...
#define go_back power;OnRev(OUT_AC); //パ...
#define LEFT power;OnRev(OUT_A);OnFwd(OUT_C); ...
#define left power;Off(OUT_A);OnFwd(OUT_C); /...
#define RIGHT power;OnFwd(OUT_A);OnRev(OUT_C); ...
#define right power;OnFwd(OUT_A);Off(OUT_C); //...
#define PUSH power;OnRev(OUT_B);Wait(3);Off(OUT_B); W...
//缶を押し出す動作です。モーターの向きからOnRevで棒が飛...
-サブルーチン
ライントレース(右側)
sub trace1_R(){
if (SENSOR_1 < BLACK){
RIGHT;
} else if (SENSOR_1 < BLACK +2){ //黒寄りの境界...
right;
} else if (SENSOR_1 > WHITE -2){ //白寄りの境界...
left;
} else if (SENSOR_1 > WHITE){
LEFT;
}
}
ライントレース(左側)
sub trace1_L(){
if (SENSOR_1 < BLACK){
LEFT;
} else if (SENSOR_1 < BLACK +2){
left;
} else if (SENSOR_1 > WHITE -2){
right;
} else if (SENSOR_1 > WHITE){
RIGHT;
}
}
交差点を判断するライントレース(右側)
sub trace2_R(){
while (FastTimer(0) < 25){ //交差点と判断するま...
if (SENSOR_1 < BLACK){
RIGHT;
}else if (SENSOR_1 < BLACK +2){
ClearTimer(0);
right;
}else if (SENSOR_1 > WHITE -2){
ClearTimer(0);
left;
}else if (SENSOR_1 > WHITE){
ClearTimer(0);
LEFT;
}else{
ClearTimer(0);
go_forward;
}
}
if(FastTimer(0) >= 25){ //交差点での動作です。
ClearTimer(0);
LEFT;
Wait(40);
go_forward;
Wait(20);
Off(OUT_AC);
ClearTimer(0);
}
}
交差点を判断するライントレース(左側)
sub trace2_L(){
while (FastTimer(0) < 25){
if (SENSOR_1 < BLACK){
LEFT;
}else if (SENSOR_1 < BLACK +2){
ClearTimer(0);
left;
}else if (SENSOR_1 > WHITE -2){
ClearTimer(0);
right;
}else if (SENSOR_1 > WHITE){
ClearTimer(0);
RIGHT;
}else{
ClearTimer(0);
go_forward;
}
}
if(FastTimer(0) >= 25){
ClearTimer(0);
RIGHT;
Wait(40);
go_forward;
Wait(20);
Off(OUT_AC);
ClearTimer(0);
}
}
缶の受け渡し(右側トレース時)
sub trace3_R(){
while (FastTimer(0) < 25){
if (SENSOR_1 < BLACK){
RIGHT;
}else if (SENSOR_1 < BLACK +2){
ClearTimer(0);
right;
}else if (SENSOR_1 > WHITE -2){
ClearTimer(0);
left;
}else if (SENSOR_1 > WHITE){
ClearTimer(0);
LEFT;
}else{
ClearTimer(0);
go_forward;
}
}
if(FastTimer(0) >= 25){
go_forward;
Wait(10);
LEFT;
Wait(70);
Off(OUT_AC);
Wait(100);
PUSH;
go_back; //ハサミの接触を避けるため
Wait(100);
Off(OUT_AC);
ClearTimer(0);
}
}
缶の受け渡し(左側)
sub trace3_L(){
while (FastTimer(0) < 25){
if (SENSOR_1 < BLACK){
LEFT;
}else if (SENSOR_1 < BLACK +2){
ClearTimer(0);
left;
}else if (SENSOR_1 > WHITE -2){
ClearTimer(0);
right;
}else if (SENSOR_1 > WHITE){
ClearTimer(0);
RIGHT;
}else{
ClearTimer(0);
go_forward;
}
}
if(FastTimer(0) >= 25){
RIGHT;
Wait(70);
Off(OUT_AC);
PUSH;
go_back;
Wait(50);
Off(OUT_AC);
ClearTimer(0);
}
}
メインタスク
task main()
{
SetSensor(SENSOR_1, SENSOR_LIGHT);
SetSensor(SENSOR_3, SENSOR_LIGHT);
ClearTimer(0);
int n=0;
while(n==0){
Wait(100); //相手を待つ...
until(SENSOR_1 < BLACK){ //黒になるま...
go_forward;}
Off(OUT_AC);
Wait(100);
go_back; //感知から動作までに進んで...
Wait(15);
Off(OUT_AC);
Wait(30);
n++;
}
while(n==1){
if (SENSOR_3 > CATCH){
PlaySound(SOUND_UP); //缶をつ...
ClearTimer(0);
until(FastTimer(0) > 500){ //?で...
trace1_R();}
LEFT; //?で渡るときの...
Wait(55);
go_forward;
Wait(20);
until(SENSOR_1 < BLACK){
go_forward;}
ClearTimer(0);
until(FastTimer(0) > 500){ //?を渡...
trace1_R();}
ClearTimer(0);
trace3_R();
n++;
} else if (SENSOR_1 < BLACK){
RIGHT;
} else if (SENSOR_1 < BLACK +2){
right;
} else if (SENSOR_1 > WHITE -2){
left;
} else if (SENSOR_1 > WHITE){
LEFT;
}
}
while(n==2){ //二つ目の缶を運ぶプログラムです。
RIGHT;
Wait(40);
go_forward;
Wait(150);
until(SENSOR_1 < BLACK){
right;}
if (SENSOR_3 > CATCH){
until(SENSOR_1 < BLACK){
LEFT;}
ClearTimer(0);
trace3_L();
n++;
} else if (SENSOR_1 < BLACK){
LEFT;
} else if (SENSOR_1 < BLACK +2){
left;
} else if (SENSOR_1 > WHITE -2){
right;
} else if (SENSOR_1 > WHITE){
RIGHT;
}
}
}
&ref(skime.png);
*結果 [#lc992438]
|結果|缶の個数|基礎得点| 技術点 |
| | 1 | 5 |ave:10.1|
今回はたくさんの時間があるにも関わらず缶を一つしか運ぶ...
&br;結果だけ見れば、前回の課題1からの進歩がほとんどなか...
&br;制作に時間をかけた、缶の押し出しの仕組みも本番では半...
&br; また積み上げ側のロボットが動作できなかった要因とし...
&br;作成の役割分担をしたために、積み上げ側の負担が大きく...
&br;始めの案を変更すると楽にできた部分もあったかもしれな...
ページ名: