Gremlin
11 Dec 2012 14:21 - 11 Dec 2012 14:30 #27556
by cmorley
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
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
Last edit: 11 Dec 2012 14:30 by cmorley.
Please Log in or Create an account to join the conversation.
11 Dec 2012 17:23 #27564
by ArcEye
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
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.
11 Dec 2012 19:28 #27570
by BigJohnT
Yes, I'm starting it with linuxcnc path to ini file
John
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.
11 Dec 2012 19:57 #27571
by ArcEye
Et voila!
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
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.
12 Dec 2012 00:36 #27594
by ArcEye
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
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.
12 Dec 2012 10:08 #27608
by cmorley
It looks as though HAL_gremlin gets it's own reference to linuxcnc's file and passes it to gremlin.
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
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.
Time to create page: 0.151 seconds