本文整理汇总了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));
}
}
示例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()));
}
}
示例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;
}