I am trying to implement some simple kinematics for my Polar Coaster machine.
Currently I pre-process the gcode with a python script. It divides each move into tiny moves and converts those moves into the radius and angle values the machine needs. The lengths of the tiny moves are small enough that you cannot see the effects. It works perfectly, but it is a pain to run that script on each new plot I want to do.
I am looking at ways to do this in Grbl. In Grbl all moves are done with lines using the mcline(…) command. If it gets a gcode arc. It breaks that are down into segments and sends those to the mcline command. I thought I could do something similar to implement kinematics.
I have a mclinekins(….) function that does this function. All calls that used to be made to mcline(…) now go to mclinekins(….). This function directly calls mcline(…) for cartesian machines or implements any kinematic functions you want for non-linear machines.
It seems to be working well. I have only tried some basic kinematics, but so far it works well.
I can also apply kinematics to the feedrate. I don’t think I can apply kinematics for accelerations .
Is there a better way?
#1 – bdring 于 2019-01-11
I uploaded a branch with my code. It is not ready for use yet. I was having some trouble with it, so I eliminated the breaking down to small segments for now to make it easier to to test.