Page 1 of 1

How to follow the path draw by G-code interpreter?

Posted: 14 Feb 2018, 00:20
by xiemzuo
Hello
I am working on 3 dof robot arm.And I realized that the end of my arm follow the path added by myself.
But now,I use inkscape to transit some picture to G-code,and I want to follow the path draw by G-code interpreter, Does anyone can give me some advice.Thank you very much.

Re: How to follow the path draw by G-code interpreter?

Posted: 14 Feb 2018, 23:02
by fferri
You can find some Lua code for interpreting G-code inside V-REP folder (lua subdirectory if I remember correct). The implementation is dependant on the robot kinematics. You have to complete the implementation for your robot. Or you can use that code to convert G-code to a path, and follow the path with V-REP inverse kinematics solver. But I'm not 100% sure you can express arbitrary orientations with V-REP path. That is no problem if you only want to control XYZ position.

Re: How to follow the path draw by G-code interpreter?

Posted: 22 Feb 2018, 03:47
by xiemzuo
Thank you very much.I have realized drawing my path.But i don't know how use code to follow it.Can you tell me how to use inverse kinematics solver to follow the path.Thank you very much.
mingzuo

Re: How to follow the path draw by G-code interpreter?

Posted: 22 Feb 2018, 09:24
by fferri
There is a IK tutorial in the V-REP manual:
Inverse kinematics tutorial
Related topics in the manual:
Basics on IK groups and IK elements
Solving IK and FK for any type of mechanism

There is also an unofficial tutorial on Youtube:
https://www.youtube.com/watch?v=X73NzCc2E2c

After you set up IK (i.e. your robot tip/end-effector follows the target), you can move the tip dummy along the path how is described here:
Movement along a Path