is it possible that programming the atom with the following can damage the atom?
i was using was to Transform the Rotation of Global coordinate to Local coordinate
i had added this to the code:
IKFeetPosX_NEW var sword ;Transformation of Feet X
IKFeetPosY_NEW var sword ;Transformation of Feet Y
sinCoxa var float ;Sine of OffsetCoxa (sin 40)
cosCoxa var float ;Cosine of OffsetCoxa (cos 40)
;-----------------------------[LEG INVERSE KINEMATICS]
;*Calculates the angles of the tibia and femur for the given position of the feet*
LegIK [IKFeetPosX, IKFeetPosY, IKFeetPosZ]
sinCoxa = 0.6428
cosCoxa = 0.7660
IKFeetPosX_NEW = -IKFeetPosX*cosCoxa - IKFeetPosY*sinCoxa ; Rotation of Global coordinate to Local coordinate
IKFeetPosY_NEW = IKFeetPosX*sinCoxa - IKFeetPosY*cosCoxa ; Rotation of Global coordinate to Local coordinate
IKFeetPosXZ = TOINT(FSQRT(TOFLOAT((IKFeetPosX_NEW *IKFeetPosX_NEW)+(IKFeetPosZ*IKFeetPosZ)))) ;Input position of the Feet X/Y/Z
IKCF = FSQRT(TOFLOAT(((IKFeetPosXZ-CoxaLength)*(IKFeetPosXZ-CoxaLength))+(IKFeetPosY_NEW *IKFeetPosY_NEW )))
GOSUB GetBoogTan [IKFeetPosXZ-CoxaLength, IKFeetPosY_NEW]
IKA1 = BoogTan
IKA2 = FACOS((TOFLOAT((FemurLength*FemurLength) - (TibiaLength*TibiaLength)) + (IKCF*IKCF)) / (TOFLOAT(2*Femurlength) * IKCF))
;IKFemurAngle
IKFemurAngle = (TOINT(((IKA1 + IKA2) * 180.0) / 3.141592)*-1)+90
;IKTibiaAngle
IKTibiaAngle = (90-TOINT(((FACOS((TOFLOAT((FemurLength*FemurLength) + (TibiaLength*TibiaLength)) - (IKCF*IKCF)) / TOFLOAT(2*Femurlength*TibiaLength)))*180.0) / 3.141592)) * -1
;IKCoxaAngle
GOSUB GetBoogTan [IKFeetPosZ, IKFeetPosX_NEW]
IKCoxaAngle = TOINT((BoogTan*180.0) / 3.141592)
IF(IKCF < TOFLOAT(FemurLength+TibiaLength-30)) THEN
IKSolution = POSITIVE ;Output POSITIVE IF the solution is possible
ELSE
IF(IKCF < TOFLOAT(FemurLength+TibiaLength)) THEN
IKSolutionWarning = POSITIVE ;Output POSITIVE IF the solution is NEARLY possible
ELSE
IKSolutionError = POSITIVE ;Output POSITIVE IF the solution is NOT possible
ENDIF
ENDIF
return
Note:
sinCoxa = 0.6428
cosCoxa = 0.7660
IKFeetPosX_NEW = -IKFeetPosXcosCoxa - IKFeetPosYsinCoxa ; Rotation of Global coordinate to Local coordinate
IKFeetPosY_NEW = IKFeetPosXsinCoxa - IKFeetPosYcosCoxa ; Rotation of Global coordinate to Local coordinate
and the warning i had was this:
http://i531.photobucket.com/albums/dd355/innerbreed/Capture-6.jpg
i re-worked the code and then got this.
http://i531.photobucket.com/albums/dd355/innerbreed/Capture-7.jpg
since adding this i cannot get the robot to function in the normal manor, even when i take this out and use original codes as before.???
[size=150]this code was sent to me but i dont blame anyone for this![/size]