Strange output from trig function

More
12 Nov 2019 20:12 #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 or Create an account to join the conversation.

More
13 Nov 2019 06:18 #150268 by Hakan
Replied by Hakan on topic Strange output from trig function
I suppose 35 is in degrees. trig functions take radians as input. 35 has to be in radians.

Please Log in or Create an account to join the conversation.

Time to create page: 0.051 seconds
Powered by Kunena Forum