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

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

?? capturesim.java

?? 一個多機器人的仿真平臺
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
	/**	 * Clean up.	 */	public void quit()		{		}	/**	 * Gets time elapsed since the robot was instantiated. 	 * Since this is simulation, it may not match real elapsed time.	 */	public long getTime()		{		return(time);		}	private	long	last_Obstaclest = 0;	private	Vec2	last_Obstacles[];	private	int	num_Obstacles;	/**	 * Get an array of Vec2s that point egocentrically from the	 * center of the robot to the obstacles currently sensed by the 	 * bumpers and sonars.	 * @param timestamp only get new information 	 *	if timestamp > than last call or timestamp == -1 .	 * @return the sensed obstacles.	 */	public Vec2[] getObstacles(long timestamp)		{		if((timestamp > last_Obstaclest)||(timestamp == -1))			{			if (timestamp != -1) last_Obstaclest = timestamp;			Vec2 tmp_objs[] = new Vec2[all_objects.length];			num_Obstacles = 0;			/*--- check all objects ---*/			for(int i = 0; i<all_objects.length; i++)				{				/*--- check if it's an obstacle and not self ---*/				if (all_objects[i].isObstacle() &&					(all_objects[i].getID() != unique_id))					{					Vec2 tmp = all_objects[i].getClosestPoint(							position);					if (tmp.r<obstacle_rangeM)					tmp_objs[num_Obstacles++] = tmp;					}				}			last_Obstacles = new Vec2[num_Obstacles];			for(int i = 0; i<num_Obstacles; i++)			last_Obstacles[i] = new Vec2(tmp_objs[i].x,				tmp_objs[i].y);			}		Vec2[] retval = new Vec2[num_Obstacles];		for(int i = 0; i<num_Obstacles; i++)			retval[i] = new Vec2(last_Obstacles[i].x,				last_Obstacles[i].y);		return(retval);		}	private	double	obstacle_rangeM = 1.0;	/**	 * Set the maximum range at which a sensor reading should be considered	 * an obstacle.  Beyond this range, the readings are ignored.	 * The default range on startup is 1 meter.	 * @param range the range in meters.	 */	public void setObstacleMaxRange(double range)		{		obstacle_rangeM = range;		}	private	long	last_VisualObjectst = 0;	private Vec2[]	last_VisualObjects;	private	int	num_VisualObjects = 0;	private	int	last_channel = 0;	/**	 * Get an array of Vec2s that represent the	 * locations of visually sensed objects egocentrically 	 * from center of the robot to the objects currently sensed by the 	 * vision system.		 * @param timestamp only get new information 	 *	if timestamp > than last call or timestamp == -1 .	 * @param channel (1-6) which type/color of object to retrieve.	 * @return the sensed objects.	 */	public Vec2[] getVisualObjects(long timestamp, int channel)		{		if(((timestamp > last_VisualObjectst)||			(channel != last_channel))||(timestamp == -1))			{			if (timestamp != -1) last_VisualObjectst = timestamp;			last_channel = channel;			num_VisualObjects = 0;			Vec2 tmp_objs[] = new Vec2[all_objects.length];			/*--- check all objects ---*/			for(int i = 0; i<all_objects.length; i++)				{				/*--- check if it's of the right code and not self ---*/				if (all_objects[i].getVisionClass()==channel &&					(all_objects[i].getID() != unique_id))					{					Vec2 tmp = all_objects[i].getCenter(							position);					if ((tmp.r<Capture.VISION_RANGE)&&						(Math.abs(						Units.BestTurnRad(turret,tmp.t))						< (MultiForageN150.VISION_FOV_RAD/2)))						tmp_objs[num_VisualObjects++] = tmp;					}				}			last_VisualObjects = new Vec2[num_VisualObjects];			for(int i = 0; i<num_VisualObjects; i++)			last_VisualObjects[i] = new Vec2(tmp_objs[i].x,				tmp_objs[i].y);			}		Vec2[] retval = new Vec2[num_VisualObjects];		for(int i = 0; i<num_VisualObjects; i++)			retval[i] = new Vec2(last_VisualObjects[i].x,				last_VisualObjects[i].y);		return(retval);		}	  /**	    * this is a dummy implementation to keep compatibility with VisualSensorObject.	    * at this point, vision noise is not built into the class. for an example,	    * see SimpleCyeSim.	    */	  public void setVisionNoise(double mean, double stddev, long seed) { }	private	long	last_VisualSizest = 0;	/**	 * NOT IMPLEMENTED:	 * Get an array of doubles that represent an estimate of the	 * size in square meters of the visually sensed objects.	 * @param timestamp only get new information if 	 * 	timestamp > than last call or timestamp == -1 .	 * @param channel (1-6) which type/color of object to retrieve.	 * @return the sizes of the sensed objects.	 */	public double[] getVisualSizes(long timestamp, int channel)		{		/* todo */		return(new double[0]);		}	private	long	last_VisualAxest = 0;	/**	 * NOT IMPLEMENTED:	 * Get an array of doubles that represent the	 * major axis orientation of the visually sensed objects.	 * 0 and PI are horizontal, PI/2 is vertical.	 * @param timestamp only get new information 	 *	if timestamp > than last call or timestamp == -1 .	 * @param channel (1-6) which type/color of object to retrieve.	 * @return the major axes of the sensed objects.	 */	public double[] getVisualAxes(long timestamp, int channel)		{		/* todo */		return(new double[0]);		}	private	long	last_ObjectInGrippert = -1;	private	int	last_ObjectInGripper = -1;	/**	 * Get the kind of object in the gripper.	 * @param timestamp only get new information 	 *	if timestamp > than last call or timestamp == -1 .	 * @return channel (1-6) which type/color of 	 *	 object in the gripper, 0 otherwise.	 */	public int getObjectInGripper(long timestamp)		{		if((timestamp > last_ObjectInGrippert)||(timestamp == -1))			{			if (timestamp != -1) last_ObjectInGrippert = timestamp;			last_ObjectInGripper = -1;			/*--- check if we are holding something ---*/			if (in_gripper != null)				last_ObjectInGripper = 					in_gripper.getVisionClass();			else				{				/*--- find gripper position in global coord ---*/				Vec2 gpos = new Vec2(RADIUS,0);				gpos.sett(turret);				gpos.add(position);					/*--- check all objects ---*/				for(int i = 0; i<all_objects.length; i++)					{					/*--- check if it's not self ---*/					if (all_objects[i].getID() != unique_id)						{						Vec2 tmp = all_objects[i].getCenter(gpos);						if ((tmp.r<MultiForageN150.GRIPPER_CAPTURE_RADIUS)							&&(all_objects[i].getVisionClass()>=0))							{							last_ObjectInGripper = 							all_objects[i].getVisionClass();							break;							}						}					}				}			}		return(last_ObjectInGripper);		}	/**	 * Get the position of the robot in global coordinates.	 * @param timestamp only get new information 	 *	if timestamp > than last call or timestamp == -1.	 * @return the position.	 */	public Vec2 getPosition(long timestamp)		{		return(new Vec2(position.x, position.y));		}			/**	 * Get the position of the robot in global coordinates.	 * @return the position.	 */	public Vec2 getPosition()		{		return(new Vec2(position.x, position.y));		}			/**	 * Reset the odometry of the robot in global coordinates.	 * This might be done when reliable sensor information provides	 * a very good estimate of the robot's location, or if you	 * are starting the robot in a known location other than (0,0).	 * Do this only if you are certain you're right!	 * @param position the new position.	 */	public void resetPosition(Vec2 posit)		{		position.setx(posit.x);		position.setx(posit.y);		}	private boolean	in_reverse = false;	/**	*/	public double getSteerHeading(long timestamp)		{		return(steer.t);		}		/**	*/	public void resetSteerHeading(double heading)		{		/* ensure in legal range */		heading = Units.ClipRad(heading); 		/* if we're in reverse, the steer heading is PI out */		if (in_reverse) heading = Units.ClipRad(heading + Math.PI);		/* set the angle */		steer.sett(heading);		}	private double desired_heading;	/**	*/	public void setSteerHeading(long timestamp, double heading)		{		/* ensure in legal range */		desired_heading = Units.ClipRad(heading);		/* check if we should go in reverse */		double turn = Units.BestTurnRad(steer.t, desired_heading);		if (Math.abs(turn)>(Math.PI/2))			{			in_reverse = true;			desired_heading = 				Units.ClipRad(desired_heading+Math.PI);			}		else in_reverse = false;		}		/**	*/	public double getTurretHeading(long timestamp)		{		return(turret);		}		/**	*/	public void resetTurretHeading(double heading)		{		/* ensure in legal range */		heading = Units.ClipRad(heading); 		turret = heading;		}		double	desired_turret_heading = 0;	/**	*/	public void setTurretHeading(long timestamp, double heading)		{		/* ensure in legal range */		desired_turret_heading = Units.ClipRad(heading);		}		private double desired_speed = 0;	/**	*/ 	public void setSpeed(long timestamp, double speed)		{		/* ensure legal range */		if (speed > 1.0) speed = 1.0;		else if (speed < 0) speed = 0;		desired_speed = speed;		}	private double base_speed = MAX_TRANSLATION;	/**	*/	public void setBaseSpeed(double speed)		{		if (speed > MAX_TRANSLATION) speed = MAX_TRANSLATION;		else if (speed < 0) speed = 0;		base_speed = speed;		}	private	boolean	gripper_closed = false;	private boolean trigger_mode = false;	private SimulatedObject in_gripper = null;	/**	 * 0 closed 1 open.  -1 trigger mode.	 */	public void setGripperFingers(long timestamp, double grip)		{		if (grip>=1)			{			grip = 1;			gripper_closed = false;			trigger_mode = false;			}		if (grip==0)			{			trigger_mode = false;			}		if (grip < 0)			{			grip = 1; //open			trigger_mode = true;			gripper_closed = false;			}		//gripper_closed = true;		/*--- if closing the gripper ---*/		// see if there is something to pick up and gripper not already		// closed		if (((grip == 0)||trigger_mode)			&&(gripper_closed==false)			&&(in_gripper == null))			{			/*--- find gripper position in global coord ---*/			Vec2 gpos = new Vec2(RADIUS,0);			gpos.sett(turret);			gpos.add(position);			/*--- check all objects ---*/			for(int i = 0; i<all_objects.length; i++)				{				/*--- check if it's not self ---*/				if (all_objects[i].getID() != unique_id)					{					Vec2 tmp = all_objects[i].getCenter(gpos);					// check if can pick it up					if ((tmp.r< 					   MultiForageN150.GRIPPER_CAPTURE_RADIUS)						&&(all_objects[i].isPickupable())						&&(all_objects[i].getVisionClass()>=0))						{						in_gripper = all_objects[i];						all_objects[i].pickUp(							(SimulatedObject) this);						trigger_mode = false;						gripper_closed = true;						break;						}					}				}			}		else if (grip == 1)		/*--- if opening the gripper ---*/			{			// see if we should put something down			if (in_gripper != null)				{				//System.out.println("putdown "+trigger_mode					//+gripper_closed);				Vec2 gpos = new Vec2(RADIUS,0);				gpos.sett(turret);				gpos.add(position);				in_gripper.putDown(gpos);				in_gripper = null;				}			gripper_closed = false;			trigger_mode = false;			}		if (grip == 0)			{			trigger_mode = false;			gripper_closed = true;			}		}        private long    last_Opponentst = 0;        private Vec2    last_Opponents[];        /**         * Get an array of Vec2s that point egocentrically from the         * center of the robot to the opponents currently sensed by the         * robot         * @param timestamp only get new information if 	 *		timestamp > than last call or timestamp == -1 .         * @return the sensed Opponents.         */        public Vec2[] getOpponents(long timestamp)                {                if((timestamp > last_Opponentst)||(timestamp == -1))                        {                        if (timestamp != -1) last_Opponentst = timestamp;                        last_Opponents = kin_sensor.getOpponents(all_objects);                        }                return(last_Opponents);                }        /**         * Return an int represting the player's ID on the team.         * This value may not be valid if the simulation has not         * been "set up" yet.  Do not use it during initialization.         * @param timestamp only get new information if         *      timestamp > than last call or timestamp == -1 .         * @return the number.         */        public int getPlayerNumber(long timestamp)                {                return(kin_sensor.getPlayerNumber(all_objects));                }        private long    last_Teammatest = 0;        private Vec2    last_Teammates[] = new Vec2[0];        /**         * Get an array of Vec2s that point egocentrically from the         * center of the robot to the teammates currently sensed by the         * robot.         * @param timestamp only get new information if         *      timestamp > than last call or timestamp == -1 .         * @return the sensed teammates.         */        public Vec2[] getTeammates(long timestamp)                {                if((timestamp > last_Teammatest)||(timestamp == -1))                        {                        if (timestamp != -1) last_Teammatest = timestamp;                        last_Teammates = kin_sensor.getTeammates(all_objects);                        }                return(last_Teammates);                }        private double  kin_rangeM = 4.0;        /**         * Set the maximum range at which a sensor reading should be considered         * kin.  Beyond this range, the readings are ignored.         * Also used by opponent sensor.         * The default range on startup is 1 meter.         * @param range the range in meters.         */        public void setKinMaxRange(double range)                {                kin_rangeM = range;                kin_sensor.setKinMaxRange(range);                }	/**	 * NOT IMPLEMENTED	 */	public void setGripperHeight(long timestamp, double position)		{		/* todo */		}        /*--- Transceiver methods ---*/        public void multicast(int[] ids, Message m)                throws CommunicationException                {                transceiver.multicast(ids, m, all_objects);                }        public void broadcast(Message m)                {                transceiver.broadcast(m, all_objects);                }        public void unicast(int id, Message m)                throws CommunicationException                {                transceiver.unicast(id, m, all_objects);                }        public CircularBufferEnumeration getReceiveChannel()                {                return(transceiver.getReceiveChannel());                }        public void setCommunicationMaxRange(double m)                {                transceiver.setCommunicationMaxRange(m);                }        public void receive(Message m)                {                transceiver.receive(m);                }        public boolean connected()                {                return(true);                }	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧洲日韩av| 国产精品国产精品国产专区不蜜| 中文字幕一区二区三区色视频| 午夜视频在线观看一区| 成人av在线网| 精品国产一区久久| 性做久久久久久| 99综合电影在线视频| 精品久久一区二区三区| 亚洲国产精品精华液网站| 99综合电影在线视频| 久久天天做天天爱综合色| 日韩在线一区二区| 日本福利一区二区| 国产精品久久久久9999吃药| 精品一区免费av| 欧美日韩在线播放三区| 亚洲欧美二区三区| 波多野结衣中文字幕一区| 欧美成人bangbros| 日韩福利电影在线| 欧美巨大另类极品videosbest| 亚洲黄色小视频| 91蜜桃在线观看| 亚洲欧洲在线观看av| 成人免费毛片嘿嘿连载视频| 久久免费午夜影院| 国产一区三区三区| 精品国产一区二区三区久久影院 | 精品福利在线导航| 视频一区在线播放| 欧美日韩精品一区二区天天拍小说| 一区二区三区中文字幕电影| 99精品国产一区二区三区不卡| 国产日产欧美一区二区三区| 黑人巨大精品欧美一区| 91精品国产麻豆| 蜜桃一区二区三区在线| 欧美一区二区三区小说| 青青草原综合久久大伊人精品优势| 欧美日韩国产高清一区二区三区| 亚洲18色成人| 欧美一区二区性放荡片| 全国精品久久少妇| 日韩免费观看高清完整版| 蜜臀av性久久久久蜜臀av麻豆| 日韩情涩欧美日韩视频| 久久精品国产在热久久| 26uuu亚洲综合色欧美| 精品一区二区免费看| 精品成人佐山爱一区二区| 狠狠久久亚洲欧美| 国产欧美精品一区二区色综合 | 99久久综合精品| 亚洲视频免费在线观看| 色婷婷av久久久久久久| 亚洲最快最全在线视频| 欧美日韩精品久久久| 奇米色777欧美一区二区| 精品美女在线播放| 国产精品系列在线观看| 亚洲欧洲av一区二区三区久久| 色综合久久久久综合体| 亚洲成人你懂的| 精品奇米国产一区二区三区| 国模娜娜一区二区三区| 国产精品视频yy9299一区| 一本一道久久a久久精品综合蜜臀| 亚洲综合色成人| 91精品国产91久久综合桃花| 国产在线不卡视频| 亚洲人午夜精品天堂一二香蕉| 91成人免费在线| 奇米精品一区二区三区在线观看一 | 国产在线视频一区二区三区| 国产精品短视频| 欧洲av一区二区嗯嗯嗯啊| 蜜桃视频免费观看一区| 欧美激情一区二区三区四区| 色视频成人在线观看免| 日本v片在线高清不卡在线观看| 久久午夜国产精品| 一本大道av一区二区在线播放| 午夜久久久久久| 国产无人区一区二区三区| 日本精品视频一区二区| 毛片av中文字幕一区二区| 中文av一区特黄| 欧美日韩另类一区| 国产成人免费在线观看不卡| 一区二区三区av电影| 精品国精品国产| 91成人国产精品| 久久激五月天综合精品| 日韩美女精品在线| 欧美一级电影网站| 色综合中文字幕国产 | 欧美激情艳妇裸体舞| 欧美日韩一区二区三区在线看| 国产一区啦啦啦在线观看| 亚洲一区二区精品3399| 久久蜜桃av一区二区天堂| 欧美亚洲自拍偷拍| 国产在线视频一区二区三区| 亚洲国产一区视频| 国产农村妇女精品| 91精品国产入口| 91视频精品在这里| 国产一区在线精品| 日韩国产在线一| 亚洲婷婷综合色高清在线| 精品99一区二区三区| 欧美在线视频全部完| 成人动漫视频在线| 狠狠色丁香久久婷婷综合丁香| 亚洲国产成人av| 亚洲视频综合在线| 国产亚洲综合在线| 日韩一区二区中文字幕| 色欧美88888久久久久久影院| 国产成人综合在线观看| 青草国产精品久久久久久| 亚洲免费看黄网站| 国产日韩欧美精品综合| 欧美videos中文字幕| 欧美日韩国产欧美日美国产精品| 成人激情动漫在线观看| 国内精品国产三级国产a久久| 爽好多水快深点欧美视频| 亚洲精品日韩一| 亚洲国产成人在线| 久久久精品天堂| 欧美电影免费观看高清完整版在| 欧美日韩激情一区二区| 色狠狠一区二区三区香蕉| 成人av在线播放网址| 国产91精品久久久久久久网曝门| 韩日精品视频一区| 精品亚洲免费视频| 蜜臀久久99精品久久久久久9| 亚洲不卡在线观看| 亚洲午夜一区二区| 亚洲综合男人的天堂| 一区二区免费在线| 最好看的中文字幕久久| 中文字幕国产一区二区| 中文字幕成人在线观看| 国产欧美一区二区精品性| 精品乱人伦小说| 久久免费精品国产久精品久久久久| 欧美大片日本大片免费观看| 欧美一区二区三区小说| 日韩一区二区在线播放| 欧美一级片免费看| 欧美一级午夜免费电影| 欧美一区永久视频免费观看| 911国产精品| 555夜色666亚洲国产免| 欧美福利视频一区| 日韩欧美综合在线| 欧美成人精精品一区二区频| 精品少妇一区二区| 久久先锋影音av| 国产精品免费aⅴ片在线观看| 国产精品拍天天在线| 中文字幕在线不卡| 樱桃视频在线观看一区| 亚洲一区二区在线免费观看视频| 一级中文字幕一区二区| 亚洲第一综合色| 日本网站在线观看一区二区三区| 日本 国产 欧美色综合| 国产在线视频一区二区三区| 国产成a人无v码亚洲福利| jiyouzz国产精品久久| 色哟哟国产精品| 欧美日韩国产一级| 精品捆绑美女sm三区| 国产午夜精品在线观看| 中文字幕五月欧美| 亚洲图片欧美色图| 美女高潮久久久| 国产99久久久久久免费看农村| www..com久久爱| 欧美日韩免费观看一区三区| 日韩欧美一区二区免费| 国产偷国产偷亚洲高清人白洁| 国产精品国产自产拍在线| 亚洲国产一区二区三区| 裸体一区二区三区| 高清不卡在线观看| 日本黄色一区二区| 日韩一区二区在线播放| 国产欧美日本一区二区三区| 一区二区三区免费网站| 秋霞国产午夜精品免费视频| 国产99久久久久| 欧美日韩卡一卡二| 久久久精品免费观看| 亚洲激情网站免费观看|