Closed Loop Computer Vision Enabled CNC

More
2 years 3 months ago #306661 by Hauligali22
Hello everyone!

I am very inexperienced in this field and I am attempting to develop a project. The basic premise is that I want to deposit material from a cnc machine fitted with an extruder on its end effector onto a free standing object. As the object is free standing, it may occasionally inadvertently move causing the predetermined toolpath (original g-code) to deposit material in the incorrect position. As a remedy, I am working to add cameras which can track the object being operated on and any movement will be tracked and it will automatically adjust the toolpath so that it does correctly print regardless of toolpath. I currently use mach4 to operate the machine and as such, I am struggling to determine how I can in real time, adjust the inputted g-code. I came across linuxcnc and QtPyVCP which from my own understanding, enables custom applications. Can anyone give me a sense of direction as to whether something like this can be implemented on this application? Thanks!

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

More
2 years 3 months ago - 2 years 3 months ago #306664 by Aciera
May be the 'external offsets' feature could be of interest. This will let you superimpose offsets to any axis through hal pins (ie outside of GCode) while the program is executed. LinuxCNC plasma applications use this to regulate the torch height on the sheet metal.
For a short demonstration:
Last edit: 2 years 3 months ago by Aciera.
The following user(s) said Thank You: Lcvette

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

More
2 years 2 months ago #306748 by Hauligali22
This is very interesting. Would I need additional controllers or components to enable this external offset feature or could I run this directly from LinuxCNC? Has this type of feature been explored on multiple axes simultaneously? Thanks for the response!

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

More
2 years 2 months ago #306751 by skunkworks
I would look at opencv.. (I think it is still a thing) I goofed around with it a few years ago with linuxcnc.. I can see if I can find the python code...

The following user(s) said Thank You: Aciera, onceloved

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

More
2 years 2 months ago #306752 by Aciera
No need for additional controllers but you would likely need to write a custom hal component to get your machine vision results into hal.

There is a simulation configuration 'configs/sim/axis/external_offsets/eoffsets' with external offsets for X,Y,Z axes (this will also run on a non-real time installation):

 

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

More
2 years 2 months ago - 2 years 2 months ago #306753 by Aciera
Regarding OpenCV there is also Dmitry's Pick and Place machine, uses OpenCV (python) for parts positioning and angular alignment.


his config files can be found here:
github.com/yur7aev/linuxpnp/tree/master/configs/pnp
Last edit: 2 years 2 months ago by Aciera.

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

Moderators: KCJ, Lcvette
Time to create page: 0.224 seconds
Powered by Kunena Forum