Actual position and Commanded position differ, using cia402 [SOLVED]

More
1 year 5 months ago #328741 by Aciera

I see you have a userkins module, that one becomes suspicious of course.


I agree, this is most likely a problem with your custom kinematic module. I usually see these kinds of jumps when the forward and the inverse kinematics do not match up.
The following user(s) said Thank You: low-blip

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

More
1 year 5 months ago - 1 year 5 months ago #328745 by low-blip
I checked the userkins.comp file, found nothing strange, but in userkins.c, it was

int kinematicsForward ...
   ...
    pos->tran.x = j[0]/80; // X coordinate
    pos->tran.y = j[1]/80; // Y coordinate
    pos->tran.z = j[2]/80; // Z coordinate

while in userkins.comp or either of the kinematicsInverse functions, the /80 was not there. I tried compiling again, nothing changed. I tried deleting the /80 from userkins.c, everything is now working. I just have no idea why..
Last edit: 1 year 5 months ago by low-blip.
The following user(s) said Thank You: Hakan

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

More
1 year 5 months ago #328787 by low-blip
Could be, but I can't figure out where it's coming from, so looks like I'm stuck with a temporary fix of a possible temporary fix for now.

I remember Python giving me so much grief over the tabs and spaces in my first year of learning to program! At least these days IDEs take care of that problem.

C just went completely over my head when I tried to learn it. I can mostly read it but I cannot write anything in C, it's pretty frustrating

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

More
1 year 5 months ago #328789 by Aciera
Sounds like a problem compiling the .comp file as the 'halcompile' tool would not add or remove anything in those lines.
Impossible to say without actually seeing your userkins.comp file.
The following user(s) said Thank You: low-blip

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

More
1 year 5 months ago #328790 by low-blip
Oh thanks! you're right that halcompile is having some problem, userkins.c is unchanged after I run
Code:
sudo halcompile --install userkins.comp
. There's nothing in the terminal that hints at it not working.

Compiling realtime userkins.c
Linking userkins.so
cp userkins.so /usr/lib/linuxcnc/modules/


I've attached the userkins.comp file here

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

More
1 year 5 months ago #328799 by Aciera
I think you are being confused by an old version of 'userkins.c'. Note that
Code:
sudo halcompile --install userkins.comp

will not create a 'userkins.c' file at all, it will directly create a 'userkins.so' and copy that to the appropriate folder.

linuxcnc.org/docs/html/man/man1/halcompile.1.html

If things are working after
'sudo halcompile --install userkins.comp'
then you can delete the 'userkins.c' file.
The following user(s) said Thank You: low-blip

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

Time to create page: 0.068 seconds
Powered by Kunena Forum