G-code and driving robots.

More
16 Aug 2019 10:07 #142314 by Roiki
I've found a lot of talk but surprisingly little answers. Can you drive a 7 axis robot directly with standard Gcode? I know G53 is moving in absolute machine units but how does it handle rotational axes since milling mainly deals in linear? No experience in 5 axis milling so do they specify those values as angles or some other units?. Or could you use G1/G0 with say, G90 to move at different speeds and control feedrate etc.?

I also have a ROS output that outputs trajectories as joint angle values(deg or rad) and I'm thinking can that be converted to G-code by simply taking each value and assigning it to a G53 X<value> Y<value> etc. format? And in the same vein use a program to record the current joint values and insert dwells etc. and create robot programs this way?

Also with the proper kinematics, could you input a standard 3 axis milling G-code program and have it used as cartesian coordinates system? How would this work?

Please Log in or Create an account to join the conversation.

More
16 Aug 2019 12:10 #142316 by andypugh
Replied by andypugh on topic G-code and driving robots.

Also with the proper kinematics, could you input a standard 3 axis milling G-code program and have it used as cartesian coordinates system? How would this work?


It works quite well, once the kinematics is set up right.

There are lots of examples of LinuxCNC driving robots in just this way. One example:

Please Log in or Create an account to join the conversation.

More
16 Aug 2019 12:50 #142317 by Roiki
Replied by Roiki on topic G-code and driving robots.
Good to know its in the realm of possibility, and that looks like exactly the thing I'm thinking about. But do any examples or more detailed information exist?

Please Log in or Create an account to join the conversation.

More
16 Aug 2019 16:28 #142326 by Todd Zuercher
There are simulation config with virtual 3D animations of a robot arm included with Linuxcnc. (See Vismatch)

Please Log in or Create an account to join the conversation.

More
17 Aug 2019 09:55 #142375 by Roiki
Replied by Roiki on topic G-code and driving robots.
I'm aware and I have a simulated config without kinematics for general testing but without the hardware it's kind of hard to prototype things.

I'm more looking for information on how gcode could the used to command robot positions and maybe examples of information how others have done it.

Please Log in or Create an account to join the conversation.

More
19 Aug 2019 02:07 - 19 Aug 2019 02:11 #142467 by Todd Zuercher
There are two basic ways that a CAM program can create g-code. One is direct 1 to one joint manipulation. This the CAM program must have specific knowledge of the machine's kinematics and the resulting code is machine specific. The other way is using tool center point commands. This way the g-code is generic. The g-code simply specifies the position and orientation in Cartisien space with xyzabc coordinates, abc are angular. And the machine control handles the kinematics work.
Last edit: 19 Aug 2019 02:11 by Todd Zuercher.

Please Log in or Create an account to join the conversation.

More
19 Aug 2019 09:44 #142479 by Roiki
Replied by Roiki on topic G-code and driving robots.
I know, I do have some experience in cnc machining. I'm just a little confused since xyz are typically linear if gcode (withG53) can be used to drive angular axes to specific angles like you would with a linear axes. Normally gcode treats ABC axes as only angular so thats not really the issue.

Also the the two control methods are usually called direct and vector control, the first uses xyzab values generated by CAM software and is machine specific since every machine has different A and B Axis configurations. The vector control replaces A and B values with (if I remember) K P and I values that describe the tool vector and attitude in 3D space. This is machine agnostic since the machine uses this to solve the tool position and the required axis positions.

For now im looking into the direct control since ROS takes care of the kinematics. I'm just wondering how I need to write the postprocessor for the ROS output and program creation functions.

Please Log in or Create an account to join the conversation.

More
20 Aug 2019 10:55 #142579 by andypugh
Replied by andypugh on topic G-code and driving robots.
I don't think that ROS is a particularly good fit with LinuxCNC. There is too much overlap in function.

LinuxCNC can work very well with what you are calling "vector control", so I am wondering why you are not following that approach?

Please Log in or Create an account to join the conversation.

More
20 Aug 2019 11:08 #142586 by Roiki
Replied by Roiki on topic G-code and driving robots.
How come? To my understanding linuxcnc is more of a low level controller that handles the hardware and code playback functions whereas ROS is more of a high level simulation environment with functional 3d models and full kinematics and design environment with rviz or gazebo. I don't see the overlap since ros lacks much of the hardware integration. Also I already have the 3d models and ros industrial setup ready to go. I mainly need something to bridge the hardware. I was going to write it myself but linuxcnc is more flexible.

And since want it to be made of separate components that work independently.

There is a ros integration project with linuxcnc that I've been looking into but I don't know if it works distributed and I doubt it would be independent then. At least not without two sets of configs.

Its also easier to just focus on one part at time and worry about integration later.

Please Log in or Create an account to join the conversation.

More
20 Aug 2019 11:36 #142589 by andypugh
Replied by andypugh on topic G-code and driving robots.
LinuxCNC can handle the kinematics required to convert TCP G-code to joint angles. So if you have "vector G-code" from a CAM system you don't need to include ROS in the chain.

If you have LinuxCNC installed then try opening the /sim/axis/vismach/5axis/table-rotary-tilting/xyzac-trt sample config to see a 3D simulatad machine tool running a vector G-code example. (The sample file is an impeller model, you can see the same file being machined on a real machine here )

Please Log in or Create an account to join the conversation.

Time to create page: 0.090 seconds
Powered by Kunena Forum