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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? fiducialfinderdevice.cc

?? 一個(gè)機(jī)器人平臺(tái)
?? CC
字號(hào):
/////////////////////////////////////////////////////////////////////////////// File: fiducialfinderdevice.cc// Author: Richard Vaughan// Date: 12 Jan 2000// Desc: Simulates the laser-based beacon detector//// CVS info://  $Source: /cvsroot/playerstage/code/stage/src/models/Attic/fiducialfinderdevice.cc,v $//  $Author: gerkey $//  $Revision: 1.2.4.2.2.1 $//// Usage: detects objects that were laser bright and had non-zero// ficucial_return//// Theory of operation://  (empty)//// Known bugs://  (empty)//// Possible enhancements://  (empty)///////////////////////////////////////////////////////////////////////////////#define DEBUG#include <math.h>#include <stage1p3.h>#include "world.hh"#include "laserdevice.hh"#include "fiducialfinderdevice.hh"///////////////////////////////////////////////////////////////////////////// Default constructorCFiducialFinder::CFiducialFinder(LibraryItem* libit,CWorld *world, CLaserDevice *parent )  : CPlayerEntity(libit,world, parent ){  // set the Player IO sizes correctly for this type of Entity  m_data_len    = sizeof( player_fiducial_data_t );  m_command_len = 0;   m_config_len  = 1;  m_reply_len  = 1;  m_player.code = PLAYER_FIDUCIAL_CODE;    // the parent MUST be a laser device  ASSERT( parent );  ASSERT( parent->m_player.code == PLAYER_LASER_CODE );    this->laser = parent;   //this->laser->m_dependent_attached = true;  // This is not a real object, so by default we dont see it  this->obstacle_return = false;  this->sonar_return = false;  this->puck_return = false;  this->vision_return = false;  this->idar_return = IDARTransparent;  this->laser_return = LaserTransparent;  this->time_sec = 0;  this->time_usec = 0;  // Set detection ranges  // Beacons can be detected a large distance,  // but can only be uniquely identified close up      // These are the ranges for 0.5 degree resolution;  // ranges for other resolutions are twice or half these values.  //  this->max_range_anon = 4.0;  this->max_range_id = 1.5;  expBeacon.beaconCount = 0; // for rtkstage  m_interval = 0.2; // matches laserdevice  // fill in the default values for these fake parameters  m_bit_count = 8;  m_bit_size = 50;  m_zero_thresh = m_one_thresh = 60;  m_laser_subscribedp = false;#ifdef INCLUDE_RTK2  this->beacon_fig = NULL;#endif}///////////////////////////////////////////////////////////////////////////// Startup routine//bool CFiducialFinder::Startup(){  if (!CPlayerEntity::Startup())    return false;  return true;}///////////////////////////////////////////////////////////////////////////// Load the entity from the world filebool CFiducialFinder::Load(CWorldFile *worldfile, int section){  if (!CPlayerEntity::Load(worldfile, section))    return false;  this->max_range_anon = worldfile->ReadLength(0, "lbd_range_anon",                                               this->max_range_anon);  this->max_range_anon = worldfile->ReadLength(section, "range_anon",                                               this->max_range_anon);  this->max_range_id = worldfile->ReadLength(0, "lbd_range_id",                                             this->max_range_id);  this->max_range_id = worldfile->ReadLength(section, "range_id",                                             this->max_range_id);  return true;}///////////////////////////////////////////////////////////////////////////// Update the beacon data//void CFiducialFinder::Update( double sim_time ){  CPlayerEntity::Update( sim_time ); // inherit debug output  ASSERT(m_world != NULL );  ASSERT(this->laser != NULL );  if(!Subscribed())  {    if(m_laser_subscribedp)    {      this->laser->Unsubscribe();      m_laser_subscribedp = false;    }    return;  }  if(!m_laser_subscribedp)  {    this->laser->Subscribe();    m_laser_subscribedp = true;  }      // if its time to recalculate   //  if( sim_time - m_last_update < m_interval )    return;  m_last_update = sim_time;  // check for configuration requests  // the client can request the geometry of all beacons  UpdateConfig();  // Get the laser range data  //  uint32_t time_sec=0, time_usec=0;  player_laser_data_t laser;  if (this->laser->GetData(&laser, sizeof(laser) ) == 0)  {    //puts( "Stage warning: LBD device found no laser data" );    return;  }  expBeacon.beaconCount = 0; // initialise the count in the export structure  // Do some byte swapping on the laser data  //  laser.resolution = ntohs(laser.resolution);  laser.min_angle = ntohs(laser.min_angle);  laser.max_angle = ntohs(laser.max_angle);  laser.range_count = ntohs(laser.range_count);  ASSERT(laser.range_count < ARRAYSIZE(laser.ranges));  for (int i = 0; i < laser.range_count; i++)    laser.ranges[i] = ntohs(laser.ranges[i]);  // Get the pose of the detector in the global cs  //  double ox, oy, oth;  GetGlobalPose(ox, oy, oth);  // Compute resolution of laser scan data  //  double scan_min = laser.min_angle / 100.0 * M_PI / 180.0;  double scan_res = laser.resolution / 100.0 * M_PI / 180.0;  // Amount of tolerance to allow in range readings  //double tolerance = 3.0 / m_world->ppm; //*** 0.10;  // Reset the beacon data structure  //  player_fiducial_data_t beacon;  beacon.count = 0;     // Search for beacons in the list generated by the laser  // Saves us from searching the bitmap again  //  for( LaserBeaconList::iterator it = this->laser->visible_beacons.begin();       it != this->laser->visible_beacons.end(); it++ )  {    CEntity *nbeacon = (CEntity*)*it;            int id = nbeacon->fiducial_return;    double px, py, pth;       nbeacon->GetGlobalPose( px, py, pth );    //printf( "beacon at: %.2f %.2f %.2f\n", px, py, pth );    //fflush( stdout );    // Compute range and bearing of beacon relative to sensor    //    double dx = px - ox;    double dy = py - oy;    double r = sqrt(dx * dx + dy * dy);    double b = NORMALIZE(atan2(dy, dx) - oth);    double o = NORMALIZE(pth - oth);    // filter out very acute angles of incidence as unreadable    int bi = (int) ((b - scan_min) / scan_res);    if (bi < 0 || bi >= laser.range_count)      continue;	    //SHOULD CHANGE THESE RANGES BASED ON CURRENT LASER RESOLUTION!    // Now see if it is within detection range    //    if (r > this->max_range_anon * DTOR(0.50) / scan_res)      continue;    if (r > this->max_range_id * DTOR(0.50) / scan_res)      id = 0;    // pack the beacon data into the export structure    expBeacon.beacons[ expBeacon.beaconCount ].x = px;    expBeacon.beacons[ expBeacon.beaconCount ].y = py;    expBeacon.beacons[ expBeacon.beaconCount ].th = pth;    expBeacon.beacons[ expBeacon.beaconCount ].id = id;    expBeacon.beaconCount++;    // Record beacons    //    if( beacon.count >=  ARRAYSIZE(beacon.fiducials) )      {	static bool print_warning = true;	if( print_warning )	  {	    PRINT_WARN3( "FiducialFinder sees more beacons than will "			 "fit in the player_fiducial_data_t structure "			 "(%d beacons, space for %d records). The first "			 "%d beacons will be returned, the rest ignored.\n"			 "If you need to see more beacons, you can change "			 "the size of the beacons array "			 "(see player/server/player.h). Be wanred that "			 "This will break "			 "compatibility with P/S code compiled against "			 "the standard player.h. \n\nThis message will "			 "only appear once.", 			 beacon.count, 			 ARRAYSIZE(beacon.fiducials), 			 ARRAYSIZE(beacon.fiducials) );	    print_warning = false;	  }	beacon.count = ARRAYSIZE(beacon.fiducials);      }        beacon.fiducials[beacon.count].id = id;    beacon.fiducials[beacon.count].pose[0] = (int) (r * 1000);    beacon.fiducials[beacon.count].pose[1] = (int) RTOD(b);    beacon.fiducials[beacon.count].pose[2] = (int) RTOD(o);    beacon.count++;  }  // Get the byte ordering correct  //  for (int i = 0; i < beacon.count; i++)  {    beacon.fiducials[i].id = htons(beacon.fiducials[i].id);    beacon.fiducials[i].pose[0] = htons(beacon.fiducials[i].pose[0]);    beacon.fiducials[i].pose[1] = htons(beacon.fiducials[i].pose[1]);    beacon.fiducials[i].pose[2] = htons(beacon.fiducials[i].pose[2]);  }  beacon.count = htons(beacon.count);      // Write beacon buffer to shared mem  // Note that we apply the laser data's timestamp to this data.  //  PutData( &beacon, sizeof(beacon) );  this->time_sec = time_sec;  this->time_usec = time_usec;}void CFiducialFinder::UpdateConfig( void ){  int len;  void *client;  char buffer[PLAYER_MAX_REQREP_SIZE];    while (true)    {      len = GetConfig(&client, buffer, sizeof(buffer));      if (len <= 0)        break;            switch (buffer[0])        {	case PLAYER_FIDUCIAL_GET_GEOM: 	  // Return geometry of this sensor and size of most recently	  // seen fiducial	  player_fiducial_geom_t geom;	            geom.pose[0] = htons((short)(this->origin_x*1000.0));          geom.pose[1] = htons((short)(this->origin_y*1000.0));          geom.pose[2] = htons(0);          geom.size[0] = htons((short)(this->size_x*1000.0));          geom.size[1] = htons((short)(this->size_y*1000.0));          // TODO: where should these dimensions come from?          geom.fiducial_size[0] = htons(500);          geom.fiducial_size[1] = htons(250);  	  PutReply(client, PLAYER_MSGTYPE_RESP_ACK, NULL, &geom, sizeof(geom));	  	  break;	  	default:	  PRINT_WARN1("got unknown fiducialfinder config request \"%c\"\n", 		      buffer[0]);	  PutReply(client, PLAYER_MSGTYPE_RESP_NACK);	  break;	}    }}#ifdef INCLUDE_RTK2///////////////////////////////////////////////////////////////////////////// Initialise the rtk guivoid CFiducialFinder::RtkStartup(){  CPlayerEntity::RtkStartup();    // Create a figure representing this object  this->beacon_fig = rtk_fig_create(m_world->canvas, NULL, 49);  // Set the color  rtk_fig_color_rgb32(this->beacon_fig, this->color);}///////////////////////////////////////////////////////////////////////////// Finalise the rtk guivoid CFiducialFinder::RtkShutdown(){  // Clean up the figure we created  rtk_fig_destroy(this->beacon_fig);  CPlayerEntity::RtkShutdown();} ///////////////////////////////////////////////////////////////////////////// Update the rtk guivoid CFiducialFinder::RtkUpdate(){  CPlayerEntity::RtkUpdate();   rtk_fig_clear(this->beacon_fig);    // if a client is subscribed to this device  if( Subscribed() > 0 && m_world->ShowDeviceData( this->lib_entry->type_num ) )  {    player_fiducial_data_t data;        // attempt to get the right size chunk of data from the mmapped buffer    if( GetData( &data, sizeof(data) ) == sizeof(data) )    {       char text[16];      // Get global pose      double gx, gy, gth;      GetGlobalPose(gx, gy, gth);      rtk_fig_origin( this->beacon_fig, gx, gy, gth );      int beacon_count = (int)ntohs(data.count);      for( int b=0; b < beacon_count; b++ )	{	  int16_t id = ntohs((int16_t)data.fiducials[b].id);	  uint16_t range_mm = ntohs(data.fiducials[b].pose[0]);	  int16_t bearing_deg = ntohs(data.fiducials[b].pose[1]);	  int16_t orient_deg = ntohs(data.fiducials[b].pose[2]);	  double range = (double)range_mm / 1000.0;	  double bearing = DTOR((double)bearing_deg);	  double px = range * cos(bearing);	  double py = range * sin(bearing);	  double pa = DTOR((double)orient_deg);	  rtk_fig_line( this->beacon_fig, 0, 0, px, py );		  // TODO: use the configuration info to determine beacon size	  // for now we use these canned values	  double wx = 0.05;	  double wy = 0.40;	  	  rtk_fig_rectangle(this->beacon_fig, px, py, pa, wx, wy, 0);	  rtk_fig_arrow(this->beacon_fig, px, py, pa, wy, 0.10);	  snprintf(text, sizeof(text), "  %d", id);	  rtk_fig_text(this->beacon_fig, px, py, pa, text);	}      }    //else    //  puts( "subscribed but no data avail!!!!!!!!!!!!!!" );  }}#endif

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产白丝网站精品污在线入口| 欧美日韩国产精品成人| 国产真实乱子伦精品视频| 日韩一区欧美二区| 天堂在线一区二区| 免费精品视频在线| 极品少妇一区二区三区精品视频| 九色综合狠狠综合久久| 狠狠色丁香婷婷综合| 国产精品小仙女| 丁香婷婷综合色啪| 91亚洲国产成人精品一区二区三| 99re热这里只有精品视频| 色噜噜狠狠成人中文综合| 色国产综合视频| 欧美美女直播网站| 日韩午夜电影av| 久久久九九九九| 日韩毛片高清在线播放| 亚洲国产一区二区a毛片| 日本 国产 欧美色综合| 国产精品一区专区| 91视频在线看| 在线成人av网站| 26uuu久久天堂性欧美| 日本一区二区成人在线| 一个色综合网站| 蜜臀精品一区二区三区在线观看 | 亚洲欧美日韩电影| 亚洲高清免费视频| 国产一区二区按摩在线观看| av福利精品导航| 欧美三级电影在线观看| 精品国产乱码久久久久久图片| 国产女人18毛片水真多成人如厕| 一区二区三区中文字幕电影 | 99re亚洲国产精品| 6080日韩午夜伦伦午夜伦| 久久久综合九色合综国产精品| 国产精品色哟哟| 秋霞国产午夜精品免费视频| 国产精品性做久久久久久| 欧美三片在线视频观看| 国产夜色精品一区二区av| 亚洲精品欧美激情| 久久精品999| 色综合久久综合网97色综合| 欧美电影免费观看高清完整版在| 亚洲欧美一区二区在线观看| 日本成人在线网站| 91免费视频网址| 日韩精品一区二区在线观看| 亚洲精品高清在线观看| 国产在线精品一区二区夜色| 色婷婷综合久久久中文字幕| 久久久久久久性| 性感美女极品91精品| 成人精品高清在线| 日韩视频永久免费| 亚洲午夜视频在线| 国v精品久久久网| 欧美一级久久久| 一区二区三区日本| 成人免费毛片片v| 日韩情涩欧美日韩视频| 亚洲网友自拍偷拍| 成人av电影在线网| 久久久久久久综合| 久久精品国产亚洲aⅴ| 欧美在线色视频| 亚洲欧美日韩人成在线播放| 国产精品一二三在| 日韩免费高清视频| 亚洲成人动漫一区| 色婷婷综合久久久久中文| 国产精品丝袜在线| 国产剧情一区二区三区| 日韩视频免费观看高清完整版在线观看| 亚洲区小说区图片区qvod| 成人国产一区二区三区精品| 欧美精品一区二区三区四区 | 日韩在线一区二区| 色8久久人人97超碰香蕉987| 国产精品麻豆久久久| 国产精品资源在线看| 2020国产精品久久精品美国| 日本亚洲三级在线| 欧美精品xxxxbbbb| 亚洲国产精品久久久久婷婷884 | 91久久精品国产91性色tv| 国产亚洲精品精华液| 国产裸体歌舞团一区二区| 欧美成人官网二区| 免费在线一区观看| 欧美一二三区精品| 蜜臀av一区二区在线免费观看| 91精品国产综合久久久久久久| 亚洲韩国精品一区| 欧美日韩精品是欧美日韩精品| 亚洲第一电影网| 欧美色网站导航| 偷窥国产亚洲免费视频| 欧美女孩性生活视频| 性做久久久久久久免费看| 欧美久久久一区| 日韩高清在线观看| 日韩免费观看高清完整版| 久久99精品久久久久婷婷| 欧美tk—视频vk| 粉嫩绯色av一区二区在线观看| 国产欧美日韩久久| 91在线丨porny丨国产| 亚洲精品成人精品456| 在线观看视频一区二区欧美日韩| 亚洲影院久久精品| 欧美一区二区成人6969| 国产一区二区美女诱惑| 国产婷婷一区二区| www.亚洲人| 亚洲午夜久久久久久久久电影院| 欧美裸体一区二区三区| 久久99国产精品久久99| 国产日产欧美一区二区视频| 91啪亚洲精品| 日韩精品免费专区| 久久久久国产精品麻豆| 99riav久久精品riav| 香港成人在线视频| 久久嫩草精品久久久精品| aa级大片欧美| 日韩精品一二区| 国产亚洲婷婷免费| 色婷婷久久久综合中文字幕| 天天av天天翘天天综合网| 久久综合久久鬼色| 色综合久久综合网欧美综合网| 日韩黄色在线观看| 久久久亚洲高清| 在线亚洲免费视频| 麻豆高清免费国产一区| 中文字幕一区二| 777午夜精品免费视频| 国产成人精品免费| 亚洲成人自拍一区| 久久久久综合网| 欧美主播一区二区三区| 国产毛片精品视频| 一二三四区精品视频| 久久综合九色综合欧美98| 在线看不卡av| 国产成人综合亚洲91猫咪| 图片区小说区国产精品视频| 久久精品亚洲精品国产欧美kt∨| 91精品福利视频| 国产精品一区二区男女羞羞无遮挡 | 欧美性一二三区| 国产成人精品亚洲午夜麻豆| 亚洲制服欧美中文字幕中文字幕| 欧美成人vps| 欧美专区亚洲专区| 成人性生交大片免费看中文| 色综合久久久久综合体| 蜜桃av噜噜一区| 亚洲在线视频一区| 国产欧美日韩视频在线观看| 欧美一区二区三区白人| 91影视在线播放| 国产成人免费9x9x人网站视频| 青青草视频一区| 亚洲一区二区视频在线| 欧美韩日一区二区三区四区| 91精品国产一区二区人妖| 色哟哟一区二区三区| 懂色av一区二区三区免费看| 美女视频网站久久| 亚洲国产精品久久人人爱蜜臀 | 一区二区三区四区乱视频| 国产三级久久久| 精品国精品国产| 欧美一级二级在线观看| 欧美日韩一区在线观看| 色婷婷av一区二区三区之一色屋| 国产福利不卡视频| 久久99蜜桃精品| 日韩高清一级片| 亚洲成人自拍网| 亚洲一区二区三区视频在线| 亚洲欧洲av在线| 亚洲国产精品成人综合| 久久久久亚洲综合| 久久综合精品国产一区二区三区 | 国产精品青草久久| 久久久亚洲欧洲日产国码αv| 日韩三级在线免费观看| 日韩一区二区在线观看| 在线播放91灌醉迷j高跟美女| 欧美性videosxxxxx| 欧美熟乱第一页| 欧美揉bbbbb揉bbbbb| 欧美三级韩国三级日本一级|