本文整理汇总了C++中Finger::init方法的典型用法代码示例。如果您正苦于以下问题:C++ Finger::init方法的具体用法?C++ Finger::init怎么用?C++ Finger::init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Finger
的用法示例。
在下文中一共展示了Finger::init方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main( int argc, char **argv, char **envp)
{
readDrawPoints();
//readTrace();
bool run =true;//
if(run){
init_LuoLita_1();
LitaHand.GripperMove_Abs_To(75.0f, 1);
// for periodic timer code
LARGE_INTEGER liPeriod_1ms; // timer period
HANDLE hTimer1; // timer handle
//LARGE_INTEGER liPeriod_10ms; // timer period
//HANDLE hTimer2; // timer handle
// RTX periodic timer code:
// TO DO: Set default timer period to your desired time.
// The period needs to be an even multiple of the HAL
// period found in the control panel.
// This example uses a period of 500 micro seconds.
liPeriod_1ms.QuadPart = 10000;
//liPeriod_10ms.QuadPart = 100000;
Init_IMPCard();
// clear timer
//RtDeleteTimer( hTimer1 );
//RtDeleteTimer( hTimer2 );
// Create a periodic timer
if (! (hTimer1 = RtCreateTimer(
NULL, // security
0, // stack size - 0 uses default
TimerHandler1, // timer handler
NULL, // NULL context (argument to handler)
RT_PRIORITY_MAX, // priority
CLOCK_2) )) // RTX HAL timer
{
//
// TO DO: exception code here
// RtWprintf(L"RtCreateTimer error = %d\n",GetLastError());
ExitProcess(1);
}
if (! RtSetTimerRelative( hTimer1, &liPeriod_1ms, &liPeriod_1ms ))
{
//RtWprintf(L"RtSetTimerRelative error = %d\n",GetLastError());
// TO DO: exception code here
ExitProcess(1);
}
init_LuoLita_2();
LitaHand.GripperMove_Abs_To( 55.0f, 200);
/////////////////////////////////////////
kbCmd = 'j';
MainLoop_keyboard();
//Initial finger pose
finger.init();
finger.open();
finger.setMode('p');
finger.move(80);
setDefaultArmSpeed(0.5);
kbCmd = ' ';
while(!initialDone)
{
if ( _kbhit() )
kbCmd = _getche();
if ( kbCmd == kb_ESC )
break;
InitialPose_keyboard();
Sleep(29);
system("cls");
DisplayLoop(speed);
cout<<endl<<"first_x: "<<first_x<<"first_y: "<<first_y<<"first_z: "<<first_z<<endl;
}
cout<< endl << " Initialization is done . " <<endl;
Sleep(2000);
T << -1.0f, 0.0f, 0.0f, first_x, //
0.0f, 1.0f, 0.0f, first_y+0.1, //
0.0f, 0.0f, -1.0f, first_z+0.13, //-0.2726
0.0f, 0.0f, 0.0f, 1.0f;
Move_L_Abs(T,0);
while(MOVL){system("cls"); DisplayLoop(speed);}
T << -1.0f, 0.0f, 0.0f, centerX, //
0.0f, 1.0f, 0.0f, centerY, //
0.0f, 0.0f, -1.0f, 0.0f, //
0.0f, 0.0f, 0.0f, 1.0f;
Move_L_Abs(T,0);
while(MOVL){};
kbCmd = ' ';
while(1)
{
if ( _kbhit() )
//.........这里部分代码省略.........