it fixes the issue The "right angle vector" is a vector that is at a right angle to the length of the bone. If you are pushing the bone along its length, it shouldn't move. In this case, the angle between this "right angle vector" and your force vector is then 90 degrees, and so the dot product is zero. Hence, no change in angle of the bone.
Hope that helps No, there is nothing obviously wrong in the program listing you have given. You are correctly computing the change of angle rotAng and the new position (endX, endY) of the end-effector. You can compute rotAng more simply as
it fixes the issue 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.