}
}
private Rotation[] getNewArmPosition( Arm arm, ArmTarget newArmPosition )
{
Rotation upperArmPitch = new Rotation();
Rotation lowerArmPitch = new Rotation();
Rotation handPitch = new Rotation();
//define roations
switch ( newArmPosition )
{
case EWalk1:
{
upperArmPitch.set( 45.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( 0.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 0.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
break;
}
case EWalk2:
{
upperArmPitch.set( -45.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( 0.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 0.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
break;
}
case ETest1:
{
upperArmPitch.set( 0.0f, 0.0f, -45.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( -30.0f, -30.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 0.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
break;
}
case ETest2:
{
upperArmPitch.set( 90.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( -90.0f, -90.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 0.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
break;
}
case ERestInHip:
{
upperArmPitch.set( 0.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( 0.0f, -10.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 0.0f, 0.0f, -90.0f, RotationSpeed.LIMBS );
break;
}
case EPickUp:
{
upperArmPitch.set( -75.0f, 0.0f, -30.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( -40.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 0.0f, -67.5f, -90.0f, RotationSpeed.LIMBS );
break;
}
case EHangDown:
{
upperArmPitch.set( 0.0f, 20.0f, 0.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( 0.0f, -25.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 0.0f, -10.0f, -90.0f, RotationSpeed.LIMBS );
break;
}
case EPointToSide:
{
upperArmPitch.set( 0.0f, -50.0f, 0.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( 0.0f, -110.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 0.0f, -95.0f, 0.0f, RotationSpeed.LIMBS );
break;
}
case EAimLow:
{
upperArmPitch.set( -50.0f, 50.0f, 0.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( -60.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( -95.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
break;
}
case EEllbowBack:
{
upperArmPitch.set( 0.0f, 0.0f, 90.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( 0.0f, 40.0f, 90.0f, RotationSpeed.LIMBS );
handPitch.set( -55.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
break;
}
case EAimHigh:
{
upperArmPitch.set( -100.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( 0.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 90.0f, -82.5f, 90.0f, RotationSpeed.LIMBS );
break;
}
case EPointToCeiling:
{
upperArmPitch.set( 0.0f, -120.0f, 0.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( 0.0f, 120.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 185.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
break;
}
case EReloadPrimaryHandUp:
{
upperArmPitch.set( -45.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( 0.0f, 30.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 0.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
break;
}
case EReloadPrimaryHandDown:
{
upperArmPitch.set( -45.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( 0.0f, 50.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 0.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
break;
}
case EReloadSecondaryHandDown:
{
upperArmPitch.set( -45.0f, 0.0f, -45.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( 0.0f, 45.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 0.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
break;
}
case EReloadSecondaryHandUp:
{
upperArmPitch.set( -45.0f, 0.0f, -45.0f, RotationSpeed.LIMBS );
lowerArmPitch.set( 0.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
handPitch.set( 0.0f, 0.0f, 0.0f, RotationSpeed.LIMBS );
break;
}
}
//assign to specified arm
switch ( arm )
{
case ELeft:
{
//flip y axis for left arm!
upperArmPitch.set( upperArmPitch.x, -upperArmPitch.y, -upperArmPitch.z, RotationSpeed.UPPER_ARM );
lowerArmPitch.set( lowerArmPitch.x, -lowerArmPitch.y, -lowerArmPitch.z, RotationSpeed.LOWER_ARM );
handPitch.set( handPitch.x, -handPitch.y, -handPitch.z, RotationSpeed.HAND );
break;
}
case ERight:
{
upperArmPitch.set( upperArmPitch.x, upperArmPitch.y, upperArmPitch.z, RotationSpeed.UPPER_ARM );
lowerArmPitch.set( lowerArmPitch.x, lowerArmPitch.y, lowerArmPitch.z, RotationSpeed.LOWER_ARM );
handPitch.set( handPitch.x, handPitch.y, handPitch.z, RotationSpeed.HAND );
break;
}
}