Gremlin

More
11 Dec 2012 09:48 #27553 by cmorley
Replied by cmorley on topic Gremlin
Yes it seems adding the try statements in about three places works.
I will test more before pushing

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

More
11 Dec 2012 14:21 - 11 Dec 2012 14:30 #27556 by cmorley
Replied by cmorley on topic Gremlin

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.

More
11 Dec 2012 17:23 #27564 by ArcEye
Replied by ArcEye on topic Gremlin

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.

More
11 Dec 2012 19:28 #27570 by BigJohnT
Replied by BigJohnT on topic Gremlin

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.

More
11 Dec 2012 19:57 #27571 by ArcEye
Replied by ArcEye on topic Gremlin
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
Attachments:

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

More
11 Dec 2012 20:12 #27572 by BigJohnT
Replied by BigJohnT on topic Gremlin
Looking good!

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.

More
11 Dec 2012 20:21 #27573 by ArcEye
Replied by ArcEye on topic Gremlin
With Michael, Chris, Pavel , Jeff et al programming in python, you are probably learning the right language.

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.

More
11 Dec 2012 23:22 #27585 by mhaberler
Replied by mhaberler on topic Gremlin
great!

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.

More
12 Dec 2012 00:36 #27594 by ArcEye
Replied by ArcEye on topic Gremlin

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 B)

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.

More
12 Dec 2012 10:08 #27608 by cmorley
Replied by cmorley on topic Gremlin
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

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

Time to create page: 0.179 seconds
Powered by Kunena Forum