open source inverse kinematics solver for n-axis milling

Here's the place for discussion related to CAM/CNC and the development of the Path module.
adamLange
Posts: 65
Joined: Sun May 24, 2015 12:15 am

open source inverse kinematics solver for n-axis milling

Postby adamLange » Sat Feb 08, 2020 9:27 pm

Hello,

I've been working on an inverse kinematics solver that could be a useful part of a FreeCAD n-axis toolchain. I've been documenting the development here: https://hackaday.io/project/169499-solv ... h-modelica

The inverse kinematics part is working. The solver takes tool tip and tool orientation as input in the format x,y,z,i,j,k where x,y,z is the tool tip location and i,j,k is a normal vector pointing from the tool tip in the direction of the tool axis, and out outputs the corresponding machine joint or axis angles or coordinates.

To adapt the solver to a given machine it's a matter of modifying the Modelica model to match the targeted machine. The solver is really general and can handle all sorts of misalignments and non-linearities of a given machine.

Adam
adamLange
Posts: 65
Joined: Sun May 24, 2015 12:15 am

Re: open source inverse kinematics solver for n-axis milling

Postby adamLange » Sat Feb 08, 2020 9:43 pm

And here is the source code: https://github.com/adamLange/modelIKa
RatonLaveur
Posts: 808
Joined: Wed Mar 27, 2019 10:45 am

Re: open source inverse kinematics solver for n-axis milling

Postby RatonLaveur » Sat Feb 08, 2020 11:28 pm

This sounds cool...did you manage to create toolpaths with it so far?
I wonder how much this would help the work currently spearheaded by Sliptonic and Russ on 4th axis machining or actual 3d machining...it seems that your solver may even allow workpiece transform to perform 5 axis simultaneous.
adamLange
Posts: 65
Joined: Sun May 24, 2015 12:15 am

Re: open source inverse kinematics solver for n-axis milling

Postby adamLange » Sun Feb 09, 2020 2:29 am

Yep! It works for 5-axis simultaneous. I have successfully computed a simultaneous 5-axis toolpath with it. There's a log post about it on the hackaday post above. It was pretty coarse but I made it follow some tool targets on a spherical surface.
vocx
Posts: 5206
Joined: Thu Oct 18, 2018 9:18 pm

Re: open source inverse kinematics solver for n-axis milling

Postby vocx » Sun Feb 09, 2020 3:38 am

adamLange wrote:
Sat Feb 08, 2020 9:27 pm
I've been working on an inverse kinematics solver that could be a useful part of a FreeCAD n-axis toolchain. I've been documenting the development here: https://hackaday.io/project/169499-solv ... h-modelica
Modelica
saso wrote:
Sat Dec 01, 2018 1:17 pm
ping
Maybe also of interest.
FreeCAD as pre-post procesor for MBDyn, (2).
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
adamLange
Posts: 65
Joined: Sun May 24, 2015 12:15 am

Re: open source inverse kinematics solver for n-axis milling

Postby adamLange » Wed Jul 22, 2020 9:00 pm

I wrote a tutorial that shows how to generate a simple 5-axis toolpath with the inverse kinematics solver:
https://hackaday.io/project/169499-solv ... ce-milling