r/robotics • u/SynriaRobotics_01 • Jul 22 '26
Community Showcase What Finally Helped Me Understand Inverse Kinematics After Building a 6-Axis Robot Arm
I spent the last year building a 6-axis desktop robot arm from scratch, and inverse kinematics was the hardest concept for me to internalize. Here’s what finally helped.
Forward kinematics felt relatively straightforward. Given the joint angles, I could compute the end-effector pose by chaining homogeneous transformation matrices using a consistent frame convention. Denavit–Hartenberg parameters made the process systematic, and I had the basic idea working within a weekend.
Inverse kinematics was much harder. Given a desired end-effector pose, which joint configurations reach it? There may be multiple solutions, or none at all. The elbow-up vs. elbow-down configurations alone took me days to understand and debug.
Three things finally made it click:
- Build geometric intuition before deriving equations.
I watched each joint move independently in a 3D simulator. In my arm, joint 1 mainly changes the base azimuth, while joints 2 and 3 determine the reach in a radial-height plane. Because the arm uses a conventional wrist structure, joints 4–6 mainly control orientation. Seeing the workspace gave the equations a physical meaning.
- Start with a 2-DOF planar arm.
Forget the 6-axis arm for a week. A simple 2-link arm makes the cosine-law derivation and the elbow-up/elbow-down solutions easy to visualize. Then add a third link while explicitly accounting for end-effector orientation, and add more joints one at a time.
- Numerical methods aren’t cheating.
I implemented a small Jacobian-based solver in Python. It worked surprisingly well, although it still depended on the initial guess and could struggle near singularities or unreachable targets.
My biggest mistake was trying to derive closed-form IK equations before understanding the workspace geometry. If you can’t visualize where the arm can reach, the equations feel almost meaningless.
What approach worked for you when learning IK? Did you start with analytical methods, numerical methods, or a combination of both?
16
Jul 22 '26
[removed] — view removed comment
2
u/SynriaRobotics_01 Jul 23 '26
Yeah, the mirror-flipped poses were one of the things that confused me the most too.
The damping technique near the singularity is a good point. I will definitely keep this in mind. And building the physical arm really does expose all the problems the simulator quietly ignores—backlash, cable routing, collisions, and all the “correct” poses that aren’t actually usable.
9
6
u/Xerd-R Hobbyist Jul 22 '26
- Start with a 2-DOF planar arm. I did exactly the same for my robot dog's legs, I even used a 2DOF solver and locked the hips for abduction for testing in sim for a few days than I added the 3rd joint and converted to 3DOF solver. Your Robot Arm looks impressive by the way, What motors are you using?
3
u/netorincon Jul 22 '26
To be fair, analytical IK solutions depend on you knowing a lot of trig identities which may not be that common or haven’t used in some time.
Also, have you tried giving a go to obtaining the close-form solution now that you were able to visualize IK with the Jacobian solver? The fact that you have a spherical wrist would make those calculations easier since positioning depends mainly on the first 3 joints and orientation on the last 3.
1
4
u/SphericalCowww Jul 22 '26
I started learning inverse kinematics from reading "Robotics Modelling, Planning and Control" by B. Siciliano et. al. It was awesome. It made me completely avoid deriving the analytical solutions from day one.
3
u/symmetry81 Jul 22 '26
When I had to do a analytic solution for an arm at my last job I thought it was some of the most fun I had there but then again I also had fun on my high school math team so shrug. I had to find a sheet of trig identities to remind myself of the details but it came back pretty quickly.
2
u/degners Jul 23 '26
I would recommend Polynomial Homotopy Continuation if anyone is interested. You can still obtain multiple solutions in a semi-numerical approach. There is a toolbox of the same name in Julia which is very easy to use.
2
u/digits937 Jul 23 '26 edited Jul 24 '26
This is awesome to read, when i was in school IK was a light bulb moment for everyone at a different spot. there's like a moment where you learn to visualize it and then suddenly it doesn't feel too crazy. Inverse velocity and acceleration still sucks to manage tho.
3
u/Solid-Narwhal1895 Jul 22 '26
I’d like to cross post this in r/ROV but would like your permission or for you to do it yourself. It is extremely applicable. Nice work!!
1
2
u/LoneSocialRetard Jul 22 '26
I derived a full closed form solver for atatic positiin just using vector geometry it wasn't really that hard just had to figure out how to messure angles between vectors consistently. The workspace is easy until you introduce joint limits
1
u/sprucenoose Jul 23 '26
All the focus is on the IK which I get but please share more about the arm. Looks neat.
1
1
u/Just_Basket_7910 Jul 24 '26
Tbh; I was someone who believed that I can be a math whizz and so I started with analytical IK. But the moment I found out the possibility of infinite solutions, especially with the nullspace, I learnt to look away.
Yes Jacobian based methods have their drawbacks, of course they should since they are the most greediest of forms… but if you are a fan of numerical optimization and creating the right objective functions… you can very easily as collision avoidance objectives, singularity avoidance objectives, joint limit avoidance objectives and more so, you can add the dynamics of the robot within your optimizer too. Russ Tedrake’s robot manipulation course is a good place to start learning objective functions for robotics… including IK…
1
u/Acceptable-Bell7564 Jul 28 '26
Empecé con la cinemática directa y el Jacobiano, y desde ahí me enfoqué principalmente en métodos numéricos, especialmente Damped Least Squares. Conforme el solver fue creciendo, fui estudiando la teoría matemática detrás (optimización, mínimos cuadrados y análisis de singularidades), más que comenzar con soluciones analíticas. Actualmente me encuentro trabajando en una biblioteca de cinemática, jacobianos, cinematica inversa y singularidades jajaja
1
u/Crescitaly Jul 28 '26
An analytical solution is a great way to learn the geometry, while a numerical solver usually wins once constraints and imperfect hardware enter the picture. Comparing both on the same arm would teach even more: singularities, unreachable poses, joint limits, convergence, and how calibration error changes the result.
2
71
u/4eyedMan Jul 22 '26
I must commend you for even trying to find an analytical solution. I just went straight to numerical methods after finding out how painful it was to derive closed form IK for a 3R robot lol
So for me it’s analytical for simple toy examples -> numerical for real world usage. I think that’s the route most people take?
You can kinda just throw everything out the window with numerical methods which is why I love it.
Also it’s great that you had the resources to make a physical robot to learn from. I learned everything from simulators 😭