Joint compensation on a 6 axis robot

More
27 Nov 2015 16:14 #65869 by robottom
Hi,

I'm runnning a Puma(560) 6 axis robot with LinuxCNC and this works pretty well. But there is one aspect I have difficulties to get into LinuxCNC. When I run the original controller with the wrist cover opened I realized that the wrist gearbox (joints JT4-JT6) geometry needs componensation moves if one joint JT4-6 is changing its angle. More concrete: If you move JT4 by 180 degree then the motor of JT5 and 6 is doing one turn to keep the JT5 and JT6 in the position as it is. So this is a componensation because of wrist gear wheels geometry. When moving JT5 by 180 degrees the controller is moving the JT6 motor by ~10 turns to keep JT6 in position. This compensation is really siginifcant while the compensation before might be ignored. FYI: The gear ratio between motor and JT4-6 is 70-80 (70-80 motor turns for a 360 degree JT turn).
The JT angles in the original controller display are not affected by the compensation moves of the motor - means the angle of JT6 will still be the same after the 180 degree JT5-turn - so the componesation moves are handled internally under the hood. How should I handle this inside LinuxCNC?
My first idea is to simply build it into the kinematics because I already have experience how to integrate an own kinematics into LinuxCNC. Basically this would mean when I define the compensation of joints[5] is zero for a joints[4] on zero:
1. At the end of the int kinematicsInverse (...) joints[5] = joints[5] + joints[4] * 0,247 (this is my calculated correction factor)
2. and at the beginning of the int kinematicsForward (...) joints[5] = joints[5] - joints[4] * 0,247 (undo the componesation)
Would this dirty trick causing wrong JT6 display in the AXIS GUI or are the JT values in the AXIS the result of the kinematicsForward where I already had undo the correction?
Is there any other easy possibility without changing basic code and recompiling the LinuxCNC?
Would be nice to hear your comments.

Thanks, Thomas

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

More
28 Nov 2015 00:12 #65897 by tommylight
Unfortunately i can not help you on that topic, but i have installed, wired, reprogrammed and teach daily a KUKA KR150 with KRC1 controller, so from never seeing a real robot to teaching it to do 92 5 to 8 cm welds in 4 hours, took me 2 days ( took 4 more days for install/wire/reprog ), and this is in part due to a nice teaching interface (the other part is my ability to figure out anything under the sun once i get my hands on, and this is due to me reading a lot and working a lot and ........not being married and not having kids.).
Well that got out of hand, so back we go
There are a lot of those robots on sale without any control electronic, just the robot arm for anything from 800 to 4000 euros, so i have to get one and bundle some drives and I/O and other stuff so i can make it work with Linuxcnc. The problem is the robot arm and electronic would cost 3000 to 5000 total and a loooot of time and effort, on the other hand they can be found from 10000 to 12000 fully functional.
Then again, i can get a bit cheaper on electronic so the question is how long does it take from having all the hardware working to hawing it function to a usable level with Linuxcnc.???
Lately i have been really badly time strapped, that is the only reason for asking this. I really enjoy challenges and i love new projects, but i just do not have time.
Sorry for stretching it, but i would love to dive into this project.
Regards,
Tom

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

More
28 Nov 2015 09:29 #65923 by robottom
Hi Tom,

this is a bit off topic but here my 2ct on your ideas:
The price ranges you are talking about for getting a KUKA on linuxcnc seems reasonable. Getting a fully functional version with an orginal KUKA controller is even less expensive - depends on where you are located. If you are located in Germany you can even get a fully functional one much cheaper than the rebuild of the controller (2000-4000).
My controller rebuild was below 500 bugs. The main difference to a more modern/bigger robot are the servo controller. The old Puma as well as some other old robots using brushed DC servos where as the newer ones using brushless AC servos. This makes a big difference in the price for of the servo controller. My DC controllers are self assembled for 65,-- where a AC servo is 1000+. For 6 axis you end up with 6000 for the AC servo controllers only.
There is some intro in my project in video of the controller build I recently published at youtube:

Hope this make it a bit more tangible.

Thomas

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

More
28 Nov 2015 16:57 #65956 by andypugh

My first idea is to simply build it into the kinematics because I already have experience how to integrate an own kinematics into LinuxCNC.


I think this is exactly the right way to do it.

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

More
28 Nov 2015 18:28 #65962 by robottom
Hi Andy,

I'm very pleased that you confirmed this way going forward.
I downloaded genserkins.c and genserkins.h and tried to install my own version (genserkinstom.c) into linuxcnc 2.6.
I did it in the same way as on my other system where I successfully installed an own kinematics by first running:
sudo apt-get install linuxcnc-dev
sudo apt-get install build-essential
after that I compiled and installed
sudo comp --install genserkinstom.c
where genserkinstom.c is the same source code as genserkins (I want to start modifying it after a successful first install of the original files)
But this was not successful. I guess I fall into the same trap as in thread: ttps://www.mail-archive.com/emc-developers@lists.sourceforge.net/msg03965.html
When running sudo comp --install genserkinstom.c I'm also getting the same warning "WARNING: "go_quat_inv" [/tmp/tmpl9jQT7/genserkinstom.ko] undefined!" ...
When then starting linuxcnc via AXIS there is the same error as in the thread:
Error: could not insert module /usr/realtime-3.4-9-rtai-686-pae-modules/linuxcnc/genserkinstom.ko: Unkown symbol in module ...

I also found the following text in another thread on the same issue:
Both genserkins.c and genserkins.h files, which worked for Andy, can
be obtained here:
www.cutting.lv/fileadmin/user_upload/genserkins.c
www.cutting.lv/fileadmin/user_upload/genserkins.h
did you modified the files or can give me a hint what I'm doing wrong. I'm not very familiar with linux and C and how to compile things into linuxcnc. Hope there is a quick fix.

Many thanks, Thomas

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

More
28 Nov 2015 20:46 #65972 by andypugh
I think that the problem is likely to be that genserkins requires extra includes that the "comp" utility does not link to.
(Also note that "comp" has been renamed "halcompile" in newer versions of linuxCNC.)

I think that genserkins will be difficult to modify, as it uses clever maths to calculate the joint sequence, and I suspect that adding a modification to a specific joint (but only that joint) might be hard.

You will probably find pumakins to be an easier starting point.

If you have the same problem then you probably need to get the full LinuxCNC source code and compile the whole thing.
(you don't _need_ to compile the whole thing, but doing that is likely to be easier than configuring a makefile to just compile the bits you want.)
The following user(s) said Thank You: tommylight

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

More
29 Nov 2015 00:57 #65984 by tommylight
Thomas,
thank for your reply but i live in Kosovo, and at the start of spring i might be going to US for a visit to Hoover dam, Niagara falls, and Grand canyon and maybe, just maybe to visit my brother!!! :):):)
The lowest i could find on a complete functioning Kuka was 5000 only once for 2 of them and bought both for 2 customers, so with transport and customs that got to over 7000 a piece. Now the lowest i can find is 7800.
Non the less, that is more of a challenge than profit, i just like to make things work my way.
I watched your video, it is nice when you get something that complicated working, and i do understand the problem you have, i have to deal with moving 6 axis in my head all the time before i move the robot, and doing that for 4 to 6 hours in a day is pretty hard on the brain. At the beginning, when i first programmed it, after 6 hours with it i wend to have a coffee near my house and i just fell asleep there and then for 15 minutes.
Andypugh,
Thank you for nice clear and concise answers as always.
I do agree with Andy on this as it would be better to start from a functioning pumakins.

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

More
29 Nov 2015 13:29 #66000 by robottom
o.k. Kosovo might be different. If you are talking about 5000 you mean EUR I guess. Prices and market supply are anyhow different in Germany especially for the big KUKAs as they are used by the car manufacturer in thousands (e.g. weeks ago I visit Mercedes fatory in Rastatt - they are running approx. 1400 KUKAs most in the KR150 range - as far as the eye can reach - only in this single factory).
Concerning genserkins vs. pumakins. I already looked at pumakins month ago when I selected the right kinematics module for my Puma. The issue with pumakins is that it defines only the
#define DEFAULT_PUMA560_A2 300.0
#define DEFAULT_PUMA560_A3 50.0
#define DEFAULT_PUMA560_D3 70.0
#define DEFAULT_PUMA560_D4 400.0
DH parameters (these are the default values from the pumakins.h). There is no specification of ALPHA and THETA and the other D and A values possible without changing the code.
Since the above values are wrong (for the standard puma 560) I'm loosing trust that the hard coded ALPHA (angle configuration of one joint to the next) plus the start configuration is the correct one. Below I printed the DH parameters I'm using for the genserkins (to compare).
Furthermore I tried the same for the pumakins as with the genserkins before: Renamed to pumakinstom.c/h and compiled it. I getting also warnings like:
WARNING: "pmQuatRpyConvert" [/tmp/tmpF_DylS/pumakinstom.ko] undefined!
and this leads to similar errors when starting the AXIS with the pumakinstom.
There are some definition of other modules that seems not to be correctly linked by the compiler.
I would also love to use pumakins over genserkins since it is much easier to understand (still very difficult) but the basic issue remains. Maybe I need to learn compile the whole system - is there any description how to do it or any documentation that helps me to solve the compile issue with genserkins or pumakins (might be easier and faster)
Thanks again for your help.

Thomas

FYI - my genserkins DH config:
setp genserkins.A-0 0
setp genserkins.A-1 0
setp genserkins.A-2 431.8
setp genserkins.A-3 0
setp genserkins.A-4 0
setp genserkins.A-5 0

setp genserkins.ALPHA-0 0
setp genserkins.ALPHA-1 1.570796326
setp genserkins.ALPHA-2 0
setp genserkins.ALPHA-3 1.570796326
setp genserkins.ALPHA-4 -1.570796326
setp genserkins.ALPHA-5 1.570796326

setp genserkins.D-0 671.83
setp genserkins.D-1 -149.09
setp genserkins.D-2 0
setp genserkins.D-3 433.07
setp genserkins.D-4 0
setp genserkins.D-5 56.25
The following user(s) said Thank You: tommylight

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

More
29 Nov 2015 14:38 #66005 by andypugh

Maybe I need to learn compile the whole system - is there any description how to do it or any documentation that helps me to solve the compile issue with genserkins or pumakins (might be easier and faster)


I can't find anything 100% up-to-date.

Closest is probably the Debian or Ubuntu instructions here:
wiki.linuxcnc.org/cgi-bin/wiki.pl?Installing_LinuxCNC

But be aware that anywhere it says "emc" it is now LinuxCNC.

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

More
30 Nov 2015 01:44 #66078 by tommylight
Thomas,
Yes, i am in Kosovo and yes it is in EUR.
I am sorry for not being able to help you.
With utmost respect,
Tom

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

Time to create page: 0.082 seconds
Powered by Kunena Forum