亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ndirect.c

?? 卡內(nèi)基梅隆大學(CMU)開發(fā)的移動機器人控制開發(fā)軟件包。可對多種機器人進行控制
?? C
?? 第 1 頁 / 共 5 頁
字號:
 *    int t_pr, s_pr, r_pr -- the specified relative distances of the *                            translation, steering, and turret motors. *                            t_pr is in 1/10 inch and s_pr and r_pr are *                            in 1/10 degrees. */int pr(int t_pr, int s_pr, int r_pr){  unsigned char outbuf[BUFSIZE];    stuff_three_signed_int(8, PR, t_pr, s_pr, r_pr, outbuf);  return(Comm_Robot(Fd, outbuf));}/* * pa - moves the motors of the robot to the specified absolute positions  *      using the speeds set by sp().  Depending on the timeout period set  *      (by conf_tm()), the motion may terminate before the robot has  *      moved to the specified positions. * * parameters: *    int t_pa, s_pa, r_pa -- the specified absolute positions of the *                            translation, steering, and turret motors. *                            t_pa is in 1/10 inch and s_pa and r_pa are *                            in 1/10 degrees. */int pa(int t_pa, int s_pa, int r_pa);int pa(int t_pa, int s_pa, int r_pa){  unsigned char outbuf[BUFSIZE];    if (model != MODEL_N200)  {    return FALSE;  }    stuff_three_signed_int(8, PA, t_pa, s_pa, r_pa, outbuf);  return(Comm_Robot(Fd, outbuf));}/* * vm - velocity mode, command the robot to move at translational *      velocity = tv, steering velocity = sv, and rotational velocity = *      rv. The robot will continue to move at these velocities until *      either it receives another command or this command has been *      timeout (in which case it will stop its motion). * * parameters:  *    int t_vm, s_vm, r_vm -- the desired translation, steering, and turret *                            velocities. tv is in 1/10 inch/sec and *                            sv and rv are in 1/10 degree/sec. */int vm(int t_v, int s_v, int r_v){  unsigned char outbuf[BUFSIZE];    stuff_three_signed_int(8, VM, t_v, s_v, r_v, outbuf);  return(Comm_Robot(Fd, outbuf));}/* * mv - move, send a generalized motion command to the robot. *      For each of the three axis (translation, steering, and *      turret) a motion mode (t_mode, s_mode, r_mode) can be  *      specified (using the values MV_IGNORE, MV_AC, MV_SP, *      MV_LP, MV_VM, and MV_PR defined above): * *         MV_IGNORE : the argument for this axis is ignored *                     and the axis's motion will remain  *                     unchanged. *         MV_AC :     the argument for this axis specifies *                     an acceleration value that will be used *                     during motion commands. *         MV_SP :     the argument for this axis specifies *                     a speed value that will be used during *                     position relative (PR) commands. *         MV_LP :     the arguemnt for this axis is ignored *                     but the motor is turned off. *         MV_VM :     the argument for this axis specifies *                     a velocity and the axis will be moved *                     with this velocity until a new motion *                     command is issued (vm,pr,mv) or  *                     recieves a timeout. *         MV_PR :     the argument for this axis specifies *                     a position and the axis will be moved *                     to this position, unless this command *                     is overwritten by another (vm,pr,mv). * * parameters:  *    int t_mode - the desired mode for the tranlation axis *    int t_mv   - the value for that axis, velocity or position, *                 depending on t_mode *    int s_mode - the desired mode for the steering axis *    int s_mv   - the value for that axis, velocity or position, *                 depending on t_mode *    int r_mode - the desired mode for the turret axis *    int r_mv   - the value for that axis, velocity or position, *                 depending on t_mode */int mv(int t_mode, int t_mv, int s_mode,        int s_mv, int r_mode, int r_mv) {  unsigned char outbuf[BUFSIZE];  unsigned char *ptr;  ptr = outbuf;    /* skip the first byte for begin package */  ptr++;  /* the length into the packet (# of ints * sizeof(int)) */  unsigned_int_to_two_bytes ( 6 * 2 + 2, ptr ); ptr += 2;  /* the packet type */  *(ptr++) = MV;  /* translational axis - mode and value */  unsigned_int_to_two_bytes ( t_mode , ptr ); ptr += 2;  signed_int_to_two_bytes   ( t_mv   , ptr ); ptr += 2;  /* steering axis - mode and value */  unsigned_int_to_two_bytes ( s_mode , ptr ); ptr += 2;  signed_int_to_two_bytes   ( s_mv   , ptr ); ptr += 2;  /* turret  axis - mode and value */  unsigned_int_to_two_bytes ( r_mode , ptr ); ptr += 2;  signed_int_to_two_bytes   ( r_mv   , ptr ); ptr += 2;  return ( Comm_Robot(Fd, outbuf) );}/* * ct - send the sensor mask, Smask, to the robot. You must first change *      the global variable Smask to the desired communication mask before *      calling this function.  * *      to avoid inconsistencies usedSmask is used in all other function. *      once ct is called the user accessible mask Smask is used to  *      redefine usedSmask. This avoids that a returning package is encoded *      with a different mask than the one it was sent with, in case *      the mask has been changed on the client side, but has not been  *      updated on the server side. */int ct(){  int i;  unsigned char b0, b1, b2, b3, b4, b5, b6;  unsigned char outbuf[BUFSIZE], *byte_ptr;  if (model != MODEL_N200)  {    return FALSE;  }    for ( i = 0; i < NUM_MASK; i++ )    usedSmask[i] = Smask[i];    /* first encode Mask */  b0 = bits_to_byte (Smask[1], Smask[2], Smask[3], Smask[4],		     Smask[5], Smask[6], Smask[7], Smask[8]);  b1 = bits_to_byte (Smask[9], Smask[10], Smask[11], Smask[12],		     Smask[13], Smask[14], Smask[15], Smask[16]);  b2 = bits_to_byte (Smask[17], Smask[18], Smask[19], Smask[20],		     Smask[21], Smask[22], Smask[23], Smask[24]);  b3 = bits_to_byte (Smask[25], Smask[26], Smask[27], Smask[28],		     Smask[29], Smask[30], Smask[31], Smask[32]);  b4 = bits_to_byte (Smask[33], Smask[34], Smask[35], Smask[36],		     Smask[37], Smask[38], Smask[39], Smask[30]);  b5 = bits_to_byte (Smask[42], 0, 0, 0, 0, 0, 0, 0);  /* we pack the pos mask into b6 */  b6 = bits_to_byte(Smask[43], 		    POS_INFRARED_PI(Smask[ SMASK_POS_DATA ]),		    POS_SONAR_PI   (Smask[ SMASK_POS_DATA ]), 		    POS_BUMPER_PI  (Smask[ SMASK_POS_DATA ]), 		    POS_LASER_PI   (Smask[ SMASK_POS_DATA ]), 		    POS_COMPASS_PI (Smask[ SMASK_POS_DATA ]),		    0,0);    stuff_length_type (9, CT, outbuf);  byte_ptr = outbuf + 4;  *byte_ptr = b0;  byte_ptr++;  *byte_ptr = b1;  byte_ptr++;  *byte_ptr = b2;  byte_ptr++;  *byte_ptr = b3;  byte_ptr++;  *byte_ptr = b4;  byte_ptr++;  *byte_ptr = b5;  byte_ptr++;  *byte_ptr = b6;  return(Comm_Robot(Fd, outbuf));}/* * gs - get the current state of the robot according to the mask (of  *      the communication channel) */int gs(){  unsigned char outbuf[BUFSIZE];    stuff_length_type (2, GS, outbuf);  return(Comm_Robot(Fd, outbuf));}/* * st - stops the robot (the robot holds its current position) */int st(){  unsigned char outbuf[BUFSIZE];    stuff_length_type (2, ST, outbuf);  return(Comm_Robot(Fd, outbuf));}/* * lp - set motor limp (the robot may not hold its position). */int lp (){  unsigned char outbuf[BUFSIZE];    stuff_length_type (2, LP, outbuf);  return(Comm_Robot(Fd, outbuf));}/* * tk - sends the character stream, talk_string, to the voice synthesizer *      to make the robot talk. * * parameters: *    char *talk_string -- the string to be sent to the synthesizer. */int tk(char *talk_string){  unsigned char outbuf[BUFSIZE], *byte_ptr;  int tkfd, i, length;    if (model == MODEL_N200)  {    length = 3 + strlen(talk_string);    stuff_length_type (length, TK, outbuf);    byte_ptr = outbuf + 4;    for (i=3; i<length; i++) {      *byte_ptr = talk_string[i-3];      byte_ptr++;    }    *byte_ptr = 0; /* null terminate the string */    return(Comm_Robot(Fd, outbuf));  }  else  {    tkfd = open("/dev/dbtk", O_RDWR);    if (tkfd >= 0)    {      write(tkfd, talk_string, strlen(talk_string));      write(tkfd, "\n", 1);      close(tkfd);            return TRUE;    }  }    return FALSE;}/* * dp - define the current position of the robot as (x,y) *  * parameters: *    int x, y -- the position to set the robot to. */int dp(int x, int y){  unsigned char outbuf[BUFSIZE];    stuff_two_signed_int (6, DP, x, y, outbuf);  return(Comm_Robot(Fd, outbuf));}/* * zr - zeroing the robot, align steering and turret with bumper zero. *      The position, steering and turret angles are all set to zero. *      This function returns when the zeroing process has completed. */int zr(){  unsigned char outbuf[BUFSIZE];  int temp;    wait_time =  NORMAL_TIMEOUT;  /* zr() takes maximum of 120 seconds */  stuff_length_type (2, ZR, outbuf);  temp = Comm_Robot(Fd, outbuf);  return(temp);}/* * conf_ir - configure infrared sensor system. * * parameters:  *    int history -- specifies the percentage dependency of the current  *                   returned reading on the previous returned reading. *                   It should be set between 0 and 10: 0 = no dependency  *                   10 = full dependency, i.e. the reading will not change *    int order[16] --  specifies the firing sequence of the infrared  *                      (#0 .. #15). You can terminate the order list by a  *                      "255". For example, if you want to use only the  *                      front three infrared sensors then set order[0]=0, *                      order[1]=1, order[2]=15, order[3]=255 (terminator). */int conf_ir(int history, int order[16]){  unsigned char outbuf[BUFSIZE], *byte_ptr;  int i;    if (model != MODEL_N200)  {    return FALSE;  }    stuff_length_type (19, CONF_IR, outbuf);  byte_ptr = outbuf + 4;  if (history > 10)    history = 10;  *byte_ptr = (unsigned char)history;  for (i=0; i<16; i++) {    byte_ptr++;    *byte_ptr = (unsigned char)order[i];  }  return(Comm_Robot(Fd, outbuf));}/* * conf_sn - configure sonar sensor system. * * parameters: *    int rate -- specifies the firing rate of the sonar in 4 milli-seconds  *                interval;  *    int order[16] -- specifies the firing sequence of the sonar (#0 .. #15). *                     You can terminate the order list by a "255". For  *                     example, if you want to use only the front three  *                     sensors, then set order[0]=0, order[1]=1, order[2]=15,  *                     order[3]=255 (terminator). */int conf_sn(int rate, int order[16]){  unsigned char outbuf[BUFSIZE], *byte_ptr;  int i;    stuff_length_type (19, CONF_SN, outbuf);    byte_ptr = outbuf + 4;    *byte_ptr = (unsigned char)rate;  for (i=0; i<16; i++) {    byte_ptr++;    *byte_ptr = (unsigned char)order[i];  }  return(Comm_Robot(Fd, outbuf));}/* * conf_cp - configure compass system. *  * parameters: *    int mode -- specifies compass on/off: 0 = off ; 1 = on; 2 = calibrate. *                When you call conf_cp (2), the robot will rotate slowly 360 *                degrees. You must wake till the robot stop rotating before *                issuing another command to the robot (takes ~3 minutes). */int conf_cp(int mode){  unsigned char outbuf[BUFSIZE], *byte_ptr;    if (model != MODEL_N200)  {    return FALSE;  }    stuff_length_type (3, CONF_CP, outbuf);  byte_ptr = outbuf + 4;  *byte_ptr = (unsigned char)mode;  return(Comm_Robot(Fd, outbuf));}/* * conf_ls - configure laser sensor system: * * parameters: *    unsigned int mode -- specifies the on-board processing mode of the laser  *                         sensor data which determines the mode of the data  *                         coming back:  *                           the first bit specifies the on/off; *                           the second bit specifies point/line mode; *                           the third to fifth bits specify the  *                           returned data types:  *                             000 = peak pixel,  *                             001 = rise pixel,  *                             010 = fall pixel,  *                             011 = magnitude, *                             100 = distance; *                           the sixth bit specifies data integrity checking. * *   unsigned int threshold -- specifies the inverted acceptable brightness *                             of the laser line.  * *   unsigned int width -- specifies the acceptable width in terms *                         of number of pixels that are brighter than the  *                         set threshold. *   *   unsigned int num_data -- specifies the number of sampling points.  *   unsigned int processing --  specifies the number of neighboring  *                               pixels for averaging * * If you don't understand the above, try this one: *   conf_ls(51, 20, 20, 20, 4) */int conf_ls(unsigned int mode, unsigned int threshold, unsigned int width,	    unsigned int num_data, unsigned int processing){  unsigned char outbuf[BUFSIZE], *byte_ptr;    if (model != MODEL_N200)  {    return FALSE;  }    laser_mode = mode;  stuff_length_type (8, CONF_LS, outbuf);  byte_ptr = outbuf + 4;  if (mode == 51)     *byte_ptr = 35; /* special case */  else    *byte_ptr = (unsigned char)mode;  byte_ptr++;  *byte_ptr = (unsigned char)threshold;  byte_ptr++;  *byte_ptr = (unsigned char)width;  byte_ptr++;  unsigned_int_to_two_bytes(num_data, byte_ptr);  byte_ptr = byte_ptr + 2;  *byte_ptr = (unsigned char)processing;  return(Comm_Robot(Fd, outbuf));}/* * conf_tm - sets the timeout period of the robot in seconds. If the *           robot has not received a command from the host computer *           for more than the timeout period, it will abort its  *           current motion *  * parameters: *    unsigned int timeout -- timeout period in seconds. If it is 0, there *                            will be no timeout on the robot. */int conf_tm(unsigned char timeout){  unsigned char outbuf[BUFSIZE], *byte_ptr;    stuff_length_type (3, CONF_TM, outbuf);  byte_ptr = outbuf + 4;  *byte_ptr = (unsigned char)timeout;  return(Comm_Robot(Fd, outbuf));}int conf_ser(unsigned char port, unsigned short baud){  unsigned char *outbuf, buffer[BUFSIZE];    if (model == MODEL_N200)  {    return FALSE;  }    outbuf=buffer;  stuff_length_type(5, CONF_SER, outbuf);  outbuf+=4;  *outbuf=port;  outbuf++;  unsigned_int_to_two_byt

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
三级久久三级久久| 欧美巨大另类极品videosbest| 91浏览器打开| 538在线一区二区精品国产| 久久―日本道色综合久久| 亚洲高清不卡在线| 国产91精品入口| 日韩美女主播在线视频一区二区三区 | 本田岬高潮一区二区三区| 欧美日韩亚洲国产综合| 中文字幕精品—区二区四季| 丝袜亚洲精品中文字幕一区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 日韩欧美不卡在线观看视频| 中文字幕亚洲在| 国产美女在线观看一区| 欧美视频一区在线观看| 亚洲欧美一区二区三区极速播放 | 亚洲成年人网站在线观看| 国产成人在线视频网站| 日韩一区二区三区高清免费看看| 中文无字幕一区二区三区| 日韩在线观看一区二区| 欧洲另类一二三四区| 亚洲欧美日韩国产另类专区| 国产成人av福利| 久久久国产午夜精品| 久久精品国产精品亚洲红杏| 制服丝袜亚洲精品中文字幕| 亚洲综合免费观看高清完整版在线| 不卡在线视频中文字幕| 中文字幕欧美激情一区| 国产一区二区三区蝌蚪| 久久久久久久久久久99999| 久久国产人妖系列| 欧美videofree性高清杂交| 日韩精品乱码免费| 制服丝袜日韩国产| 日韩电影在线免费看| 欧美久久久久久久久| 日本美女一区二区| 日韩欧美在线影院| 久久av老司机精品网站导航| 日韩欧美一级精品久久| 精品在线播放午夜| 久久久久国产精品免费免费搜索| 国产精品系列在线观看| 中文字幕第一区综合| 93久久精品日日躁夜夜躁欧美| 国产精品免费免费| 91社区在线播放| 亚洲国产精品尤物yw在线观看| 欧美性色黄大片| 日本中文一区二区三区| 久久久精品综合| 99精品黄色片免费大全| 亚洲国产精品欧美一二99| 欧美精品在欧美一区二区少妇| 蜜桃视频一区二区三区 | 欧美激情自拍偷拍| 91香蕉视频mp4| 午夜精品一区二区三区三上悠亚| 欧美精品第1页| 国产凹凸在线观看一区二区| 亚洲日本在线天堂| 欧美美女黄视频| 精品一区二区三区视频在线观看| 欧美国产精品一区二区| 欧美视频在线播放| 国产精品一品视频| 亚洲一区中文日韩| 久久久亚洲精品石原莉奈 | 国产精品一区二区无线| 国产精品久久综合| 69久久夜色精品国产69蝌蚪网| 极品瑜伽女神91| 一区二区三区资源| 久久久三级国产网站| 在线观看精品一区| 国产电影一区二区三区| 亚洲风情在线资源站| 久久久国产精华| 欧美视频精品在线| 国内成人精品2018免费看| 亚洲人成电影网站色mp4| 日韩精品一区二区三区在线播放| 91亚洲国产成人精品一区二三| 精品在线免费观看| 天天影视涩香欲综合网| 亚洲欧洲精品成人久久奇米网| 欧美电影免费观看高清完整版在 | 色综合视频在线观看| 理论电影国产精品| 一区二区三区不卡视频| 久久久一区二区三区| 91精品国模一区二区三区| 91色porny在线视频| 国产一二三精品| 日韩精品免费专区| 亚洲在线中文字幕| 亚洲图片欧美激情| 欧美国产精品一区| 久久精品综合网| 精品理论电影在线| 欧美日本乱大交xxxxx| 色综合天天综合狠狠| 国产99久久精品| 国内精品伊人久久久久影院对白| 午夜婷婷国产麻豆精品| 一区二区三区视频在线观看| 国产欧美中文在线| 精品少妇一区二区| 日韩欧美三级在线| 在线成人免费观看| 欧美在线你懂的| 色爱区综合激月婷婷| 色综合网站在线| 91在线精品一区二区| 岛国精品在线观看| 国产成人精品免费网站| 国产一区二区在线免费观看| 久久97超碰国产精品超碰| 日韩高清不卡一区二区| 亚洲国产aⅴ成人精品无吗| 亚洲电影第三页| 午夜激情一区二区| 亚洲超碰97人人做人人爱| 五月天亚洲婷婷| 五月天婷婷综合| 久草精品在线观看| 国产精品一区在线| 99久久免费视频.com| 91久久奴性调教| 欧美撒尿777hd撒尿| 欧美理论片在线| 精品国产一区二区三区久久久蜜月| 日韩视频国产视频| 国产视频一区不卡| 自拍视频在线观看一区二区| 一区二区欧美国产| 亚瑟在线精品视频| 国产尤物一区二区| 91浏览器入口在线观看| 欧美精品久久99| 2021久久国产精品不只是精品| 中文字幕的久久| 亚洲国产视频a| 韩国欧美国产1区| 91丝袜美腿高跟国产极品老师| 欧美日韩小视频| 久久精品一区蜜桃臀影院| 亚洲免费在线播放| 日本在线不卡一区| yourporn久久国产精品| 欧美色区777第一页| 久久亚洲二区三区| 一区二区三区不卡视频在线观看 | 亚洲女同一区二区| 麻豆高清免费国产一区| 成人午夜碰碰视频| 欧美电影一区二区三区| 欧美极品美女视频| 日本少妇一区二区| 成av人片一区二区| 欧美大尺度电影在线| 亚洲桃色在线一区| 精品一区二区三区免费播放 | 日本韩国精品在线| 国产日产欧美一区二区三区| 亚洲国产精品人人做人人爽| 国产成人精品三级麻豆| 91精品国产综合久久久蜜臀粉嫩 | 日韩国产欧美在线观看| 不卡的av中国片| 欧美日本在线看| 亚洲日本丝袜连裤袜办公室| 激情另类小说区图片区视频区| 欧洲国产伦久久久久久久| 久久毛片高清国产| 青青草视频一区| 色菇凉天天综合网| 国产精品久久久久一区| 国产在线不卡一卡二卡三卡四卡| 欧美性感一区二区三区| 18涩涩午夜精品.www| 国产不卡视频一区二区三区| 精品va天堂亚洲国产| 视频一区二区三区中文字幕| 欧美亚洲国产怡红院影院| 亚洲色大成网站www久久九九| 国产成人精品三级| 久久久久久久久99精品| 久久精品国产99| 欧美一区二区视频在线观看2022 | 美女在线一区二区| 精品视频1区2区3区| 亚洲一区影音先锋| 欧美无乱码久久久免费午夜一区| 亚洲欧美日韩人成在线播放| 成人sese在线|