Gremlin
- cmorley
- Offline
- Moderator
-
- Posts: 7872
- Thank you received: 2127
I will test more before pushing
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
- Posts: 7872
- Thank you received: 2127
gremlin-run takes command line arguments and requires a running instance of Linuxcnc.
Without either it will abort with errors, is that what you are seeing?
It will run from the command line quite happily when these requirements are met.
I am currently trying to find a way of embedding it inside my Qt GUI, don't want to have to re-implement it if I can avoid it
regards
Could you use xembed:
doc.qt.digia.com/qt/qx11embedcontainer.html
To build a Qt wrapper around gremlin?
The same technique would allow gladvecp panels, webcam alignment etc.
Chris M
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
-
- Posts: 24
- Thank you received: 758
Could you use xembed:
doc.qt.digia.com/qt/qx11embedcontainer.html
To build a Qt wrapper around gremlin?
Hi Chris
Yes that is exactly what I am going to try.
I have used it very successfully in the past with well behaved X11 apps like mplayer.
It does not always work with other apps however, sometimes just doesn't display and others despite having focus, keyboard and mouse events don't get through.
regards
Please Log in or Create an account to join the conversation.
- BigJohnT
-
Topic Author
- Offline
- Administrator
-
- Posts: 7000
- Thank you received: 1175
No linuxcnc is loaded from a script when you start a config. (that's what I meant by linuxcnc)
the linuxcnc in your program is the python bindings to linuxcnc's status data and functions.
Are you starting this program like a regular config?
If so it may be that Gscreen takes longer to initialize so avoids this error.
It's cause because gremlin is trying to poll linuxcnc and linuxcnc isn't ready yet.
some sort of
try:
except:
in gremlin should fix this
Chris M
Yes, I'm starting it with linuxcnc path to ini file
John
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
-
- Posts: 24
- Thank you received: 758
Now I need to clean it all up, need to be able to spawn gremlin-run, after linuxcnc starts and calls my GUI and the GUI has rendered itself.
(I am currently testing by just launching it from the commandline after my GUI and the embedding is triggered by the Preview tab being clicked)
Good thing is that the mouse works properly on it, I can spin the axes around, pan in and out etc
regards
Please Log in or Create an account to join the conversation.
- BigJohnT
-
Topic Author
- Offline
- Administrator
-
- Posts: 7000
- Thank you received: 1175
I wish I didn't suck so much at C, I really like the way QT allows you to precisely position everything. I understand C logic statements fine it's all the other stuff that throws me off... one day I'll get a grip on it.
John
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
-
- Posts: 24
- Thank you received: 758
I am just doing this out of sheer perversity, to prove you can do it in Qt!
Please Log in or Create an account to join the conversation.
- mhaberler
- Offline
- Moderator
-
- Posts: 195
- Thank you received: 11
all's left to do is push qtvcp, cook up a few HAL widgets, document it and we're heading for 21st century GUIs

-m
Please Log in or Create an account to join the conversation.
- ArcEye
- Offline
- Junior Member
-
- Posts: 24
- Thank you received: 758
all's left to do is push qtvcp, cook up a few HAL widgets, document it and we're heading for 21st century GUIs
A little bit more than that to do at present

Currently having problems getting the Gremlin widget to draw a preview.
It follows a plot OK but despite ensuring that emcStatus->task.file is set, it is not loading a preview or refreshing when a file is opened.
Appears to be falling over on paths, after the call to self.load_preview(filename, canon, unitcode, initcode) it is throwing an error trying to open linuxcnc.var, which is in the struct canon.parameter_file, so never gets to draw the preview.
Have built a RIP to do all the testing from, so hopefully any path problems will be resolved
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
- Posts: 7872
- Thank you received: 2127
Well actually it connects it with a 'file-loaded' signal but the premise is the same.
That screen shot looks nice! clean design. I bet the response is snappy being written in C+
Chris M
Please Log in or Create an account to join the conversation.