Strange output from trig function

More
6 years 11 months ago #150245 by An
Hi,

Im getting a strange output when using a simple kinematic modification to the standard trivkins file. If i change the forward kinematics first line to

pos ->tran.x = joints[0]*cos(35);

and the first line of the inverse kins to

joints[0] = pos ->tran.x/cos(35);

When i run MDI

G1 f100 x10

I get the output in joint mode as 11.0657, the output in world mode actual and commanded is 10

I was expecting to get 12.207

It works fine when i use sqrt and other functions just seems to be related to sin, cos etc.

If anyone would be so kind as to enlighten me that would be excellent!

Thanks in advance

Please Log in to join the conversation.

More
6 years 11 months ago #150268 by Hakan
I suppose 35 is in degrees. trig functions take radians as input. 35 has to be in radians.

Please Log in to join the conversation.

Time to create page: 0.092 seconds
Powered by Kunena Forum