Genserkins failure with custom robot

More
02 May 2018 14:33 #110024 by Wireline
Hi!

Based on the puma560 files, I've built a custom vismach model of a staubli RX60L (long arm version) and got it working in preview:



Attachment not found







What I am trying to do:

I want to get the axis movements, XYZABC, to work, but I can only use jog. Eventually I want to run a simple gcode program such as the stock milling one.


What is going wrong?

I am getting an error in terminal when trying to home the machine which reads:

kinematicsInverse failed
ERR kI - compute_jinv (joints: 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000), (iterations=0)

The program does not exit and I am able to resume using 'jog' in joint mode. Nothing is returned in dmesg.

A small message displays in axis saying 'kinematics Inverse Failed'


What have I done to try and fix the problem?

I note that this error appears to relate to matrix operations in gomath.c, called from genserkins.c, and the former of which return the GO_RESULT_ERROR if they fail, triggering the error from genserkins.c in the terminal:

retval = compute_jinv(&Jfwd, &Jinv);
	if (GO_RESULT_OK != retval) {
	    rtapi_print("ERR kI - compute_jinv (joints: %f %f %f %f %f %f), (iterations=%d)\n", joints[0],joints[1],joints[2],joints[3],joints[4],joints[5], genser->iterations);
	    return retval;
	}


I have updated generkins.h, the hal file and the ini file with the parameters as I believe them to be correct, taking data from the manual and from a DH parameter analysis I have carried out (attached). I have recompiled my RIP install with the new versions (I did not run sudo make install however, its just at "make" level)

[Note: The DH params below are slightly different than in some onlinestudies, which refer to the short arm and where the zero position of the arm is horizontal rather than vertical.




Attachment not found






Attachment not found






These are my new genserkins defaults:

#define DEFAULT_A1 0
#define DEFAULT_ALPHA1 0
#define DEFAULT_D1 0

#define DEFAULT_A2 0
#define DEFAULT_ALPHA2 -PI_2
#define DEFAULT_D2 0

#define DEFAULT_A3 400
#define DEFAULT_ALPHA3 0
#define DEFAULT_D3 49

#define DEFAULT_A4 0
#define DEFAULT_ALPHA4 PI_2
#define DEFAULT_D4 400

#define DEFAULT_A5 0
#define DEFAULT_ALPHA5 -PI_2
#define DEFAULT_D5 0

#define DEFAULT_A6 0
#define DEFAULT_ALPHA6 PI_2
#define DEFAULT_D6 0

.......Followed by the halfile params (I experimented with alternate angular units to no avail):

setp genserkins.A-0 0
setp genserkins.A-1 0
setp genserkins.A-2 400
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 0
setp genserkins.D-1 0
setp genserkins.D-2 49
setp genserkins.D-3 400
setp genserkins.D-4 0 
setp genserkins.D-5 0


What code am I using?

I have attached genserkins.h, the new staubli gui file (zipped to get around file extension requirement), and the updated ini and hal files.

What help would I like?

My skill level: Intermediate python and c++, new to linuxcnc

I seem to have come up against a brick wall with fixing this one. I believe my DH params are correct and have checked my files for errors, but cannot see where the problem might be. Can anyone suggest where to start looking? Am I just missing a step? Here is the contents of my vismach folder:

Attachment not found

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

More
02 May 2018 14:37 - 02 May 2018 14:41 #110025 by Wireline
Not sure if attachments are showing up for everyone else, I cannot see them in my browser in the main thread (just says "You do not have permissions to access this page.") but they appear in edit > preview?
Last edit: 02 May 2018 14:41 by Wireline.

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

More
02 May 2018 15:26 #110027 by Wireline
Attachments:
The following user(s) said Thank You: deanforbes

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

More
02 May 2018 15:27 #110028 by Wireline

Attachment not found

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

More
02 May 2018 15:32 #110029 by Wireline

File Attachment:

File Name: genserkins...5-02-2.h
File Size:4 KB


File Attachment:

File Name: staublirx6...02-2.hal
File Size:2 KB
Attachments:

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

More
02 May 2018 15:33 #110030 by Wireline
Looks to be a limit on attachments per post, I have now separated them out

File Attachment:

File Name: staublirx6...02-2.ini
File Size:3 KB


File Attachment:

File Name: staublirx6...02-2.zip
File Size:1 KB
Attachments:

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

More
02 May 2018 15:35 #110031 by Wireline
Shot of arm in vismach:



Contents of folder, am I missing anything?

Attachments:

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

More
02 May 2018 16:34 #110036 by Wireline
DH Table:

Attachments:

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

More
02 May 2018 19:36 - 02 May 2018 23:34 #110049 by Wireline
OK some progress. I changed the home values in the ini file to 5 arbitrarily for each joint, and now I do not get kinematics failures when homing, but I do when trying to move in the X Y Z A B or C axes. There seems to be something off with where axis believes the joints to be. Moving in X briefly worked, but immediately said it had hit a soft limit. The rotation gauge jumped from its home zero point right to its limit, which makes me think I missed something in setting up the joints.

I also modified the DH params too and included d6 = 105, to include the distance from joint 5 to tool tip. I added a 40mm long tool.

EDIT: OK I am starting to suspect I have used an inappropriate DH convention. I recall reading somewhere that a specific convention was used in genserkins, I will have to look the book up (or just bodge it!). Its proving a tough nut to crack, but I am using the absolute world position numbers as a guide as to where things might be wrong. It seems there is an erroneous 90 degree offset to joints 2 and 3, however reversing their direction or setting them to zero does not seem to help.

Is there a way to view the actual kinematic model, rather than the vismach one?
Last edit: 02 May 2018 23:34 by Wireline.

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

More
05 May 2018 17:06 #110258 by Wireline
In case anyone struggles with the same error message, I eventually tracked the problem down to the updated ini parameters I had added. I am not sure which line exactly yet but by process of elimination and going back to a previously working config, the ini was the culprit! Still need to iron out some kinks with the kinematics but at least I am not getting Inverse Kinematics Failed anymore :)
The following user(s) said Thank You: thefabricator03

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

Time to create page: 0.334 seconds
Powered by Kunena Forum