What are the chances of getting this setup working?

More
14 Aug 2023 15:59 #277970 by blazini36
github.com/yur7aev/linuxpnp/blob/master/configs/pnp/pnp.hal



Judging by the date it was created in the days of Python2. I'm not worried about the hal stuff, I'm just curious if the Python stuff will run on 2.9.

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

More
14 Aug 2023 16:23 #277975 by tommylight
Video is by Dimitry, he is a meember here and is very helpful.
His nic here has numbers in it, something like D1m1try ....

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

More
15 Aug 2023 02:38 #278020 by blazini36
This forum doesn't really have a means of contacting people so maybe he'll stumble across the thread.

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

More
15 Aug 2023 10:25 #278037 by tommylight
He is here a lot i think, does mirracles with Mitsubishi servo drives.
Again, i think that is him.

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

More
16 Aug 2023 10:00 #278155 by Aciera
Out of curiosity I had a go at it and got it mostly working with 2.9 on a recent Bookworm installation.

 

Here is a sim config:
 

File Attachment:

File Name: axis_camview.tar
File Size:200 KB


I was struggling to get the usb camera stream working and ended up installing a bunch of stuff that turned out to be irrelevant but you will probably need this:

sudo apt install qv4l2

To try it out:
1. open a terminal and go to
/home/user/linuxcnc/configs/axis_camview/
2. run the vision app
$ python3 pnp.py

this should open a window and show a live stream of your usb cam.
If you don't then you may have to adjust the video device number in the brackets in line 271 in 'pnp.py'
 self.cam = cv.VideoCapture(0)

once that works, open another terminal and run
$ linuxcnc
then choose the 'axis_camview' config.

Some notes:
I don't know much about opencv and even less about gtk so pnp.py will likely need some more work. Sometimes the stream breaks when loading pnp.py or when starting the linuxcnc config. Also exiting the vision app seems a bit iffy, I usually need to hit CTRL+c a few times and then ENTER a few times.

Setting 'vision'debug' to 0 in halshow will hide the edge finding debug window.
To test I used a SD-card and good lighting with a ring light. The vision app seems to be looking for a certain format of rectangle.

I use a usb web cam with 720x480 resolution. Depending on your camera you may need to adjust 'pnp.py' in the following lines:
300    self.cam.set(cv.CAP_PROP_FRAME_WIDTH, 720)
301    self.cam.set(cv.CAP_PROP_FRAME_HEIGHT, 480)
 
418    frame = cv.warpPerspective(frame, M, (720, 480))

pnp.py is made to handle two cameras (bottom, top). Since I only have the one camera I had to disable the second camera by commenting line 383 and adding line 384

383        #if p.cam == 0:
384        if True:




Good luck.

 
Attachments:
The following user(s) said Thank You: tommylight, blazini36, my1987toyota

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

More
17 Aug 2023 07:14 #278235 by jpg
essayez ici , je pense que c est son site :
yurtaev.com/

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

More
17 Aug 2023 07:16 - 17 Aug 2023 07:17 #278236 by jpg
essayez ceci , je pense que c est sn site:
yurtaev.com/
Last edit: 17 Aug 2023 07:17 by jpg.
The following user(s) said Thank You: my1987toyota

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

More
18 Aug 2023 12:06 #278358 by my1987toyota
JPG- yes that is his site.

blazini36- I thought you were going the whole Openpnp to linuxcnc route?

Aciera- I can tell you from my experience with Linuxcnc 2.9 and a camera feed
            it can sometimes prove temperamental. Though your's looks worlds ahead
            of were the machine I am using currently is.

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

More
18 Aug 2023 13:48 #278372 by blazini36
Aciera, thanks for testing that out and making notes. Was a bit reluctant to spend time setting something up that I figured wouldn't work at all. Probably still take quite a bit of effort but I might give it a try when I get some time.

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

More
18 Aug 2023 15:13 #278387 by blazini36

blazini36- I thought you were going the whole Openpnp to linuxcnc route?

 

I actually did get it started. Using Iforce2d's gcode server it actually does work as far as I've gotten it setup, and I'm pretty sure it can be completely functional. Using OpenPnP is kind of a pain unfortunately. The creators obviously felt it was wise to do every last thing inside of a GUI which unfortunately makes it pretty hard to navigate unless you know where every single thing is. I waste alot of time trying to figure out a simple problem because it's burried under some submenu. That plus the fact that about 50% of what's in LinuCNC's ini file has to be duplicated inside OpenPnP's GUI gets annoying when you have to make a change. On top of that you're running LinuxCNC, then a server in another shell, then OpenPnP.

It could be a bit more manageable with some scripts. I started this topic when I was working on setting that up and got pretty annoyed at the whole thing. I spent a couple of days away from it so I'll see what it looks like when I get back to it
The following user(s) said Thank You: my1987toyota

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

Time to create page: 0.569 seconds
Powered by Kunena Forum