Another tab for WebCam

More
28 Sep 2011 09:24 #13488 by psha
Replied by psha on topic Re:Another tab for WebCam
Have you properly connected them?

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

More
26 Oct 2011 10:44 - 26 Oct 2011 10:52 #14278 by ArcEye
Replied by ArcEye on topic Re:Another tab for WebCam
Hi psha

Just a quick thanks for your wiki and camview-emc.deb hosting.

I found the need for a camera centring system and this worked perfectly.

For anyone considering it, I can recommend this camera.
Sold under various names, a generic item vendor ID 1e4e in USB device info



It cost £10 with free delivery from Fleabay, works out of the box, udev creates /dev/video0 and /v4l

Best thing is its 'metal' cylindrical shell which allows easy mounting into a turned spindle mounted holder.
Therefore negligible consideration required for any parallax effect, aside from how central the lens is to its own shell, which appears pretty central.

The focussing / zoom ring can sit outside the holder mouth for ease of use with 50mm of the camera securely inside the holder.

regards
Attachments:
Last edit: 26 Oct 2011 10:52 by ArcEye.

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

More
26 Oct 2011 11:09 #14279 by andypugh
Replied by andypugh on topic Re:Another tab for WebCam
That does look easier to mount than the one I have. (Which is also cylindrical and metal, but has a long, pliable, USB tail.)

What motherboard do you have, and does the camera alter the latency in any way? I have a D510 and my existing camera messes with the realtime (which is bearable, as I wouldn't machine with a camera....)

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

More
26 Oct 2011 14:09 - 26 Oct 2011 14:36 #14300 by ArcEye
Replied by ArcEye on topic Re:Another tab for WebCam
Hi Andy

The only computer I tested latency on was the one detailed in this thread
www.linuxcnc.org/component/option,com_ku.../lang,english/#14217

In fact streaming video from it actually lowered the thread jitter, as did streaming from an IP cam, but that was a multi-core anomaly to do keeping the CPU busy and keeping everything in the cache from what I can figure out.

My workshop machines are Fujitsu-Siemens slimline desktop 'Green' PCs, 2.4 and 2.8 Ghz P4s 1GB RAM with an Intel video chipset, so most likely the board is Intel but never looked to find which board.
I have them running Ubuntu 8.04, albeit with a development RIP version of EMC.

I have not had any real-time errors, but have not tried any latency tests on them with camera running.

Like you I would not be routinely running the camera whilst milling, I have one config with NgcGui tabs for generating the program and another for general work.

I have added the camera to the second config and just pull the USB plug out when I have centred and removed the holder from the spindle.
It remains stuck on the last frame you had and a lot of v4l error messages are written, but finding its process number in a separate terminal with ps a gets something similar to
..
5560 pts/0 S+ 0:02 python /usr/bin/camview-emc -C camviewcfg -w 39846645
..
and then killing that process sorts it out OK.

(in fact doing that before i pull the plug might be neater..:woohoo: )

regards
Last edit: 26 Oct 2011 14:36 by ArcEye.

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

More
26 Oct 2011 18:37 #14312 by psha
Replied by psha on topic Re:Another tab for WebCam
2ArcEye
If you just turn camera off in camview interface latency is still bad?
Probably it's a bit easier then killing process...
Also you may try running 'pkill -f camview-emc' instead of looking PID in 'ps a' output

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

More
27 Oct 2011 06:47 #14318 by eslavko
Replied by eslavko on topic Re:Another tab for WebCam
Just for information...
In My compaq NX9005 the latency is same with or without cam.

Just need to run computer without battery. If battery is present there is some (probably SMI) isue with 5ms jitter aprox twice in minute. If batery is removed then bad thing is happend few minutes after removal and then stall. So I just plug computer few minutes before CNC job.

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

More
27 Oct 2011 07:38 #14319 by kostas
Replied by kostas on topic Re:Another tab for WebCam
A small tip for those about to search where to find this camera (I did), there is a nice (new?) feature on google, you just drag and drop the image above to google's images search box and google returns results based on the image search. Did that and found it on ebay.

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

More
27 Oct 2011 08:28 - 27 Oct 2011 08:29 #14322 by ArcEye
Replied by ArcEye on topic Re:Another tab for WebCam
psha wrote:

2ArcEye
If you just turn camera off in camview interface latency is still bad?
Probably it's a bit easier then killing process...


If I had realised that button was there, that is what I would have tried !!!!!!!!!!!!!!

My latency appeared fine, it was Andy who had problems with a different motherboard / chipset / processor.

Also you may try running 'pkill -f camview-emc' instead of looking PID in 'ps a' output

Yes or killall camview-emc,
I just started that way because I didn't know how many child processes had been spawned and wanted to check the read out before killing anything.

We tend to just keep doing what works, takes less time than thinking of a more efficient way:lol:

regards
Last edit: 27 Oct 2011 08:29 by ArcEye.

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

More
01 Nov 2011 11:37 #14481 by ArcEye
Replied by ArcEye on topic Re:Another tab for WebCam
Hi

My proving for camview-emc was on a test machine running Ubuntu 10.4 (with emc 2.6~pre RIP)
This worked 'out of the box' just following the wiki.

When I came to transfer across to the older workshop machines running Ubuntu 8.04 (with emc 2.6~pre RIP) I hit unexpected problems.

Initially the camera did not work in camview-emc, despite working with cheese etc. As per the troubleshooting page, I loaded the vivi module, got a black screen when I went to OpenGL so changed over to the software libgl-mesa-swx11 and voila, camview-emc displays the camera stream.

However when I came to embed the camera, emc threw a whole bunch of errors connected with the .axisrc embedding code (see below) and exited.
This is most strange, because I already had the code in my .axisrc file, commented out, from when I tested embedding a terminal window, which worked fine.
The code was identical, but now I could not embed anything, terminal or camview-emc into emc.

It is not a huge problem, I can open camview-emc and position so as to see the stream whilst jogging, it's just not as convenient as being able to have a child process and not have to worry about which process has focus before using the keyboard.

Error print from trying to embed a terminal below, exactly the same if trying camview.
Any ideas?

regards
Starting EMC2...
Loading 
/root/emc2/configs/Easimill/auto.ngc
Traceback (most recent call last):
File "/usr/src/emc2-dev/bin/axis", line 3304, in <module>
    _dynamic_tabs(inifile)
File "/root/.axisrc", line 24, in _dynamic_tabs
    w = _dynamic_tab("user_" + str(i), t)
File "/root/.axisrc", line 11, in _dynamic_tab
    tab = widgets.right.insert("end", name, text=text)
File "/usr/src/emc2-dev/lib/python/bwidget.py", line 44, in w
    r = str(f(self, *args, **kw))
File "/usr/src/emc2-dev/lib/python/bwidget.py", line 248, in insert
    return self.tk.call(self._w, "insert", index, page, *self._options(kw))
    _tkinter.TclError: page "user_0" already exists
    Error in atexit._run_exitfuncs:
    Traceback (most recent call last):
File "/usr/lib/python2.5/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
File "/root/.axisrc", line 35, in kill_dynamic_childs
    c.terminate()
    AttributeError: 'Popen' object has no attribute 'terminate'
    Error in atexit._run_exitfuncs:
    Traceback (most recent call last):
File "/usr/lib/python2.5/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
File "/usr/src/emc2-dev/bin/axis", line 3167, in kill_dynamic_childs
    for c,_,w in _dynamic_childs.values():
    TypeError: 'Popen' object is not iterable
    Error in sys.exitfunc:
    Traceback (most recent call last):
File "/usr/lib/python2.5/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
File "/usr/src/emc2-dev/bin/axis", line 3167, in kill_dynamic_childs
    for c,_,w in _dynamic_childs.values():
    TypeError: 'Popen' object is not iterable
Shutting down and cleaning up EMC2...
Cleanup done

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

More
02 Nov 2011 07:40 #14505 by psha
Replied by psha on topic Re:Another tab for WebCam
You don't need embeding/killing code in .axisrc anymore (if you are using 2.5+)
So you have two attempts to add window, one in axis main code, other in /root/.axisrc

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

Time to create page: 0.104 seconds
Powered by Kunena Forum