*SOLVED* Recompiling genhexkins

More
17 Jan 2012 10:29 - 17 Jan 2012 10:37 #16841 by honey
Replied by honey on topic Re:*SOLVED* Recompiling genhexkins
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
Replied by honey on topic Re:*SOLVED* Recompiling genhexkins
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
Replied by andypugh on topic Re:*SOLVED* Recompiling genhexkins
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
Replied by honey on topic Re:*SOLVED* Recompiling genhexkins
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.

More
18 Jan 2012 23:32 #16906 by andypugh
Replied by andypugh on topic Re:*SOLVED* Recompiling genhexkins
I had a quick look, but I can't compile your kinematic without armkins.h as you have defined the flags there.

I don't really follow the maths, though, as I never did really get the hang of rotation vectors.
Is it possible that something is wrong with the homing part of your kinematics file?

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

More
19 Jan 2012 08:35 - 19 Jan 2012 23:01 #16925 by honey
andypugh wrote:

I had a quick look, but I can't compile your kinematic without armkins.h as you have defined the flags there.


Sorry, you are right. I attach the file here

Is it possible that something is wrong with the homing part of your kinematics file?


Yes It is possible. Really I don't understand how the kinematics module (pumakins or others) use the homing part. You can me help with this? What I should do?

File Attachment:

File Name: armkins.h
File Size:1 KB
Attachments:
Last edit: 19 Jan 2012 23:01 by andypugh.

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

More
19 Jan 2012 23:49 #16965 by andypugh
honey wrote:

Yes It is possible. Really I don't understand how the kinematics module (pumakins or others) use the homing part.

Nor do I, but I imagine that the idea is that you home each joint, then when you switch to world-mode it runs the homing subroutine once to get an unambiguous position, then starts running kins normally. So, you might get an f-error if your homing routine gives a different answer to the inverse kins. In your case you might need the homing routine to set the iflags before calling the inverse kins.

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

More
20 Jan 2012 09:22 - 20 Jan 2012 09:32 #16968 by honey
andypugh wrote:

In your case you might need the homing routine to set the iflags before calling the inverse kins.


So, what I should do? change something in my kinematics file or change home values in ini file??
Last edit: 20 Jan 2012 09:32 by honey.

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

More
20 Jan 2012 10:23 #16969 by andypugh
honey wrote:

So, what I should do? change something in my kinematics file or change home values in ini file??

I really don't know. I think you need help from someone who understands the kinematics structure. You might get lucky with a query on the mailing lists (possibly the developer list) but you are more likely to get no response.
It seems to me that this aspect of EMC2 is rather badly documented, and you might have to read the source code to work it all out.
The comments in kinematics.h explain a few things:
git.linuxcnc.org/gitweb?p=emc2.git;a=blo...ematics/kinematics.h
There are also many useful comments in this file
git.linuxcnc.org/gitweb?p=emc2.git;a=blo...emc/motion/control.c
(at the beginning and line 1464 onwards)

As far as I can see kinematicsHome is _never_ called. I am going to check...

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

More
23 Jan 2012 11:56 #17041 by andypugh
How are you compiling armkins at the moment?
I found that I needed to put it in the kinematics directory, and then needed to edit emc2-dev/src/Makefile to duplicate all (9?) lines which mention genhexkins to add a similar line for armkins. That seems to work nicely.

I think you ought to remove the unused variables, or at least comment out those lines.

As I said on the mailing list, you have some sqrt() functions which might not be correct, and also could do with an fabs() in them to make them more robust. Things go badly wrong if the code tries to take a sqrt of a negative number.

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

Time to create page: 0.075 seconds
Powered by Kunena Forum