Strange output from trig function
- An
- Offline
- Senior Member
Less
More
- Posts: 53
- Thank you received: 3
12 Nov 2019 20:12 #150245
by An
Strange output from trig function was created 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
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.
- Hakan
- Offline
- Platinum Member
Less
More
- Posts: 504
- Thank you received: 157
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