Re: Router Spindle on Robot Arm - Software solution.
I am coming into this discussion late, but I want to ask a question. Is your goal to build a CNC robotic arm router, or is it to carve designs that cannot be made with a conventional 3 or 4 axis router?
If, as I expect, the ultimate goal is carving shapes not feasible on conventional routers, I would like to suggest another option. Use a conventional 3 axis router, but mount your blank on a base capable of two axis of rotation. See the "Pocket NC" for a relatively inexpensive example of this type of design. Pocketnc.com
This machine geometry eliminates the issues of heavy weights out at the end of an arm supported on only one end and all of what has been discussed above. In addition, the CAM for this type of mill is much cheaper. I think the free (for hobbyists) Fusion 360 can handle it (or soon will).
By the way - give up on the hope of translating a conventional g-code into one for your arm. The location of the tip of the tool does not exist in the g-code, since the tool definition is not in the g-code, except potentially as a comment. Even knowing the tool definition, there is no indication of what , if any, part of the bit is in contact with the stock at any given point in the code - the tip or side, is it cutting on the climb or conventional side, etc. To generate the proper g-code a program requires access to the part as well as the tool geometry, information that is simply not contained in a g-code file. Even if you exactly reproduce the orientation and travel of the entire bit all you have succeeded in creating is a part that could have been produced on the original cnc in the first place (i.e. No undercuts, etc.)
It all depends on what your goal is - if it is a robotic arm router, that is a cool and worthwhile project to continue with, and I will be happy to follow your progress.
If your goal is to carve shapes not possible with other cnc routers, consider if you can get there by moving the stock and tool separately and simultaneously, I think it is a much more easily achievable design. Both concepts can be proven topologically equivalent - a carving possible with one is achievable with the other.
Tubular latex pressure vessel configuration engineer