Search code examples
c++linuxmacosroboticsinverse-kinematics

Inverse Kinematics programming C++


I want to write my own kinematics library for my project in C++. I do understand that there are a handful of libraries like RL (Robotics Library) and ROS with inverse kinematics solvers. But for my dismay, these libraries DO NOT support MacOS platform. I have already written the Forward Kinematics part, which was quite straight forward. But for the Inverse Kinematics part, I am quite skeptical since the solution to a IK problem involves solving sets of non-linear simultaneous equation. I found out the Eigen/Unsupported 3.3 module has a APIs to non-linear equations. But before I begin on this uncertain path, I want to get some insight from you guys on the plausibility and practicality of writing my IK library. My manipulator design is rather simple with 4 DoF and the library will not be used for other designs of manipulators. So what I am trying to achieve is taylor-made IK library for my particular manipulator design than a rather a 'Universal' library.

So,

  • Am I simply trying to reinvent the wheel here by not exploring the already available libraries? If yes, please suggest examples of IK libraries for MacOS platform.
  • Has anyone written their own IK library? Is it a practical solution? Or is it rather complex problem which is not worth solving for a particular manipulator design?
  • Or should I just migrate all my project code (OpenCV) to a Linux environment and develop the code for IK in Linux using existing libraries?

Thank you,

Vino


Solution

  • I have built some robots in the past and been required to solve kinematic equations. As you stated "manipulator design is rather simple with 4 DoF" in my opinion you can write a fairly small function/module and you will not require the complexity of a general purpose library. I used Maple to assist with creating the inverse equations, you may want to look for an alternative Alternative On the other hand, the libraries you mention ROS and RL may not support your Mac at the highest level, but at the low level it is just c++ code, there is no reason you cannot use the libraries on your Mac and only use the low level functions.