I have currently developed a 3DoF robotic arm with three stepper motors. I am able to control it using the keyboard and the joystick using the grbl library and universal g-code sender. In the future, I would like to add automation and so I wanted to know how can I add (if possible) inverse kinematics calculations to grbl?
I don't think GRBL will be suitable for what you want to do.
You may have to write a specific sketch and clear out GRBL.
GRBL simply interprets g-code movements and does not have a learning ability that you may need for your purpose.
You could of course simply give it reference points and it will just go to them and by adding a macro it would repeat that pattern forever.
No idea. I was looking into shifting to Marlin, but I'm not sure if its feasible with marlin. I don't have much knowledge and the source code from grbl seems pretty complicated
The GRBL source for a small Arduino is very cramped for space and speed - perhaps on a faster board it would be viable, but kinematics is floating-point heavy so you'd be best choosing a platform with hardware floating point and more RAM to finesse both issues.
It ages since I delved into the code base of GRBL - whether its cleanly separated into modules that allow dropping in some kinematic layer I have no idea.