机器人实训报告(5).docx
机器人模块拆装实训报告班级:学号:姓名:课程目的锻炼动手能力和团队精神;系统训练创新能力和实践能力;自主建构工科基础知识。课程内容1、用AS-UII型机器人走“8”字轨迹程序:void main ()while (1)(drive ( 0 , 80);wait( 0. 100000 );stop();motor ( 1 , 60 );motor ( 2 , 30 );wait( 1.000000 );drive ( 0 , -80);wait( 0.100000 ); stop();motor ( 1 , 30 );motor ( 2 , 60 );wait( 1. 000000 );2、用AS-UH型机器人躲避障碍豺主程序V程序:int ir_l=0;int ir_2=0;int ir_3=0; void main (),80 );,80 );motor ( 1 motor ( 2ir_l if(while(1)=ir_detector(); ir 1 二二 4)ir 2 =ir detector ();if ( ir 2 二二 1)ir_3 =ir_detector();if ( ir_3 = 2) drive ( -86 , 0);wait( 0.500000 ); stop();) else drive ( 80 , 0);wait( 0.500000 ); stop();)else(drive ( 0 , -81);wait( 0.100000 ); stopO ;)else|drive ( 80 , 0);wait( 0.500000 );stopO ;)3、用AS-EI型机器人模拟工业抓放机器人实现结果 机器人照片:程序:int md_l=O;int mcm_l=O;int mcd_l=O;void mainQ(while (1)md_l = read (0x4000);if7 Gnd.l & Ob10000000) = ObO) (mcm_l =& ObllllllOO) | Obll;write ( 0x4000 , mcm_l); else(md_l = read (0x4000);if7 GndJ & Ob 1000000) = ObO) mcmj 二 Gncmft ObllllllOO) | Obi;write( 0x4000 ,mcm 1);) 一 elsemd_l = read (0x4000);ifl Gnd.l & Ob 100000) = ObO) 一mcm二 Gncm& ObllllOOll) | Obi 100;write( 0x4000 一else md_l = read (0x4000);if7 GndJ & Ob 10000) = ObO) (mcm=Gncm_l ft ObllllOOll) | OblOO;write ( 0x4000 ,; 'else (md_l = read (0x4000);if7 GndJ & Ob 1000) = ObO) mcmj =Gncm_l A ObllOOUU) | Ob 110000;write ( 0x4000 ,; else |md_l = read (0x4000);if7 Gnd.l & OblOO) = ObO) mcm=Gncm_l A ObllOOUU) | Ob 10000;write ( 0x4000 , mcm_l);elsemd_l = read (0x4000);if7 Gnd.l & Oblll11100) = ObO) | else mcm_l = Gncm_l & Obi1000000); write( 0x4000 "md_l = read (0x4000);ifl Gnd 1 & OblO) = ObO)(mcdj =GncdJ & OblllO) | Obi;write( 0x5000 "elsemd_l = read (0x4000);if7 Gnd 1 & Obi) = ObO)mcd_l = Gncd_l & OblllO);write1 0x5000 / mcd_l);1 四、体会、收获和建议通过6周时间的学习,了解了简单的机器人原理,我们接触了 AS-EI和AS-UH 两种机器人,增强了动手能力。掌握了机器人编程软件的使用以及机器人组装, 一定程度了锻炼了思维能力。还学习机器人故障的排除,学会了故障时的调试。