/** #Example showing how to set position target for LArm # The 3 coordinates are absolute LArm position in NAO_SPACE # Position in meter in x, y and z axis.
# X Axis LArm Position feasible movement = [ +0.00, +0.12] meter # Y Axis LArm Position feasible movement = [ -0.05, +0.10] meter # Y Axis RArm Position feasible movement = [ -0.10, +0.05] meter # Z Axis LArm Position feasible movement = [ -0.10, +0.10] meter **/
/** # wbSetEffectorControl is a non blocking function # time.sleep allow head go to his target # The recommended minimum period between two successives set commands is # 0.2 s. **/ for(int i=0;ilength;i++){ Variant targetCoordinate = new Variant(newfloat[]{targetCoordinateList[i][0]+effectorInit[0], targetCoordinateList[i][1]+effectorInit[1],targetCoordinateList[i][2]+effectorInit[2]}); motionProxy.wbSetEffectorControl(effectorName, targetCoordinate); System.out.println("target"+i+": X:"+(targetCoordinateList[i][0]+effectorInit[0])+" Y:" +(targetCoordinateList[i][1]+effectorInit[1]) +" Z:"+(targetCoordinateList[i][2]+effectorInit[2])); try { Thread.sleep(1000); //original is 4 sec but it's too slow } catch (InterruptedException e) { e.printStackTrace(); } }
//Deactiate Head Tracking isEnabled = false; motionProxy.wbEnableEffectorControl(effectorName,isEnabled);