qtVCP not working for RPI 2.8 image

More
18 Oct 2020 22:58 #186529 by geo01005
I was excited to see that there is now a Linuxcnc image for the RPI4. I downloaded and installed and when to try out the QTVCP interface samples. None of them work. Attached is the error report from trying to run the qtDragon configuration.

Any help in better understanding what is going on would be helpful. I assume that some of the libraries this depends on are now found or compatible on the RPI, however it isn't making sense to me.

Can anyone point me in the right direction?
Attachments:

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

More
18 Oct 2020 23:32 - 18 Oct 2020 23:48 #186530 by persei8
DEFAULT Resources.py file needs to be compiled at: /usr/share/qtvcp/screens/qtdragon/resources.py (qt_pstat.py:216)
Unable to open /usr/share/qtvcp/screens/qtdragon/resources.py for writing
One problem is that user pi can't write to that directory without root privilege. It should be writing to the config directory.
Regardless, it won't work anyway if you want a graphics display. The Rpi uses OpenGL ES and qtvcp uses OpenGL. They are incompatible. I did manage to create a version that uses VTK but it's untested and not yet posted to github. I think one of the other GUIs, like Axis, might run OK, never checked. I would like to run my machine with a pi as well but not having much luck getting the graphics to work.

I should clarify. Linuxcnc works fine on the pi, it's QtDragon with the qt5_graphics library that doesn't.
Last edit: 18 Oct 2020 23:48 by persei8. Reason: Clarify

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

More
19 Oct 2020 01:17 #186537 by geo01005
I did change the permissions on that folder, but ran into a bunch more problems.

So I suppose for now that qtvcp and RPI won't play nice together?

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

More
19 Oct 2020 01:37 #186538 by BeagleBrainz
Changing permissions to any directory under /usr is a bad idea.
Yes it is a security issue.
But, another big issue is accidentally deleting things that should not be deleted.

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

More
19 Oct 2020 02:21 #186540 by persei8
I just uploaded the files to make QtDragon work with VTK. It's functional, but not as versatile as qt5_graphics. There's also the .deb package you need to install VTK. My ultimate goal was to make it look like qt5_graphics but there are some GL functions not available in VTK. I also explored porting to OpenGL ES but that's another whole can of worms. github.com/persei802/vtk Place them in your config directory, replacing the current ones.
Here's a screenshot of QtDragon on a RPi4
Problems? Let me know.
Jim
Attachments:

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

More
26 Oct 2020 12:02 - 26 Oct 2020 12:43 #187299 by mgmatteo
Hi Jim,
I installed the rpi4 image and configured for my machine.
So far so good with Axis, but I wanted to use QtDragon so I did the following actions:
> sudo apt install python-vtk6 (no errors)
> downloaded the files in your github and copied in /home/pi/linuxcnc/configs/vtk
> installed the .deb package (double cliked on it and gave permissions)
Now if I run linuxCNC under "My Configurations" I have the 3 qtDragon variants, but none of them are working.
I see the splash screen of LinuxCNC and then it simply doesn't start. No messages.
Any Idea? What can I try to debug it?
Thank you
Last edit: 26 Oct 2020 12:43 by mgmatteo.

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

More
26 Oct 2020 15:26 #187317 by persei8
If you start linuxcnc from a terminal, it should print out some startup info and any error messages. That way you may get a clue what the problem is.

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

More
26 Oct 2020 15:48 #187319 by mgmatteo
Sorry, I had to do it in the first post...
I attached the log,
but I think this is the point:

[QTvcp.QTVCP.QT_MAKEGUI][CRITICAL] module 'qtdragon_handler' skipped - import error: (qt_makegui.py:280)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/qtvcp/qt_makegui.py", line 278, in _load_handlers
mod = __import__(basename)
File "/home/pi/linuxcnc/configs/qtdragon/qtdragon_handler.py", line 17, in <module>
from vtk_backplot import VTKBackPlot
File "/home/pi/linuxcnc/configs/qtdragon/vtk_backplot.py", line 13, in <module>
import vtk.qt
ImportError: No module named qt
Shutting down and cleaning up LinuxCNC...
task: 1552 cycles, min=0.000164, max=0.011806, avg=0.009890, 0 latency excursions (> 10x expected cycle time of 0.010000s)
Note: Using POSIX realtime

Sorry I'm not a linux guy..
Attachments:

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

More
26 Oct 2020 19:02 #187332 by persei8

ImportError: No module named qt

Is QT installed?
If you type:
sudo dpkg --list | grep vtk
You should see libvtk7.1-qt along with a bunch of other stuff.
Also, not sure about double clicking on a deb package. To install it, you need to :
sudo dpkg -i  package_name.deb

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

More
26 Oct 2020 19:46 #187338 by mgmatteo
ok, this is what I get:
pi@linuxcnc:~ $ sudo dpkg --list  | grep vtk
ii  libvtk6.3                            6.3.0+dfsg2-2+b6                    armhf        VTK libraries
ii  libvtk6.3-qt                         6.3.0+dfsg2-2+b6                    armhf        VTK libraries, Qt files
ii  python-vtk6                          6.3.0+dfsg2-2+b6                    armhf        Python bindings for VTK
ii  vtk                                  7.1.1-qt5py2-1                      armhf        vtk
pi@linuxcnc:~ $ 
I see 7.1.1-qt5py2-1 so looks like it's installed as far as I can tell.
I also tried to reinstall the package but no luck.
Just for curiosity I noticed there are more python version installed (2.6, 2.7, 3 and 3.7) maybe that's normal but I don't know where to look at...
thank you

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

Moderators: cmorley
Time to create page: 0.210 seconds
Powered by Kunena Forum