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

Typically: "How do I... ", "How can I... " questions
Post Reply
xiemzuo
Posts: 10
Joined: 29 Nov 2017, 01:52

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

Post by xiemzuo » 14 Feb 2018, 00:20

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.

fferri
Posts: 206
Joined: 09 Sep 2013, 19:28

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

Post by fferri » 14 Feb 2018, 23:02

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.

xiemzuo
Posts: 10
Joined: 29 Nov 2017, 01:52

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

Post by xiemzuo » 22 Feb 2018, 03:47

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

fferri
Posts: 206
Joined: 09 Sep 2013, 19:28

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

Post by fferri » 22 Feb 2018, 09:24

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

Post Reply