Issue with Inverse Kinematics Failing During Homing – 3-Axis Robot with LinuxCNC

More
22 Jun 2025 17:50 #330712 by lex200
Hi,I am currently developing control software for a 3-axis robotic arm using LinuxCNC together with a Mesa 7i96S motion controller. Everything has worked well so far, until I ran into issues related to the Denavit-Hartenberg (DH) parameters defined in the HAL file.As a base, I used the Puma560 example, which worked correctly with the default DH parameters. However, after replacing them with my own DH values, I started encountering problems. Specifically, I’m unsure how to properly handle fixed theta values within LinuxCNC’s DH parameter structure, since there seems to be no direct way to set them.I have created a precise mechanical model of the robot and derived the necessary DH parameters accordingly. Despite this, I consistently receive an "Inverse Kinematics Failed" error whenever I attempt to run the "Home All" sequence for the joints.I’ve attached both the DH parameter values and a visual representation of the robot. The actual robot has 5 axes, but for the purposes of this project, I am controlling only 3 of them using stepper motors to keep the setup simple. I would be very grateful for any advice or guidance on how to resolve this issue.Best regards,
Lex 

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

More
22 Jun 2025 18:36 #330715 by andypugh
Note that all that I know about kinematics is that it confuses me...

Forward kinematics takes the joint positions and calculates the end effector position. This will always work and will always return exactly one solution.

Inverse kins takes the required end effector position and calculates the joint positions to achieve that. Sometimes there is no solution (because the arm simply can't reach that point). Sometimes there are multiple solutions (in fact there _generaly_ are.
So, the kins has to choose a solution. And sometimes it can lock itself in a corner, where there are solutions for the current position, and for the next position, but it would have to pass through a "wrong" position to get there.
This isn't just robots. I am sure you have been in this position with your own arms.... The difference is that you have a brain and are not blindly following what is basically a relatively simple mathematical equation which has no predictive capability.

So, back to your questiion: Homing happens in joint space, using forward kinematics. So presumably you only see the error after homing is completed, and the system switches to "world mode" and inverse kins.
Maybe your home position (in XYZABC rather than joint angles) simply isn't reachable? (or, doesn't _actually_ correspond to the joints-homed position?)

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

More
22 Jun 2025 19:04 #330718 by lex200
The issue is that I'm not even able to move the robot arm, because it requires me to perform a 'Home All' operation before initiating any movement. I'm 90% sure that the problem lies in the incorrect application of DH parameters on my part. The tricky part is that it's so simple, I have no further idea what could be going wrong. I've been stuck at this point for a couple of days now, and still no progress. Later, I plan to rebuild the project from scratch to avoid any unnecessary correlations with the original Puma source files. Maybe that will help.

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

More
22 Jun 2025 19:50 #330723 by andypugh
Do the joints not move at all when you try to home them?

As a short-term expedient you can turn off the requirement to home (INI NO_FORCE_HOMING) and (if you are using the Axis interface) switch to world mode with Ctrl-$.

But don't forget that then the machine will have no idea where the joints are, so the end-effector motion will be a very curly version of cartesian.

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

More
22 Jun 2025 19:59 #330724 by Aciera
Note that 'genserkins' uses 'modified' DH parameters.
Have a look here (there is also an example of how to derive the parameters for a manipulator):
www.linuxcnc.org/docs/stable/html/motion...ml#cha:dh-parameters

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

Time to create page: 0.065 seconds
Powered by Kunena Forum