User avatar
micksulley
Posts: 160
Joined: Sat Mar 03, 2012 11:48 am
Location: Melton Mowbray, England

Universal G-Code Sender - Visualizer

Sun Apr 29, 2018 10:19 am

Hi,
How do I get the Visualize function to work in UGS? I am running version 2.0.0 stable on a Raspberry Pi. I have checked that Java is version 8. When I load g-code and press the Visualize button nothing happens. If I run UGS from a terminal I see loads of messages which don't mean a lot to me. This is what I see in the terminal

Code: Select all

pi@pi-ox:~/GCode $ java -jar -Xmx256m UniversalGcodeSender.jar
Apr 27, 2018 3:29:56 PM com.willwinder.universalgcodesender.utils.SettingsFactory loadSettings
INFO: Log location: /home/pi/.ugs/UniversalGcodeSender.json
Apr 27, 2018 3:29:56 PM com.willwinder.universalgcodesender.utils.SettingsFactory loadSettings
INFO: Loading settings.
Initializing...
Apr 27, 2018 3:29:56 PM com.willwinder.universalgcodesender.model.GUIBackend applySettings
INFO: Applying settings.
Apr 27, 2018 3:29:56 PM com.willwinder.universalgcodesender.model.GUIBackend addUGSEventListener
INFO: Adding control state listener.
Apr 27, 2018 3:29:56 PM com.willwinder.universalgcodesender.model.GUIBackend addControllerListener
INFO: Adding controller listener.
Apr 27, 2018 3:29:57 PM com.willwinder.universalgcodesender.model.GUIBackend addUGSEventListener
INFO: Adding control state listener.
Apr 27, 2018 3:29:57 PM com.willwinder.universalgcodesender.model.GUIBackend addUGSEventListener
INFO: Adding control state listener.
Apr 27, 2018 3:29:58 PM com.willwinder.universalgcodesender.model.GUIBackend applySettings
INFO: Applying settings.
Initializing firmware... ...
/resources/firmware_config/
/resources/firmware_config/grbl.json
/resources/firmware_config/test_1.json
/resources/firmware_config/tinyg.json
/resources/firmware_config/smoothieboard.json
/resources/firmware_config/test_2.json
Apr 27, 2018 3:29:58 PM com.willwinder.universalgcodesender.model.GUIBackend addControllerListener
INFO: Adding controller listener.
Apr 27, 2018 3:29:58 PM com.willwinder.universalgcodesender.model.GUIBackend addUGSEventListener
INFO: Adding control state listener.
Apr 27, 2018 3:30:17 PM com.willwinder.universalgcodesender.model.GUIBackend setGcodeFile
INFO: Setting gcode file.
Apr 27, 2018 3:30:17 PM com.willwinder.universalgcodesender.model.GUIBackend getGcodeFile
INFO: Getting gcode file.
Apr 27, 2018 3:30:17 PM com.willwinder.universalgcodesender.model.GUIBackend getGcodeFile
INFO: Getting gcode file.
Apr 27, 2018 3:30:17 PM com.willwinder.universalgcodesender.model.GUIBackend getGcodeFile
INFO: Getting gcode file.
Apr 27, 2018 3:30:17 PM com.willwinder.universalgcodesender.model.GUIBackend getGcodeFile
INFO: Getting gcode file.
Apr 27, 2018 3:30:17 PM com.willwinder.universalgcodesender.model.GUIBackend initializeProcessedLines
INFO: Start preprocessing
Apr 27, 2018 3:30:17 PM com.willwinder.universalgcodesender.model.GUIBackend preprocessAndExportToFile
INFO: Preprocessing /home/pi/GCode/Monitor Front DXF Final.gcode to /tmp/1524839417891-0/Monitor Front DXF Final.gcode_ugs_1524839417892
here.
here.
here.
Apr 27, 2018 3:30:18 PM com.willwinder.universalgcodesender.model.GUIBackend initializeProcessedLines
INFO: Took 281ms to preprocess
Apr 27, 2018 3:30:18 PM com.willwinder.universalgcodesender.model.GUIBackend getGcodeFile
INFO: Getting gcode file.
Apr 27, 2018 3:30:18 PM com.willwinder.universalgcodesender.model.GUIBackend getProcessedGcodeFile
INFO: Getting processed gcode file.
libEGL warning: DRI2: failed to authenticate
Exception in thread "AWT-EventQueue-0" java.lang.InternalError: Available GLVersions not set for EGLGraphicsDevice[type .egl, v1.4.0, connection decon, unitID 0, handle 0x60bb2320, owner true, NullToolkitLock[obj 0x11989]]
	at com.jogamp.opengl.GLProfile.initProfilesForDeviceCritical(GLProfile.java:1952)
	at com.jogamp.opengl.GLProfile.initProfilesForDevice(GLProfile.java:1875)
	at com.jogamp.opengl.GLProfile.initProfilesForDefaultDevices(GLProfile.java:1842)
	at com.jogamp.opengl.GLProfile.access$000(GLProfile.java:80)
	at com.jogamp.opengl.GLProfile$1.run(GLProfile.java:230)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.jogamp.opengl.GLProfile.initSingleton(GLProfile.java:216)
	at com.jogamp.opengl.GLProfile.getDefaultDevice(GLProfile.java:2027)
	at com.jogamp.opengl.awt.GLCanvas.<init>(GLCanvas.java:264)
	at com.jogamp.opengl.awt.GLCanvas.<init>(GLCanvas.java:231)
	at com.jogamp.opengl.awt.GLCanvas.<init>(GLCanvas.java:218)
	at com.willwinder.universalgcodesender.visualizer.VisualizerCanvas.<init>(VisualizerCanvas.java:146)
	at com.willwinder.universalgcodesender.visualizer.VisualizerWindow.<init>(VisualizerWindow.java:69)
	at com.willwinder.universalgcodesender.MainWindow.visualizeButtonActionPerformed(MainWindow.java:1284)
	at com.willwinder.universalgcodesender.MainWindow.access$2900(MainWindow.java:84)
	at com.willwinder.universalgcodesender.MainWindow$27.actionPerformed(MainWindow.java:980)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.Component.processMouseEvent(Component.java:6535)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6300)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4891)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4713)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2750)
	at java.awt.Component.dispatchEvent(Component.java:4713)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Thanks
Mick

MrGreg
Posts: 66
Joined: Sun Jun 10, 2012 7:25 pm

Re: Universal G-Code Sender - Visualizer

Sun Apr 29, 2018 10:50 am

UGS is java based and does not play well with the RPI.
Try this

https://github.com/vlachoudis/bCNC

It is almost identical to UGS but is Python based and runs well on the RPi

User avatar
micksulley
Posts: 160
Joined: Sat Mar 03, 2012 11:48 am
Location: Melton Mowbray, England

Re: Universal G-Code Sender - Visualizer

Mon Apr 30, 2018 11:25 am

Many thanks MrGreg.
I have downloaded it and tried it out, seems to work fine. I now need to go through the documentation to get to grips with it :)

Return to “Automation, sensing and robotics”