当前位置: 首页>>代码示例>>C++>>正文


C++ Agent::getDistanceEvaluator方法代码示例

本文整理汇总了C++中Agent::getDistanceEvaluator方法的典型用法代码示例。如果您正苦于以下问题:C++ Agent::getDistanceEvaluator方法的具体用法?C++ Agent::getDistanceEvaluator怎么用?C++ Agent::getDistanceEvaluator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Agent的用法示例。


在下文中一共展示了Agent::getDistanceEvaluator方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: agent

	AnytimeBidirectionalEST(const Workspace &workspace, const Agent &agent, const InstanceFileMap &args, bool quiet = false,
		double gBound = std::numeric_limits<double>::infinity()) :
		workspace(workspace), agent(agent),
		forwardKDTree(KDTreeType(), agent.getDistanceEvaluator(), agent.getTreeStateSize()), backwardKDTree(KDTreeType(), agent.getDistanceEvaluator(), agent.getTreeStateSize()),
		quiet(quiet), gBound(gBound) {
		
		collisionCheckDT = args.doubleVal("Collision Check Delta t");
		goalBias = args.doubleVal("Goal Bias");
		howManySamplePoints = args.integerVal("Number of Sample Points");
		samplePointRadius = args.doubleVal("Sample Point Radius");
		linkRadius = args.doubleVal("Link Radius");

		if(!quiet) {
			dfpair(stdout, "collision check dt", "%g", collisionCheckDT);
			dfpair(stdout, "number of sample points", "%u", howManySamplePoints);
		}

		unsigned int regionCount = discretization.getCellCount();
		forwardRegions.reserve(regionCount);
		backwardRegions.reserve(regionCount);
		for(unsigned int i = 0; i < regionCount; ++i) {
			forwardRegions.push_back(new RegionNode(i));
			backwardRegions.push_back(new RegionNode(i));
		}

		samplesGenerated = edgesGenerated = samplesAdded = edgesAdded = 0;

		timeout = args.doubleVal("Timeout");

		selfPtr = this;
	}
开发者ID:skiesel,项目名称:motionplanningtoolkit,代码行数:31,代码来源:anytimebidirectionalest.hpp

示例2: go_AnytimeRRT

void go_AnytimeRRT(const InstanceFileMap &args, const Agent &agent, const Workspace &workspace,
            const typename Agent::State &start, const typename Agent::State &goal) {

	clock_t startT = clock();

	dfpair(stdout, "planner", "%s", "Anytime RRT");
	// typedef flann::KDTreeSingleIndexParams KDTreeType;
	typedef flann::KDTreeIndexParams KDTreeType;
	typedef FLANN_KDTreeWrapper<KDTreeType, typename Agent::DistanceEvaluator, typename Agent::Edge> KDTree;
	typedef UniformSampler<Workspace, Agent, KDTree> USampler;
	typedef GoalBiasSampler<Agent, USampler> GBSampler;
	typedef TreeInterface<Agent, KDTree, GBSampler> TreeInterface;
	typedef AnytimeRRT<Workspace, Agent, TreeInterface> Planner;

	/* planner config */

	KDTreeType kdtreeType(1);
	KDTree kdtree(kdtreeType, agent.getDistanceEvaluator(), agent.getTreeStateSize());
	USampler uniformsampler(workspace, agent, kdtree);

	double goalBias = args.exists("Goal Bias") ? args.doubleVal("Goal Bias") : 0;
	dfpair(stdout, "goal bias", "%g", goalBias);

	GBSampler goalbiassampler(uniformsampler, goal, goalBias);
	TreeInterface treeInterface(kdtree, goalbiassampler);
	Planner planner(workspace, agent, treeInterface, args);

	go_COMMONANYTIME<Planner, Workspace, Agent>(args, planner, workspace, agent, start, goal, startT);
}
开发者ID:skiesel,项目名称:motionplanningtoolkit,代码行数:29,代码来源:anytimeplanners.hpp

示例3: insertionInterface

	SST(const Workspace &workspace, const Agent &agent,
		InsertionInteface &insertionInterface, QueryInterface &queryInterface, double startingRadius, double resizeThreshold,
		unsigned int historySize = 100) : insertionInterface(insertionInterface), queryInterface(queryInterface),
		witnessInterface(KDTreeType(), agent.getDistanceEvaluator(), agent.getTreeStateSize()), radius(startingRadius), resizeThreshold(resizeThreshold),
		history(historySize), historyIndex(0), historyFails(0), historyFilled(false) {}
开发者ID:skiesel,项目名称:motionplanningtoolkit,代码行数:5,代码来源:sst.hpp


注:本文中的Agent::getDistanceEvaluator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。