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

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

?? johncyesim.java

?? 一個多機器人的仿真平臺
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* * JohnRobotSim.java *//* This code is part of the abstractrobot package of TeamBots. * Copyright (c) 1999, 2000 by John Sweeney and Carnegie Mellon University */package EDU.cmu.cs.coral.abstractrobot;import java.awt.*;import java.util.*;import EDU.gatech.cc.is.util.*;import EDU.gatech.cc.is.simulation.*;import EDU.gatech.cc.is.abstractrobot.VisualObjectSensor;import EDU.gatech.cc.is.abstractrobot.Simple;import EDU.gatech.cc.is.abstractrobot.SimpleInterface;import EDU.gatech.cc.is.communication.Message;import EDU.cmu.cs.coral.simulation.ColorTransitionSim;import EDU.cmu.cs.coral.simulation.LandmarkSim;import EDU.cmu.cs.coral.simulation.LineSim;import EDU.cmu.cs.coral.localize.VisionRobot;import EDU.cmu.cs.coral.localize.LocalizationRobot;import EDU.cmu.cs.coral.localize.LineLocalizationRobot;import EDU.cmu.cs.coral.localize.Sample;import EDU.cmu.cs.coral.localize.Range;import EDU.cmu.cs.coral.localize.GaussianSampler;import EDU.cmu.cs.coral.localize.DoubleRectangle;/** this is an implementation of some localization using the SimpleCyeSim * as a base.  there are a few things needed for localization not present * in a the standard Sim, such as particular heading information routines, * communication, and some other stuff. * * * @see SimpleCyeSim * @author John Sweeney * @version 0.1 */public class JohnCyeSim extends SimpleCyeSim implements SimulatedObject,							SimpleInterface,							VisualObjectSensor,							LocalizationRobot,							LineLocalizationRobot{    protected Point last;    protected LandmarkSim [] landmarks; //keep track of these  //  protected SimulatedObject [] all_objects; //and the rest too   protected LineSim [] lines; //these are the lines on the field...    protected double desired_heading; //which way we want to go    public Color foreground, background; //how to be drawn       protected long time; //our time    protected long lastTimeIncrement;    protected double timed; //more accurate?    protected double base_speed;    protected double desired_speed;    protected double desired_turret_heading;    protected	double	obstacle_rangeM = 1.0;      protected	long	last_VisualObjectst = 0;    protected Vec2[]	last_VisualObjects;    protected	int	num_VisualObjects = 0;    protected int last_channel = 0;  protected boolean [] ambig; // the landmarks which are ambiguous  protected int numAmbigLandmark;  protected Vec2 [] linesRes; //result from getVisualLines  protected int horzRes; //horizontal scanning resoluation (in parts) for looking for lines  protected int vertRes; //vert scannig rez for same (in parts)  protected long lastVisualLinesTime;  protected int lastChannel;  protected double lineRes; //the resoluation for sacnning (in meters)     protected	long	last_Obstaclest = 0;    protected	Vec2	last_Obstacles[];    protected	int	num_Obstacles;    protected DoubleRectangle [] landmarkRectangle;  //  protected Vec2 [] fieldPos;  //  protected Vec2 [] fieldMag;  //  protected Color [] fieldColor;  //  protected Color singleVectorColor;  //  protected boolean haveField;  //  protected boolean vectorsHaveColor;  //  protected Vec2 estPos;        protected double oldMoveR, oldMoveT, oldHeading;  protected String display_string = "";//"this string left blank";    protected double clippingOffset;    protected double clippingStdDev;    protected double clippingDirStdDev;    protected GaussianSampler gs;   protected Random intGen;  //  public static final double RADIUS = 0.247; //this will change for cye   //  public static final double VISION_RANGE = 1.5;  //    public static final int VISION_FOV_DEG = 100;  //   public static final double VISION_FOV_RAD = Units.DegToRad(100);    public final double MAX_STEER = 0.7854;    public final double MAX_TURRET = 0.7854;    public final double MAX_TRANSLATION = 0.508;    public final boolean DEBUG = false;    public JohnCyeSim() {	super();		lastTimeIncrement =0;	landmarks = null;	lines = null;	clippingStdDev = 0.25;	clippingOffset = 0.5;	clippingDirStdDev = 0.098; //4 degrees	gs  = new GaussianSampler(3); //used in clipToMap	gs.setRange(2, -Math.PI, Math.PI);	for (int i =0; i < 3; i++) {	  gs.setMean(i, 0.0);	  gs.setDev(i, clippingStdDev);	}	gs.setDev(2, clippingDirStdDev);		oldMoveR = oldMoveT = oldHeading = 0.0;	intGen = new Random();    }    public void init(double x, double y, double t, double ignore,		     Color fg, Color bg, int vc, int id, long s) {             super.init(x, y, t, ignore, fg, bg, vc, id, s);	last = new Point(0,0);		landmarks = null;	lines = null;	linesRes = null;	//	lineRes = getDictionary().getDouble("LINE_LOCALIZER_RESOLUTION"); 	lineRes = 0.05;	horzRes = 20;	vertRes = 20;    }            // public void receive(Message m) {/*N/A*/}     public void drawID(Graphics g, int w, int h, double t, double b,		       double l, double r) {		top =t; bottom =b; left =l; right =r;		if (DEBUG) System.out.println("draw "+				      w + " " +				      h + " " +				      t + " " +				      b + " " +				      l + " " +				      r + " ");	double meterspp = (r - l) / (double)w;	int radius = (int)(RADIUS / meterspp);	int xpix = (int)((position.x - l) / meterspp);	int ypix = (int)((double)h - ((position.y - b) / meterspp));		/*--- draw ID ---*/	g.setColor(background);	//	g.drawString("JohnCyeSim!",	//     xpix-radius,ypix-radius);	/*	int xx, yy;	if (linesRes != null) {	  for (int i =0;i < linesRes.length; i+= 2) {	    if (linesRes[i] != null) {	      //this is ego centric....	      Vec2 globTo = new Vec2(linesRes[i]);	      Vec2 globFrom = new Vec2(linesRes[i+1]);	      	      globFrom.add(position);	      globTo.add(position);	      	      //start of line	      xpix = (int) ( (globFrom.x - l) / meterspp);	      xx = (int) ( (globTo.x - l) / meterspp);	      	      ypix = (int) ( (double)h - ((globFrom.y - b) / meterspp));	      yy = (int) ( (double)h - ((globTo.y - b) / meterspp));	      	      g.drawLine(xpix, ypix, xx, yy);	    }	  }	}	*/	  	    }      public void takeStep(long time_increment, SimulatedObject [] all_objs) {    //need to get the landmarks, and call it here because of initialization    //sequence...    // getLandmarks();    super.takeStep(time_increment, all_objs);    //System.out.println("mvstep.r = "+mvstep.r+" t = "+mvstep.t);    getLandmarks();    getLines();  }        //now for the ones in SimpleInterface not covered in SimulatedObject        /* these are specific to LocalizationRobot*/  public SimulatedObject[] getLandmarks() {    if (landmarks == null) {      int i;      int num=0;      //landmarks = new SimulatedObject[all_objects.length];            int ambigChannel = getDictionary().getInt("LOCALIZER_AMBIG_LM_CHANNEL");      numAmbigLandmark = 0;      for (i = 0; i < all_objects.length; i++) {	if (all_objects[i] instanceof LandmarkSim ||	    all_objects[i] instanceof ColorTransitionSim) {  	  System.out.println("GL: obj "+i+" is lm! getP = "+			     all_objects[i].getPosition().toString());	  // landmarks[i] = all_objects[i];	  num++;	  if (all_objects[i].getVisionClass() == ambigChannel) {	    numAmbigLandmark++;	  }	}	else {	  System.out.println("GL: obj "+i+" is not lm...");	  //    landmarks[i] = null;	}      }            landmarks = new LandmarkSim[num];      ambig = new boolean[num];           for (i = 0, num = 0 ; i < all_objects.length; i++) {	if (all_objects[i] instanceof LandmarkSim ||	    all_objects[i] instanceof ColorTransitionSim) {	  landmarks[num] = (LandmarkSim) all_objects[i];	  	  //check if ambi landmark, and if so put in array	  if (all_objects[i].getVisionClass() == ambigChannel) {	    ambig[num] = true;	  }	  	  num++;	}      }            System.out.println("JRS: getLandmarks: got "+num+" landmarks");            landmarkRectangle = new DoubleRectangle[landmarks.length];            for (i =0; i < landmarkRectangle.length; i++) {	double newx, newy, side;	newx= (double)landmarks[i].getPosition().x - landmarks[i].getRadius();	newy = (double) landmarks[i].getPosition().y + landmarks[i].getRadius();	side = landmarks[i].getRadius()*2.0;	landmarkRectangle[i] = new DoubleRectangle(newx, newy, side, side);      }					           }    return landmarks;  }    public boolean [] getAmbigLandmarks() { return ambig; }     public int getNumLandmarks() {	if (landmarks == null)	    getLandmarks();	return landmarks.length;    }    public double getSeenLandmarkConfidence(int lm) {      //if the landmark is in visual range 100% conf, else 0%      double noise = visionNoiseGetNext();      Vec2 temp = landmarks[lm].getCenter(position);      //dont add noise to whether we see the landmark      /*      temp.setr((1.0 - noise ) * temp.r);      noise = visionNoiseGetNext();      temp.sett((1.0 - noise) * temp.t);      */      if ((temp.r < SimpleCye.VISION_RANGE) &&	    (Math.abs(Units.BestTurnRad(steer.t,temp.t))	     < (SimpleCye.VISION_FOV_RAD/2.0))) {		if (ambig[lm]) {	  return 1.0 / (double)(numAmbigLandmark);	}		return 1.0;      }	      return 0.0;    }          public double getLandmarkDistance(int lm) {           Vec2 tmp = new Vec2(landmarks[lm].getPosition());            tmp.sub(position);            //add some noise to this....assumption is mean is 0      double noise = visionNoiseGetNext();      tmp.setr( (1.0-noise)*tmp.r);            return tmp.r;    }  //make this next one a param from the dsc file?  public double getLandmarkDistanceVariance(int lm) {    return getDictionary().getDouble("LOCALIZER_LM_DIST_VAR");  }    public double getLandmarkAngle(int lm) {    Vec2 tmp = new Vec2(landmarks[lm].getPosition());    double noise =  visionNoiseGetNext(); //make it noisy       tmp.sub(position);    tmp.sett((1.0-noise)*tmp.t);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美性猛交xxxx黑人交| 六月丁香婷婷久久| 国产人妖乱国产精品人妖| 成人精品亚洲人成在线| 亚洲成精国产精品女| 久久久欧美精品sm网站| 欧美日韩成人一区二区| 国产成人免费xxxxxxxx| 美国欧美日韩国产在线播放| 亚洲免费观看高清完整版在线观看熊| 678五月天丁香亚洲综合网| 不卡一二三区首页| 国产精品66部| 久久99日本精品| 偷拍亚洲欧洲综合| 一区二区三区中文免费| 最好看的中文字幕久久| 中文字幕中文在线不卡住| 精品国产伦一区二区三区观看方式 | 青青草原综合久久大伊人精品 | 国产激情一区二区三区| 日本免费在线视频不卡一不卡二| 亚洲午夜一二三区视频| 一区二区欧美在线观看| 亚洲精品欧美专区| 亚洲第一搞黄网站| 肉色丝袜一区二区| 久久成人免费网| 国产麻豆精品一区二区| 国产成人精品www牛牛影视| 国产成人高清在线| 91在线一区二区三区| 在线观看av一区二区| 欧美一区二区三区公司| 欧美成人aa大片| 亚洲欧洲日韩综合一区二区| 一区二区三区欧美日韩| 天涯成人国产亚洲精品一区av| 日本免费在线视频不卡一不卡二| 国产乱码精品一区二区三| 成人精品电影在线观看| 欧美性猛交xxxx黑人交| 欧美精品一区二区三区高清aⅴ| 中文字幕免费不卡| 水蜜桃久久夜色精品一区的特点 | 亚洲人成网站影音先锋播放| 亚洲无线码一区二区三区| 狠狠色丁香久久婷婷综| 91片黄在线观看| 精品福利一区二区三区免费视频| 国产亚洲va综合人人澡精品 | 91精品国产综合久久福利| 国产区在线观看成人精品| 日韩国产欧美视频| 国产成人精品免费看| 欧美精品三级在线观看| 中文av一区二区| 久久精品999| 欧美日韩一级片网站| 亚洲欧洲性图库| 狠狠色丁香九九婷婷综合五月| 91免费在线看| 中文字幕一区日韩精品欧美| 美女一区二区三区| 欧美性色黄大片| 亚洲一卡二卡三卡四卡| 91浏览器打开| 国产精品久久久99| 成人短视频下载| 国产午夜精品久久久久久免费视| 日韩国产高清影视| 欧美精品日韩一本| 美女视频一区二区| 在线不卡中文字幕播放| 图片区小说区国产精品视频| 欧美日韩一区三区四区| 亚洲不卡在线观看| 欧美一区二区在线免费观看| 午夜精品久久久久久久久| 精品婷婷伊人一区三区三| 婷婷夜色潮精品综合在线| 欧美猛男男办公室激情| 欧美a级一区二区| 精品粉嫩超白一线天av| 国产成人aaa| 成人免费在线播放视频| 欧美综合亚洲图片综合区| 亚洲高清久久久| 精品久久久久久久久久久院品网| 国产伦精品一区二区三区视频青涩| 久久久国产精品午夜一区ai换脸| 国产东北露脸精品视频| 亚洲三级在线免费观看| 欧美一区二区在线不卡| 国产精品一区二区无线| 一区二区三区美女| 日韩免费视频一区二区| 成人精品免费网站| 视频一区二区国产| 国产情人综合久久777777| 欧美日本在线看| gogogo免费视频观看亚洲一| 亚洲午夜久久久| 国产精品美女一区二区三区 | 国产精品乱码一区二区三区软件 | 五月天一区二区三区| 欧美国产禁国产网站cc| 欧美手机在线视频| 国产精品亚洲午夜一区二区三区 | 99久久免费精品高清特色大片| 奇米精品一区二区三区在线观看一| 日韩理论在线观看| 久久久亚洲午夜电影| 欧美变态tickling挠脚心| 色狠狠一区二区三区香蕉| 国产一区二区成人久久免费影院 | 狠狠色综合日日| 捆绑调教美女网站视频一区| 一区二区三区**美女毛片| 中文字幕制服丝袜一区二区三区| 26uuu精品一区二区| 日韩一区二区三区在线观看 | 91精品国产91久久综合桃花| 日本道精品一区二区三区| 91麻豆国产精品久久| 99精品视频在线免费观看| 成人免费毛片高清视频| 国产一区二区0| 国产综合色产在线精品| 久久不见久久见免费视频7| 麻豆91在线播放| 国产剧情一区二区| 国v精品久久久网| 91影视在线播放| 欧美亚洲愉拍一区二区| 精品视频一区 二区 三区| 欧美精品乱码久久久久久| 欧美一区二区三区在线观看| 欧美精品一区二区三区久久久| 精品粉嫩aⅴ一区二区三区四区| 国产人成一区二区三区影院| 亚洲日本免费电影| 琪琪久久久久日韩精品| 国产精品自在欧美一区| 97se亚洲国产综合自在线不卡 | 三级影片在线观看欧美日韩一区二区 | 成人精品视频一区二区三区尤物| 色94色欧美sute亚洲13| 欧美色爱综合网| 精品国产污网站| 亚洲精品亚洲人成人网在线播放| 奇米精品一区二区三区四区| 不卡一区中文字幕| 日韩午夜小视频| 亚洲欧美成aⅴ人在线观看| 久久99热99| 欧美高清精品3d| 成人免费一区二区三区在线观看| 老司机一区二区| 国产色婷婷亚洲99精品小说| 亚洲男人的天堂在线观看| 高清shemale亚洲人妖| 亚洲图片一区二区| 日韩二区三区四区| 色综合天天综合网天天狠天天| 2020国产精品| 日本va欧美va欧美va精品| 在线观看日韩电影| 亚洲区小说区图片区qvod| 国产精品资源在线| 欧美r级电影在线观看| 视频一区欧美日韩| 制服丝袜亚洲精品中文字幕| 亚洲裸体xxx| 欧美在线免费播放| 亚洲精选一二三| 欧美日韩亚洲另类| 香蕉加勒比综合久久| 欧美日韩亚洲另类| 欧美aa在线视频| 久久嫩草精品久久久精品| 国产一区二区按摩在线观看| 国产日产欧产精品推荐色| 懂色av噜噜一区二区三区av| 欧美国产精品专区| 99国产欧美另类久久久精品| **网站欧美大片在线观看| 色欧美日韩亚洲| 午夜精品aaa| 久久奇米777| eeuss鲁片一区二区三区在线观看| 国产精品久久99| 欧美性xxxxxx少妇| 狠狠色伊人亚洲综合成人| 欧美激情综合五月色丁香| 欧洲一区二区av| 粉嫩在线一区二区三区视频| 亚洲免费观看高清完整版在线观看熊 | 狂野欧美性猛交blacked| 国产精品网站在线播放|