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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? targetdrive.cpp

?? 一個(gè)簡單使用的控制器
?? CPP
字號(hào):
#include "TargetDrive.h"#include <math.h>TargetDrive::TargetDrive(int tX, int tZ) {	targetX = tX;	targetZ = tZ;	robotAction = new RobotAction();	vfhState = new VFHState();	freeSectorsThreshold = 5;	printf("TargetDrive created\n");}double TargetDrive::driveTheta(double dTh) {	if(dTh > 25)		return 25;	if(dTh < -25)		return -25;	return dTh/2;}double TargetDrive::driveVel(double distSquare) {	if(distSquare > 100*100)		return 100;	else		return sqrt(distSquare);}// TODO: Kreisschluss// liefert aus numSectors Sektoren in freeSpaces angefangen von startSect an alle Anfangsindizes der Stuecke von Groesse mind pieceSize, linksrumvoid TargetDrive::freePieces(int freeSpaces [], int numSectors, int targetSect, int pieceSize, int** pieces, int piecesSize) {	int sectCount = 0;	int sectStart = -1;	int sectSize = 0;	int curSect = targetSect;	*pieces = new int[2 * numSectors];		// das sollte reichen, oder ?	piecesSize = 0;		for(sectCount = 0; sectCount < numSectors; sectCount++) {		curSect = targetSect + sectCount;		curSect %= numSectors;		if(freeSpaces[curSect] == 0) {			if(sectStart == -1)				sectStart = curSect;			sectSize++;				} else {			if(sectSize >= pieceSize) {				printf("Found Sector: Start: %d, Size: %d\n", sectStart, sectSize);				(*pieces)[piecesSize] = sectStart;				piecesSize++;				(*pieces)[piecesSize] = sectSize;				piecesSize++;			}			sectStart = -1;			sectSize = 0;		}	}	if(freeSpaces[curSect] == 0) {		// das letzte Stueck ist noch "offen"		int count;	// wieder von vorne anfangen		for(count = 0; count < numSectors; count++) {			curSect = targetSect + count;			curSect %= numSectors;			if(freeSpaces[curSect] == 0) {				sectSize++;			} else {	// ende des ueberlappenden sektors				if(sectSize >= pieceSize) {					printf("Found Sector: Start: %d, Size: %d\n", sectStart, sectSize);					(*pieces)[piecesSize] = sectStart;					piecesSize++;					(*pieces)[piecesSize] = sectSize;					piecesSize++;				}				break;	// nur einen Sektor verfolgen			}		}	}	return;}// TODO: direkt um targetsect/** *	berechnet den ersten Sektor vom ersten Vorkommen von num freien Sektoren nacheinander links von targetTh (inkl.) *	targetTh - Winkel th im Raum *	theta - Roboterwinkel im Raum */int TargetDrive::firstFreeSectorsLeft(double targetTh, int threshold, double theta) {   threshold=threshold;	// Sektor von targetTh bestimmen.	double sectorTheta = targetTh - theta;		// globale Koordinate -> lokale K.		while(sectorTheta > 360)		sectorTheta -= 360;	while(sectorTheta < - 360)		sectorTheta += 360;	features_vfh_pieces_message vfh = vfhState->getVFH();	int numSectors = vfh.numSectors;	double sectSize = 360/(double)numSectors;	int targetSect = (int) (sectorTheta / sectSize);	targetSect %= numSectors;	printf("targetTh: %.2f, robotTheta: %.2f, TargetSector: %.2f deg, %d \n", targetTh, theta, sectorTheta, targetSect);//	printf("\n\n1");//	freePieces(vfh.freespaceValues, numSectors, targetSect, 1);	printf("\n\n5");	int* pieces = NULL;	int piecesSize;	freePieces(vfh.freespaceValues, numSectors, targetSect, freeSectorsThreshold, &pieces, piecesSize);	if(piecesSize == 0)		// nichts frei		return -1;	int firstSectStart = pieces[0];	//int firstSectSize = pieces[1];		return firstSectStart;}/** *	berechnet den ersten Sektor vom ersten Vorkommen von num freien Sektoren nacheinander rechts von targetTh (inkl.) *	targetTh - Winkel th im Raum *	theta - Roboterwinkel im Raum */int TargetDrive::firstFreeSectorsRight(double targetTh, int threshold, double theta) {   threshold=threshold;	// Sektor von targetTh bestimmen.	double sectorTheta = targetTh - theta;		// globale Koordinate -> lokale K.		while(sectorTheta > 360)		sectorTheta -= 360;	while(sectorTheta < - 360)		sectorTheta += 360;	features_vfh_pieces_message vfh = vfhState->getVFH();	int numSectors = vfh.numSectors;	double sectSize = 360/(double)numSectors;	int targetSect = (int) (sectorTheta / sectSize);	targetSect %= numSectors;	printf("targetTh: %.2f, robotTheta: %.2f, TargetSector: %.2f deg, %d \n", targetTh, theta, sectorTheta, targetSect);//	printf("\n\n1");//	freePieces(vfh.freespaceValues, numSectors, targetSect, 1);	printf("\n\n5");	int* pieces = NULL;	int piecesSize;	freePieces(vfh.freespaceValues, numSectors, targetSect, freeSectorsThreshold, &pieces, piecesSize);	if(piecesSize == 0)		// nichts frei		return -1;	int lastSectStart = pieces[piecesSize - 2];	int lastSectSize = pieces[piecesSize - 1];		int startRight = lastSectStart + lastSectSize;	if(startRight > numSectors)		return 0;	// Weg direkt ist frei	return startRight;}double TargetDrive::getSafeTheta(double targetTh, double theta) {	if(!vfhState->init)		return 0;		printf("num right 5\n");	int sectRight = firstFreeSectorsRight(targetTh, freeSectorsThreshold, theta);	int sectLeft = firstFreeSectorsLeft(targetTh, freeSectorsThreshold, theta);printf("SafeTheta: right %d left %d\n", sectRight, sectLeft);	if((sectRight == 0) || (sectLeft == 0))		return targetTh;	int goalSect = -1;	if(sectRight == -1)		goalSect = sectLeft;	if(sectLeft == -1)		goalSect = sectRight;	features_vfh_pieces_message vfh = vfhState->getVFH();	if(sectLeft < (vfh.numSectors - sectRight))		goalSect = sectLeft;	else		goalSect = sectRight;	double ret = goalSect * 360.0/((double)vfh.numSectors);printf("GoalTheta: %.2f\n", ret);	return ret;}void TargetDrive::driveFrom(int x, int z, int theta) {//	printf("Start driveFrom\n");	int dx = targetX - x;	int dz = targetZ - z;	double targetTh = ((180.0/M_PI*atan2((double)dx, (double)dz)));	targetTh += 180;	double goalTh = getSafeTheta(targetTh, theta);	goalTh += 180;	double dTh = goalTh - theta;	while(dTh > 180)		dTh -= 360;	while(dTh < -180)		dTh += 360;		printf("Drive: dx:%d dz:%d targetTh:%.2f, dTh: %.2f\n", dx, dz, targetTh , dTh);		double distSquare = dx*dx + dz*dz;	 	if((dTh > -10) && (dTh < 10)) {		double vDrive = driveVel(distSquare);		robotAction->setVelocity((int)vDrive,0);		printf("Driving forward: %d\n", (int)vDrive);	} else {		double thDrive = driveTheta(dTh);		printf("Turning around: %d\n", (int)thDrive);		robotAction->setVelocity(0, (int)thDrive);	} }/********************************************************************* * (C) Copyright 2006 Albert Ludwigs University Freiburg *     Institute of Computer Science * * All rights reserved. Use of this software is permitted for * non-commercial research purposes, and it may be copied only * for that use. All copies must include this copyright message. * This software is made available AS IS, and neither the authors * nor the Albert Ludwigs University Freiburg make any warranty * about the software or its performance. *********************************************************************/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日产国产精品| 中文欧美字幕免费| 成a人片亚洲日本久久| 久久99国内精品| 天天色 色综合| 一区二区视频在线| 亚洲视频在线观看一区| 国产日韩欧美在线一区| www成人在线观看| 日韩午夜激情免费电影| 欧美一级高清片| 91精品国产综合久久久蜜臀粉嫩 | 色综合中文字幕| 99久久精品99国产精品| 国产一区91精品张津瑜| 日本免费新一区视频| 中文字幕一区二区三区视频| 久久久久国产成人精品亚洲午夜| 欧美日韩久久一区| 欧美日韩一区二区不卡| 欧美熟乱第一页| 欧美视频三区在线播放| 欧美图区在线视频| 欧美久久久久久久久中文字幕| 欧美日本在线播放| 91精品国产美女浴室洗澡无遮挡| 欧美一区二区日韩一区二区| 欧美一级二级三级蜜桃| 精品三级在线看| 久久蜜臀精品av| 欧美经典一区二区| 1000部国产精品成人观看| 国产精品国产三级国产aⅴ原创 | 亚洲欧洲综合另类| 亚洲电影一区二区三区| 天堂va蜜桃一区二区三区| 日韩精品视频网| 久久av资源网| 国产成人三级在线观看| hitomi一区二区三区精品| 91视频国产观看| 欧美三级在线视频| 欧美一二三区精品| 日本一区二区三区在线不卡| 亚洲日本青草视频在线怡红院| 亚洲国产美女搞黄色| 日韩va亚洲va欧美va久久| 国产一区二区视频在线| 99精品在线观看视频| 欧美性xxxxx极品少妇| 欧美一级夜夜爽| 欧美国产精品一区二区三区| 一区二区三区欧美| 美女性感视频久久| 国产精品一区二区男女羞羞无遮挡 | 91老师国产黑色丝袜在线| 欧美精品一二三| 久久久午夜电影| 亚洲欧美一区二区三区国产精品| 亚洲电影一级黄| 国产曰批免费观看久久久| 成a人片亚洲日本久久| 欧美日韩激情在线| 久久久久久久精| 亚洲女人的天堂| 九九九精品视频| 色综合视频在线观看| 日韩一区二区三区三四区视频在线观看 | 亚洲欧美另类久久久精品2019| 亚洲va在线va天堂| 日韩一区精品视频| 粉嫩aⅴ一区二区三区四区| 欧美日韩色一区| 亚洲国产激情av| 丝袜国产日韩另类美女| 成人国产精品免费| 日韩一级二级三级精品视频| 亚洲三级久久久| 美腿丝袜亚洲一区| 国产成人精品一区二| 色婷婷av一区二区三区gif| 日韩一区二区不卡| 国产精品国产自产拍高清av| 乱中年女人伦av一区二区| 色综合久久久久久久| 久久日一线二线三线suv| 亚洲自拍偷拍综合| 极品瑜伽女神91| 91网站最新网址| 久久综合中文字幕| 一区二区激情小说| 激情综合色播五月| 欧美日本韩国一区| 国产精品视频yy9299一区| 天天亚洲美女在线视频| 成人一区二区三区在线观看| 欧美一区三区四区| 一区二区成人在线观看| 成人视屏免费看| 91精品国产综合久久精品麻豆 | 26uuu国产电影一区二区| 亚洲成av人综合在线观看| 91在线免费视频观看| 中文字幕成人av| 国产麻豆91精品| 2020国产精品久久精品美国| 久久丁香综合五月国产三级网站| 欧美日韩黄色一区二区| 一区二区三区高清不卡| 99久久综合国产精品| 国产日韩v精品一区二区| 国产一区二区三区黄视频| 日韩欧美国产综合| 久久精品国产99久久6| 制服丝袜日韩国产| 五月激情丁香一区二区三区| 欧美日韩中文精品| 亚洲成人7777| 欧美日韩一卡二卡三卡| 午夜精品久久一牛影视| 717成人午夜免费福利电影| 日韩电影在线免费| 欧美一区二区国产| 日本不卡视频一二三区| 日韩精品一区二区三区在线| 久久国产日韩欧美精品| 欧美日韩高清一区二区不卡| 亚洲丝袜另类动漫二区| 欧美艳星brazzers| 一区二区三区四区精品在线视频| 成人免费看黄yyy456| 国产精品拍天天在线| 国产一区在线看| 中文字幕不卡在线观看| 国产乱码精品一区二区三区五月婷 | 51久久夜色精品国产麻豆| 男女男精品网站| 久久久影视传媒| 不卡在线视频中文字幕| 亚洲欧洲精品一区二区三区不卡| 91影视在线播放| 亚洲1区2区3区视频| 日韩一二在线观看| 国产成人免费视频网站高清观看视频| 久久精品一区二区三区不卡| 99久久亚洲一区二区三区青草| 亚洲免费在线视频一区 二区| 欧美主播一区二区三区美女| 日韩有码一区二区三区| 久久九九久精品国产免费直播| 成人av在线播放网址| 亚洲一级片在线观看| 欧美大片一区二区| 成人激情午夜影院| 亚洲自拍偷拍欧美| 精品久久久久99| 99久久免费国产| 欧美96一区二区免费视频| 中文字幕av不卡| 欧美日韩一区二区三区在线| 精品一区二区三区免费播放| 亚洲国产精品高清| 欧美色老头old∨ideo| 国产综合成人久久大片91| 亚洲欧美一区二区三区极速播放 | 精品国产露脸精彩对白| 成人a免费在线看| 日本视频一区二区| 国产精品你懂的在线| 欧美日韩一区视频| 国产一区二区三区观看| 亚洲精品乱码久久久久久 | 欧美日韩日日骚| 国产乱妇无码大片在线观看| 亚洲精品免费在线| 精品成人在线观看| 91福利视频在线| 国产精品1区2区3区| 亚洲在线视频一区| 久久久久久免费网| 日韩欧美视频一区| 欧美日韩国产影片| 色8久久人人97超碰香蕉987| 成人一区二区三区在线观看| 狠狠色综合播放一区二区| 午夜精品福利一区二区蜜股av| 亚洲品质自拍视频| 亚洲欧美一区二区在线观看| 久久婷婷色综合| 欧美精品一区二区三区久久久| 欧美一区二区不卡视频| 欧美亚日韩国产aⅴ精品中极品| 成人福利视频在线看| 国产91在线观看丝袜| 国产精品原创巨作av| 狠狠狠色丁香婷婷综合激情| 美女国产一区二区三区| 日本不卡免费在线视频| 日韩精品欧美成人高清一区二区| 亚洲一区精品在线|