Dexter Arm IK

Comments

Could you please point me to the code or software that you used for generating the arm simulation. I am building my own robot arm and am writing some python code to simulate the arm movements. But it's not as visually advanced as what you have done for Dexter arm. I'm mainly interested in knowing how you ported the CAD files and animated them in your code. Any help is really appreciated.

Then, I arranged all the parts into a transform hierarchy in Unity3D (a popular game engine), and rotated the models such that they were all pointed upward when their joints were in the identity rotation.

The version in the embedded demo simply attempts to find the minimal rotation necessary to make the tooltip match the sphere, but the one in the above source also attempts to match the direction that the sphere's forward vector is pointing (since this is a 5-DoF robot after all). You can disable that functionality if you want by simply deleting ", j < 2" in the CCDIK.cs file (this tells it to treat the last two joints differently than the rest).

The above github repo replaces the Dexter models with scaled cubes because the Dexter models are licensed funnily and they ballooned the file size.

Thanks a lot for your extensive response. I still need to spend more time digesting the pieces of your code and articles that you mentioned, but they seem to address most of my concerns.

My robot arm has also 5 DOF, very similar to Dexter. The way I handle inverse kinematics is by matching the orientation of the object that needs to be picked up with the last two DOF's (I think like what you have done for Dexter). For the rest of the 3 DOF's I've written down the transformations in terms of joint rotations and have solved them explicitly for a given target position. But I think the systematic representation based on quaternions is much cleaner for implementing the transform hierarchies and are easier to extend them later.

For now, I'm planning to stick to python, because of the other constrains including the interaction with the hardware (Arduinos, sensors,...) and also other available math libraries like opencv. But on the downside, creating an attractive and interactive 3d graphics seems to be a pain in python. But I think at some point I should find a way to either use external tools for handling the graphics or instead write the whole thing as a web application and use Unity for handling the graphics.