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


C++ Finger::close方法代码示例

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


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

示例1: InitialPose_keyboard

//***
void InitialPose_keyboard(){
	switch( kbCmd ){
		case '-':
			if(speed>0.2) speed-=(float)0.1;
			setDefaultArmSpeed(speed);
			break;
		case '+':
			if(speed<1.2) speed+=(float)0.1;
			setDefaultArmSpeed(speed);
			break;
		case 'a':
			t << -0.001f,0,0,0,0,0;
			Move_L_Rel(t,0);
			first_x = T07Cmd(0,3);
			break;
		case 'd':
			t << 0.001f,0,0,0,0,0;
			Move_L_Rel(t,0);
			first_x = T07Cmd(0,3);
			break;
		case 'w':
			t << 0,0.001f,0,0,0,0;
			Move_L_Rel(t,0);
			first_y = T07Cmd(1,3);
			break;
		case 's':
			t << 0,-0.001f,0,0,0,0;
			Move_L_Rel(t,0);
			first_y = T07Cmd(1,3);
			break;
		case 'r':
			t << 0,0,0.01f,0,0,0;
			Move_L_Rel(t,0);
			while(MOVL){};
			first_z = T07Cmd(2,3);
			break;
		case 'f':
			t << 0,0,-0.01f,0,0,0;
			Move_L_Rel(t,0);
			while(MOVL){};
			first_z = T07Cmd(2,3);
			break;
		case 'z':
			
			T <<  -1.0f,  0.0f,  0.0f,  first_x, //
				   0.0f,  1.0f,  0.0f,  first_y, //
				   0.0f,  0.0f, -1.0f,  first_z, //-0.2726
				   0.0f,  0.0f,  0.0f,  1.0f;
			Move_L_Abs(T,0);
			
			while(MOVL){system("cls");
					DisplayLoop(speed);}
			break;
		case 'j':
			t << -0.11f,0,0,0,0,0;
			Move_L_Rel(t,0);
			break;
		case 'l':
			t << 0.11f,0,0,0,0,0;
			Move_L_Rel(t,0);
			break;
		case 'i':
			t << 0,0.08f,0,0,0,0;
			Move_L_Rel(t,0);
			break;
		case 'k':
			t << 0,-0.08f,0,0,0,0;
			Move_L_Rel(t,0);
			break;
		case 'b':
			t << 0,0,-0.12f,0,0,0;
			Move_L_Rel(t,0);
			while(MOVL){};
			finger.close();
			t << 0,0,0.12f,0,0,0;
			Move_L_Rel(t,0);
			break;
		case 'n':
			finger.move(80);
			break;
		case 'o':
			outputFile.open("trace.txt");
			write=true;
			t << 0.10f,0,0,0,0,0;
			Move_L_Rel(t,0);
			while(MOVL){};
			write=false;
			outputFile.close();
			break;
		case 'm':
			Move_Contour();
			break;
		case 'p':
			z_axis_black = -0.20;
			//draw edge
			T <<  -1.0f,  0.0f,  0.0f,  sketchPositionXY[sketchIndex][0](0), //
					0.0f,  1.0f,  0.0f,  sketchPositionXY[sketchIndex][0](1), //
					0.0f,  0.0f, -1.0f,  z_axis_black+(float)0.01, //
					0.0f,  0.0f,  0.0f,  1.0f;
//.........这里部分代码省略.........
开发者ID:momentchan,项目名称:Drawing-Robot-Arm-Control,代码行数:101,代码来源:LuoLitaArm.cpp

示例2: MyLoop_keyboard

void MyLoop_keyboard(){
	//Vector6f t;
	//Matrix4f T;
	
	switch( kbCmd ){
		case 'c':
			sketchIndex = 0;
			fillIndex = 0;
			break;
		case 'v':
			fillIndex = 0;
			break;
		case '-':
			if(speed>0.2) speed-=(float)0.1;
			setDefaultArmSpeed(speed);
			break;
		case '+':
			if(speed<1.2) speed+=(float)0.1;
			setDefaultArmSpeed(speed);
			break;
		case 'w':
			t << 0,0.05f,0,0,0,0;
			Move_L_Rel(t,0);
			break;
		case 's':
			t << 0,-0.05f,0,0,0,0;
			Move_L_Rel(t,0);
			break;
		case 'a':
			t << -0.05f,0,0,0,0,0;
			Move_L_Rel(t,0);
			break;
		case 'd':
			t << 0.05f,0,0,0,0,0;
			Move_L_Rel(t,0);
			break;
		case 'r':
			t << 0,0,0.001f,0,0,0;
			Move_L_Rel(t,0);
			while(MOVL){};
			z_axis_color = T07Cmd(2,3);
			break;
		case 'f':
			t << 0,0,-0.001f,0,0,0;
			Move_L_Rel(t,0);
			while(MOVL){};
			z_axis_color = T07Cmd(2,3);
			break;
		case 't':
			t << 0,0,0.001f,0,0,0;
			Move_L_Rel(t,0);
			while(MOVL){};
			z_axis_black = T07Cmd(2,3);
			break;
		case 'g':
			t << 0,0,-0.001f,0,0,0;
			Move_L_Rel(t,0);
			while(MOVL){};
			z_axis_black = T07Cmd(2,3);
			break;
		case 'y':
			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){};
			break;
		case 'h':
			T <<  -1.0f,  0.0f,  0.0f,  centerX, //
				   0.0f,  1.0f,  0.0f,  centerY, //
				   0.0f,  0.0f, -1.0f,  -0.085f, //
				   0.0f,  0.0f,  0.0f,  1.0f;
			Move_L_Abs(T,0);
			break;
		case 'u': // tune short pen
			// Go to position of pen
			T <<  -1.0f,  0.0f,  0.0f,  first_x, //
				0.0f,  1.0f,  0.0f,  first_y, //
				0.0f,  0.0f, -1.0f,  first_z, //-0.2726
				0.0f,  0.0f,  0.0f,  1.0f;
			Move_L_Abs(T,0);
			while(MOVL){system("cls");	DisplayLoop(speed);}

			// Grasp pen
			t << 0,0,-0.12f,0,0,0;
			Move_L_Rel(t,0);
			while(MOVL){};
			finger.close();
			t << 0,0,0.12f,0,0,0;
			Move_L_Rel(t,0);
			while(MOVL){};

			// Move to via point position
			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);}
//.........这里部分代码省略.........
开发者ID:momentchan,项目名称:Drawing-Robot-Arm-Control,代码行数:101,代码来源:LuoLitaArm.cpp


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