Can't install camview in buster

More
3 years 11 months ago #256471 by seuchato
Tried to "cycle through rotation increments or 5, 1, 0.5 and 0.1 degrees by clicking the middle mouse (or left and right together) button". Sounds surrealistic! I have a logitech mx master. No combination seems to trigger resolution change.

I'll try again tomorrow. I do hope I can get the 2.9 stuff into my 2.8.4 setup. Anyway: I'll be reporting what I find.

Thanks a ton anyway!

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

More
3 years 11 months ago #256479 by cmorley
Ahh yes 2.8.4 doesn't have the cycling code.
You probably can just copy the 2.9 camview.py into 2.8.4, i don;t think it uses any new code.
Here is the latest 2.9 code:
github.com/LinuxCNC/linuxcnc/blob/2.9/li...ts/camview_widget.py

github.com/LinuxCNC/linuxcnc/blob/2.8/sh...cam_align_handler.py
The following user(s) said Thank You: seuchato

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

More
3 years 11 months ago - 3 years 11 months ago #256485 by seuchato

Ideally the tab would resize automatically.
In pyqt4 it worked pretty well. pyqt5 not so much.

I could make the default size settable from the INI when loading I think, if that would help.

chris
Since you added the code for setting the windows size in the ini file, I have been thinking whether or not it is a good idea to have the automatic resizing or not. Here is my reasoning, why I would prefer the fixed ini way:

The cameras will have a defined resolution like 1920x1080. The tab canvas size is not related at all to the the camera resolution. In attached screenshot you can see a manually resized cam_align window. Instead of 1920x1080 the window is now something like 100x800. Still the rotated cross hairs internal angle remains at 90°. The reading now is 314° where it should be in between 348.0 and 348.5°. Also the red circle remains round and is limited to the canvas size of the cam_align window. The behavior of circle and cross hairs is correct imho. I fine tuned the original size to match the red circle as good as possible to the circle on the paper. This aspect ratio should be kept, in order to make use of optical alignment. So, if automatic resizing is any good, it should keep the aspect ratio, else angular readings and optical centering could become obsolete.

And: Where to set this aspect ratio, if not in the ini file?

greez
chris
Last edit: 3 years 11 months ago by seuchato. Reason: typo corrected

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

More
3 years 11 months ago #256486 by seuchato

Ahh yes 2.8.4 doesn't have the cycling code.
You probably can just copy the 2.9 camview.py into 2.8.4, i don;t think it uses any new code.
Here is the latest 2.9 code:
github.com/LinuxCNC/linuxcnc/blob/2.9/li...ts/camview_widget.py

github.com/LinuxCNC/linuxcnc/blob/2.8/sh...cam_align_handler.py

Did the following:
Code:
cd /usr/lib/python2.7/dist-packages/qtvcp/widgets mv camview_widget.py camview_widget.py.sav cp /home/cnc/downloads/camview_widget.py . cd /usr/share/qtvcp/panels/cam_align/ mv cam_align_handler.py cam_align_handler.py.sav cp /home/cnc/downloads/cam_align_handler.py

started linuxcnc and got a pthon erro, see attached screen shot and errortext below:
Code:
Traceback (most recent call last): File "/usr/bin/qtvcp", line 377, in <module> APP = QTVCP() File "/usr/bin/qtvcp", line 211, in __init__ window.instance() File "/usr/lib/python2.7/dist-packages/qtvcp/qt_makegui.py", line 178, in instance instance = uic.loadUi(self.filename, self) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/__init__.py", line 226, in loadUi return DynamicUILoader(package).loadUi(uifile, baseinstance, resource_suffix) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/Loader/loader.py", line 72, in loadUi return self.parse(filename, resource_suffix, basedir) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 1021, in parse actor(elem) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 828, in createUserInterface self.traverseWidgetTree(elem) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree handler(self, child) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 273, in createWidget self.traverseWidgetTree(elem) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree handler(self, child) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 503, in createLayout self.traverseWidgetTree(elem) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree handler(self, child) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 546, in handleItem self.traverseWidgetTree(elem) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 806, in traverseWidgetTree handler(self, child) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 264, in createWidget self.stack.push(self.setupObject(widget_class, parent, elem)) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/uiparser.py", line 228, in setupObject obj = self.factory.createQObject(clsname, name, args, is_attribute) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/objcreator.py", line 100, in createQObject factory = self.findQObjectType(classname) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/objcreator.py", line 125, in findQObjectType w = module.search(classname) File "/usr/lib/python2.7/dist-packages/PyQt5/uic/Loader/qobjectcreator.py", line 113, in search module = __import__(mname, {}, {}, (cls,)) File "/usr/lib/python2.7/dist-packages/qtvcp/widgets/camview_widget.py", line 71 SyntaxError: Non-ASCII character '\xe2' in file /usr/lib/python2.7/dist-packages/qtvcp/widgets/camview_widget.py on line 71, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Guess, that's because 2.9 is based on python 3 and 2.8.3 is still on 2.7. I got:
Code:
LANG=C apt list python Listing... Done python/oldstable,now 2.7.16-1 amd64 [installed,automatic]

I am not familiar with python. Thus I do not feel fit to backport stuff to 2.7 (if possible at all). So, I cannot test it under 2.8.4.
greez
chris

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

More
3 years 11 months ago #256487 by seuchato
the missing error screenshot:
 

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

More
3 years 11 months ago #256511 by cmorley
Oh yes I forgot about the python2/3 encoding trouble. Sorry about that.
Looks like its the code to subscript the increment display.

I don't think I have a system that runs 2.8 at the moment so can't advise how to adapt it.
It.

Chris
The following user(s) said Thank You: seuchato

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

Time to create page: 0.400 seconds
Powered by Kunena Forum