*SOLVED* Recompiling genhexkins

More
16 Jan 2012 10:32 - 16 Jan 2012 11:07 #16809 by honey
Ok I think that I run "make" in the right way and my file armkins.c is compiled because when I run emc I haven't errors anymore. But there are some problems yet...the kinematics or the module that I have written is not completly correct because when I switch on world mode the coordinates x and z drive crazy...
Someone can read my kinematic file armkins.c and give me some advice?
Last edit: 16 Jan 2012 11:07 by honey.

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

More
16 Jan 2012 11:20 #16811 by andypugh
honey wrote:

module that I have written is not completly correct because when I switch on world mode the coordinates x and z drive crazy...
Someone can read my kinematic file armkins.c and give me some advice?


I might get time later, but I have previously looked at a similar kinematics and found it very helpful to set up a spreadsheet that performs the forwards then reverse calculations on a few positions, to see if the same numbers that went in come out again.

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

More
16 Jan 2012 12:27 #16812 by cncbasher
where are you initializing your default values ?

can you post a video showing the error etc
and what you expect to happen

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

More
16 Jan 2012 13:00 #16815 by honey
cncbasher wrote:

where are you initializing your default values ?

You can me explain better what you mean? the values of the links of robot?

can you post a video showing the error etc
and what you expect to happen


As soon as I switch on world mode, the values of x and z changing always and never stop. I do nothing, just change mode and I have this strange thing!
Attachments:

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

More
17 Jan 2012 09:07 #16838 by honey
andypugh wrote:

I might get time later, but I have previously looked at a similar kinematics and found it very helpful to set up a spreadsheet that performs the forwards then reverse calculations on a few positions, to see if the same numbers that went in come out again.


I have used standard formulas for the forwards and inverse kinematics. So, I think that they aren't the problem. But I haven't specified the possible singularities....this could be it? Or maybe there are something else?

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

More
17 Jan 2012 09:49 - 17 Jan 2012 10:01 #16839 by andypugh
honey wrote:

andypugh wrote:

I have used standard formulas for the forwards and inverse kinematics. So, I think that they aren't the problem.?


It is often an issue with precision, where the forwards and inverse kinematics give ever so slightly different answers because of rounding.
It might also be that you have an expression that is being interpreted as an integer when it needs to be a float.

My first thought is that the PM_PI/180 and 180/PM_PI might be causing problems, try 180.0 to make it clear to the compiler that those are a floating-point value. posemath,h defines TO_DEG (180./PM_PI) and TO_RAD (PM_PI/180.) as constants, too, if you prefer. Note that it uses 180. rather than 180 to make is clear how the value is represented.
This is a "feature" of C.

The same is true for the 190 and 245 values (190 is a joint length, presumably, not a 180 that is wrong?)

Last edit: 17 Jan 2012 10:01 by andypugh.

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

More
17 Jan 2012 10:29 - 17 Jan 2012 10:37 #16841 by honey
andypugh wrote:

My first thought is that the PM_PI/180 and 180/PM_PI might be causing problems, try 180.0 to make it clear to the compiler that those are a floating-point value. posemath,h defines TO_DEG (180./PM_PI) and TO_RAD (PM_PI/180.) as constants, too, if you prefer. Note that it uses 180. rather than 180 to make is clear how the value is represented.
This is a "feature" of C.


Ok I'll edit in this way the values. I have a doubt now....the conversion Deg to Rad and viceversa. In my ini file I setted mm and deg as unit. What the calculations of module of kinematics (as pumakins that I have edited) return?

The same is true for the 190 and 245 values (190 is a joint length, presumably, not a 180 that is wrong?)

Yes, 190 and 245 are joint lenght
Last edit: 17 Jan 2012 10:37 by honey.

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

More
18 Jan 2012 09:34 #16872 by honey
I added to my armkins.c file some flags or singularities as shoulder right or left and wirst down or up. Now when I pass to world mode I have a "following error" without moviment of robot and the software is stopped. Which could be the problem? (the latency of pc isn't it). The equations of kinematic yet? or some starting value wrong?

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

More
18 Jan 2012 13:03 #16883 by andypugh
honey wrote:

I added to my armkins.c file some flags or singularities as shoulder right or left and wirst down or up.

You are well outside any area that I have expertise in now.

It might be interesting to set the f-error limits very large, and see what happens.

If you attach the latest kinematics file, I will try to remember to try it out tonight.

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

More
18 Jan 2012 15:49 #16889 by honey
andypugh wrote:

honey wrote:

I added to my armkins.c file some flags or singularities as shoulder right or left and wirst down or up.

You are well outside any area that I have expertise in now.


There could be more configurations of the robot to arrive to target. This is shown in the attached image

If you attach the latest kinematics file, I will try to remember to try it out tonight.


I have attached also the latest kinematics file. When I pass to the world mode, it seems that the software searches some positions and for this reason I have a "following error". But I don't know what and why happens this when I pass to world mode

File Attachment:

File Name: armkins-7b...fa8c1e.c
File Size:6 KB
Attachments:

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

Time to create page: 0.176 seconds
Powered by Kunena Forum