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


C++ ProductManager::foundWam4方法代码示例

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


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

示例1: main

int main(int argc, char** argv) {

	// Message to user
	printf("\n"
			"                  *** Barrett WAM Autotensioning Utility ***\n"
			"\n"
			"This utility will autotension the specified cables of your WAM Arm.\n"
			"Cable tensioning is necessary after signs of the WAM cables becoming\n"
			"loose after extended use, or after replacing any cables on your WAM Arm.\n"
			"After completion of this routine, you must zero calibrate and gravity\n"
			"calibrate the WAM, as pulling tension from the cables will introduce\n"
			"offsets to your previous calibrations.\n"
			"\n"
			"WAMs with serial numbers < 5 and WAM wrists with serial numbers < 9 are not\n"
			"eligible for autotensioning.\n"
			"\n"
			"This program assumes the WAM is mounted such that the base is horizontal.\n"
			"\n"
			"\n");

	// For clean stack traces
	barrett::installExceptionHandler();

	// Create our product manager
	ProductManager pm;
	pm.waitForWam();

	if (pm.foundWam4()) {
		return wam_main<4>(argc, argv, pm, *pm.getWam4(true, NULL));
	} else if (pm.foundWam7()) {
		return wam_main<7>(argc, argv, pm, *pm.getWam7(true, NULL));
	}
}
开发者ID:zhaohongqiang,项目名称:libbarrett,代码行数:33,代码来源:autotension.cpp

示例2: startWam

boost::thread startWam(ProductManager& pm,
		boost::function<void (ProductManager&, systems::Wam<4>&)> wt4,
		boost::function<void (ProductManager&, systems::Wam<7>&)> wt7)
{
	pm.waitForWam();
	pm.wakeAllPucks();

	if (pm.foundWam4()) {
		return boost::thread(wt4, boost::ref(pm), boost::ref(*pm.getWam4()));
	} else {
		return boost::thread(wt7, boost::ref(pm), boost::ref(*pm.getWam7()));
	}
}
开发者ID:zhaohongqiang,项目名称:libbarrett,代码行数:13,代码来源:two_wams.cpp

示例3: main

int main() {
	ProductManager pm;
	SafetyModule& sm = *pm.getSafetyModule();
	SafetyModule::PendantState ps;

	// Optional: Instantiate a Wam object and start the realtime control loop
	if (pm.foundWam4()) {
		pm.getWam4(false);
	} else {
		pm.getWam7(false);
	}

	while (true) {
		sm.getPendantState(&ps);
		std::cout << ps.toString() << " " << ps.allSafe() << " " << ps.hasFaults() << "\n";
		usleep(1000000);
	}

	return 0;
}
开发者ID:jhu-lcsr-forks,项目名称:barrett,代码行数:20,代码来源:read_pendant_state.cpp


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