scarakins axis follow problem in -x and -y zone
- bkt
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1200
- Thank you received: 102
03 Jan 2024 12:34 - 05 Jan 2024 19:21 #289653
by bkt
scarakins axis follow problem in -x and -y zone was created by bkt
Hi at all,
on Lcnc 2.9.1 and scarakins standard ....
not understand why but I observe these never test before now: when reach x-500 y+1 position trought x-500 y-1 position in world mode I have an estop event ... think because these row inside kins foward:
[/code]
on Lcnc 2.9.1 and scarakins standard ....
not understand why but I observe these never test before now: when reach x-500 y+1 position trought x-500 y-1 position in world mode I have an estop event ... think because these row inside kins foward:
*iflags = 0;
if (joint[1] < 90)
*iflags = 1;
than in Inverse:
[code] /* joint 1 angle needed to make arm length match sqrt(rsq) */
cc = (rsq - D2*D2 - D4*D4) / (2*D2*D4);
if(cc < -1) cc = -1;
if(cc > 1) cc = 1;
q1 = acos(cc);
if (*iflags)
q1 = -q1;
but not understand why exactly seems x and c axis try to moove into undesired point (with estop obtain follow error on joint 0 and joint3 so X and C axis) ... these not happens in positive area +X and +Y or +X and -Y or -X and -Y ... only during moovement trought -Y to +Y if I'm on -X area ..... but is these logical? a3 or C axis not change angle during these motion from -n to +n or inverse ....
any suggestion is appreciate
p.s.:
axis limit for test is set to +6000mm and -6000
mm... but robot can reach only 900mm. joint limit is set to +720° and -720° so is not a limit problem ...
Last edit: 05 Jan 2024 19:21 by bkt.
Please Log in or Create an account to join the conversation.
- bkt
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1200
- Thank you received: 102
05 Jan 2024 19:21 - 20 Jan 2024 22:18 #289891
by bkt
Replied by bkt on topic scarakins axis follow problem in -x and -y zone
seems a simply solution can be follow:
not tested on real machine for now ... only on openGL test windows.
regards
static int scaraKinematicsInverse(const EmcPose * world,
double * joint,
const KINEMATICS_INVERSE_FLAGS * iflags,
KINEMATICS_FORWARD_FLAGS * fflags)
{
double a3;
double q0, q1;
double xt, yt, xt1, yt1, rsq, cc;
double x, y, z, c;
x = world->tran.x;
y = world->tran.y;
z = world->tran.z;
c = world->c;
/* convert degrees to radians */
a3 = c * ( PM_PI / 180 );
/* center of end effector (correct for D6) */
xt = x - D6*cos(a3);
yt = y - D6*sin(a3);
xt1 = xt;
yt1 = yt;
/* horizontal distance (squared) from end effector centerline
to main column centerline */
rsq = xt*xt + yt*yt;
/* joint 1 angle needed to make arm length match sqrt(rsq) */
cc = (rsq - D2*D2 - D4*D4) / (2*D2*D4);
if(cc < -1) cc = -1;
if(cc > 1) cc = 1;
q1 = acos(cc);
if (*iflags)
q1 = -q1;
/* angle to end effector */
q0 = atan2(yt, xt);
/* end effector coords in inner arm coord system */
xt = D2 + D4*cos(q1);
yt = D4*sin(q1);
/* inner arm angle */
//q0 = q0 - atan2(yt, xt);
if((xt1<0) && (yt1>=0)){q0 = q0 - atan2(yt, xt) - 2*M_PI;}
else{q0 = q0 - atan2(yt, xt);}
/* q0 and q1 are still in radians. convert them to degrees */
q0 = q0 * (180 / PM_PI);
q1 = q1 * (180 / PM_PI);
joint[0] = q0;
joint[1] = q1;
joint[2] = D1 + D3 - D5 - z;
joint[3] = c - ( q0 + q1);
joint[4] = world->a;
joint[5] = world->b;
*fflags = 0;
return (0);
} // scaraKinematicsInverse()
not tested on real machine for now ... only on openGL test windows.
regards
Last edit: 20 Jan 2024 22:18 by bkt.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- bkt
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1200
- Thank you received: 102
20 Jan 2024 22:22 #291224
by bkt
Replied by bkt on topic scarakins axis follow problem in -x and -y zone
sorry seems I deleted the previous my answer by posting this new possible solution for -x & -y scara working zone, when end-point passes trought Y=0 ....
Please Log in or Create an account to join the conversation.
- bkt
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1200
- Thank you received: 102
23 Jan 2024 20:35 - 23 Jan 2024 20:52 #291462
by bkt
Replied by bkt on topic scarakins axis follow problem in -x and -y zone
because i use reverse geometry of scara joint the file must be modify in these way:
(see txt file)
tested on my 950mm machine ... not tested on other machinery.
(see txt file)
tested on my 950mm machine ... not tested on other machinery.
Attachments:
Last edit: 23 Jan 2024 20:52 by bkt.
The following user(s) said Thank You: Aciera, DPFlex
Please Log in or Create an account to join the conversation.
- DPFlex
- Offline
- Junior Member
Less
More
- Posts: 28
- Thank you received: 1
26 Aug 2024 10:06 #308685
by DPFlex
Replied by DPFlex on topic scarakins axis follow problem in -x and -y zone
Hello,
My system is:
- Debian Bookworm, LCNC 2.9.3
- Installed on Desktop PC with scripts: www.linuxcnc.org/linuxcnc-install.sh
I just revise SCARA dimensions:
My question is: after revising scarakins.c, how to let the installed LCNC know and run ?.
Thank you.
My system is:
- Debian Bookworm, LCNC 2.9.3
- Installed on Desktop PC with scripts: www.linuxcnc.org/linuxcnc-install.sh
I just revise SCARA dimensions:
#define DEFAULT_D1 490
#define DEFAULT_D2 340
#define DEFAULT_D3 50
#define DEFAULT_D4 250
#define DEFAULT_D5 50
#define DEFAULT_D6 50
My question is: after revising scarakins.c, how to let the installed LCNC know and run ?.
Thank you.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 3947
- Thank you received: 1705
26 Aug 2024 14:45 #308709
by Aciera
Replied by Aciera on topic scarakins axis follow problem in -x and -y zone
You can try compiling the modified 'scarakins.c' using 'halcompile'
You will need the dev package for halcompile to be available.
If that does not compile then you will need to build LinuxCNC locally on your computer:
linuxcnc.org/docs/master/html/code/building-linuxcnc.html
sudo halcompile --install <your_path>/scarakins.c
You will need the dev package for halcompile to be available.
sudo apt install linuxcnc-dev
If that does not compile then you will need to build LinuxCNC locally on your computer:
linuxcnc.org/docs/master/html/code/building-linuxcnc.html
The following user(s) said Thank You: DPFlex
Please Log in or Create an account to join the conversation.
- DPFlex
- Offline
- Junior Member
Less
More
- Posts: 28
- Thank you received: 1
27 Aug 2024 13:42 #308803
by DPFlex
Replied by DPFlex on topic scarakins axis follow problem in -x and -y zone
Hi Aciera,
I could not do with halcompile, so I tried build from sources.
Building from source is faster than my expect. But it is LCNC version 2.10.xxx
I checked all branches on github, could not find stable version 2.9.3
Please advise. Thank you.
I could not do with halcompile, so I tried build from sources.
Building from source is faster than my expect. But it is LCNC version 2.10.xxx
I checked all branches on github, could not find stable version 2.9.3
Please advise. Thank you.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 3947
- Thank you received: 1705
27 Aug 2024 14:11 #308807
by Aciera
Replied by Aciera on topic scarakins axis follow problem in -x and -y zone
2.9.3 is a branch inside the git tree that you cloned to your local machine. Default branch is 'master' ie currently 2.10.xx.
To compile 2.9.3 you need to switch to the '2.9' branchand then recompile
To compile 2.9.3 you need to switch to the '2.9' branch
git checkout 2.9
The following user(s) said Thank You: DPFlex
Please Log in or Create an account to join the conversation.
- bkt
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 1200
- Thank you received: 102
09 Sep 2024 19:01 #309774
by bkt
Replied by bkt on topic scarakins axis follow problem in -x and -y zone
@DPFlex ... from 2.8 I'm unable to use halcompile .... AndyPugh suggest to use a rip install ..... you download on Lcnc_292_wharehouse ..... search on these new folder scarakins.c and change it with modify version .... than run process for make .... when obtain compilation file on rtai folder inside Lcnc_292_wharehouse folder of rip install, use sudo command for root permission, search for original one scarakins.c of your installation (if not use a rip install) and cancel these, copy with root permission your scarakins.c compiled from Lcnc_292_wharehouse folder to system folder. Reboot ... all done.
Use these tryk for all modifications. Or learn you about customkins.c (never looses these time really) .....
If you have a rip istall .... use the same trick, but change modify scarakins.c from your "compiled Lcnc_292_wharehouse folder" to your preferred rip install .... reboot and voilà.
regards
Use these tryk for all modifications. Or learn you about customkins.c (never looses these time really) .....
If you have a rip istall .... use the same trick, but change modify scarakins.c from your "compiled Lcnc_292_wharehouse folder" to your preferred rip install .... reboot and voilà.
regards
The following user(s) said Thank You: DPFlex
Please Log in or Create an account to join the conversation.
Time to create page: 0.133 seconds