|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
||||
|
||||
|
SmartDashboard Extension
Hello,
I've been having some trouble with SmartDashboard extensions. I tried a simple extension that extends WPICameraExtension and has an override for processImage to return the image. I can add it to the SmartDashboard fine but it says no connection - a Simple Camera Viewer works, though. The Camera widget also says no connection. Any ideas why it isn't able to connect? I thought it was my extension at first but due to the fact that the Camera widget/extension also says no connection makes me wonder if it's something non-plugin related. I'm using the vanilla SmartDashboard - not SFX. Thanks. Last edited by Ozuru : 07-02-2015 at 17:30. |
|
#2
|
||||
|
||||
|
Re: SmartDashboard Extension
It doesn't seem to load the extension when I load the dashboard through the driver station - only when I open the .jar file through the command line in Users/<user>/wpilib/tools/ will it load my extension. Even if it loads the extension if won't display the image - it displays the image using the Camera extension/widget though, if I launch it via the driver station.
Any ideas? |
|
#3
|
||||
|
||||
|
Re: SmartDashboard Extension
I hate to bump this but I'm still having this issue.
|
|
#4
|
|||||
|
|||||
|
Re: SmartDashboard Extension
We had some issues with a bad connection (I believe it was called a broken pipe) trying to use the intermediate vision example. I don't recall the exact solution, but it turned out that the broken connection was not between the 'RIO and the driver station, but between the driver station and the image widget we were displaying it in. I'll see if I can get more details at our build this evening.
|
|
#5
|
||||
|
||||
|
Re: SmartDashboard Extension
Quote:
I spent more time working on this and am still having this issue. The Java SmartDashboard is opening with the same arguments I pass to it (java -jar /path/to/dashboard/SmartDashboard.jar) but for some reason, the one spawned through selecting the "Java" SmartDashboard is refusing to acknowledge my plugin. When I open it through the command line, it opens it and loads my extension/plugin. The Camera widget still does not work for me and won't establish a connection when opened through the command line. It works fine if it is opened through the Driver Station. I used a process monitoring tool to confirm that it is opening the same SmartDashboard I'm opening via command line (shoutout to Procmon!). I'm nearly at my wits end for this issue and have tried almost everything I can think of. Due to the non-existent documentation for SmartDashboard I've decompiled SmartDashboard and am trying to determine the cause of this issue but it's not going too well. If anyone who has experience with extensions/widgets or a SmartDashboard developer sees this I would love it if you could post. Thanks. |
|
#6
|
|||
|
|||
|
Re: SmartDashboard Extension
Hum, The only think I can think of is the driver station may be using a different java version if you have multiple java installs on your computer. I cant access the smart dashboard code from this laptop but when I get home I will make sure its not checking for any weird arguments from the driver station.
The other thing you can try (If you have a java JDK installed and correctly added to your path variable) is to start the dashboard with the driver station then open the command prompt and type Code:
jps Code:
jstack <Number Here> Last edited by nickmcski : 10-02-2015 at 16:04. |
|
#7
|
||||
|
||||
|
Re: SmartDashboard Extension
Quote:
Here's the result of its stack trace: Code:
C:\WINDOWS\system32>jstack 5480
2015-02-10 16:02:43
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode):
"TimerQueue" #28 daemon prio=5 os_prio=0 tid=0x0000000018802800 nid=0x14d0 waiti
ng on condition [0x000000001d10e000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000a4aca258> (a java.util.concurrent.lock
s.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
.await(Unknown Source)
at java.util.concurrent.DelayQueue.take(Unknown Source)
at javax.swing.TimerQueue.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
"Client Connection Reader Thread" #27 prio=6 os_prio=0 tid=0x00000000187c7000 ni
d=0x1520 runnable [0x000000001c9ff000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
- locked <0x00000000a4ac92a8> (a java.io.BufferedInputStream)
at java.io.DataInputStream.readByte(Unknown Source)
at edu.wpi.first.wpilibj.networktables2.connection.NetworkTableConnectio
n.read(NetworkTableConnection.java:115)
at edu.wpi.first.wpilibj.networktables2.connection.ConnectionMonitorThre
ad.run(ConnectionMonitorThread.java:30)
at edu.wpi.first.wpilibj.networktables2.thread.DefaultThreadManager$Peri
odicNTThread$1.run(DefaultThreadManager.java:18)
at java.lang.Thread.run(Unknown Source)
"D3D Screen Updater" #26 daemon prio=7 os_prio=1 tid=0x0000000018551000 nid=0x14
90 in Object.wait() [0x000000001c4ef000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at sun.java2d.d3d.D3DScreenUpdateManager.run(Unknown Source)
- locked <0x00000000a4aca4a8> (a java.lang.Object)
at java.lang.Thread.run(Unknown Source)
"DestroyJavaVM" #25 prio=5 os_prio=0 tid=0x0000000002410800 nid=0x1234 waiting o
n condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Swing-Shell" #18 daemon prio=6 os_prio=0 tid=0x0000000018405800 nid=0x13bc wait
ing on condition [0x000000001a9be000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000a4aca828> (a java.util.concurrent.lock
s.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
.await(Unknown Source)
at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Unknown Sourc
e)
at java.lang.Thread.run(Unknown Source)
"Write Manager Thread" #15 prio=6 os_prio=0 tid=0x0000000018376000 nid=0x464 wai
ting on condition [0x0000000018c5f000]
java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at edu.wpi.first.wpilibj.networktables2.WriteManager.run(WriteManager.ja
va:148)
at edu.wpi.first.wpilibj.networktables2.thread.DefaultThreadManager$Peri
odicNTThread$1.run(DefaultThreadManager.java:18)
at java.lang.Thread.run(Unknown Source)
"AWT-EventQueue-0" #14 prio=6 os_prio=0 tid=0x0000000017770800 nid=0x7ec waiting
on condition [0x000000001835f000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000a49da150> (a java.util.concurrent.lock
s.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject
.await(Unknown Source)
at java.awt.EventQueue.getNextEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
"AWT-Windows" #12 daemon prio=6 os_prio=0 tid=0x000000001776e800 nid=0x870 runna
ble [0x000000001813f000]
java.lang.Thread.State: RUNNABLE
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
"AWT-Shutdown" #11 prio=5 os_prio=0 tid=0x000000001776d800 nid=0xdac in Object.w
ait() [0x000000001803e000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000a4acad50> (a java.lang.Object)
at java.lang.Object.wait(Unknown Source)
at sun.awt.AWTAutoShutdown.run(Unknown Source)
- locked <0x00000000a4acad50> (a java.lang.Object)
at java.lang.Thread.run(Unknown Source)
"Java2D Disposer" #10 daemon prio=10 os_prio=2 tid=0x000000001776b800 nid=0x1270
in Object.wait() [0x0000000017f3f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000a49bf360> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
- locked <0x00000000a49bf360> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
at sun.java2d.Disposer.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
"Service Thread" #9 daemon prio=9 os_prio=0 tid=0x000000001746f800 nid=0x124c ru
nnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C1 CompilerThread2" #8 daemon prio=9 os_prio=2 tid=0x0000000015bf6000 nid=0x14b
c waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread1" #7 daemon prio=9 os_prio=2 tid=0x0000000015bf1000 nid=0x14c
0 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"C2 CompilerThread0" #6 daemon prio=9 os_prio=2 tid=0x0000000015bed000 nid=0xa98
waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Attach Listener" #5 daemon prio=5 os_prio=2 tid=0x0000000015bea800 nid=0xf78 wa
iting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Signal Dispatcher" #4 daemon prio=9 os_prio=2 tid=0x0000000015bea000 nid=0x167c
runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE
"Finalizer" #3 daemon prio=8 os_prio=1 tid=0x0000000015bb7800 nid=0x1678 in Obje
ct.wait() [0x0000000016f4f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
- locked <0x00000000a4bd0d10> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)
"Reference Handler" #2 daemon prio=10 os_prio=2 tid=0x00000000024fe000 nid=0x175
8 in Object.wait() [0x0000000016e4f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Unknown Source)
at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
- locked <0x00000000a4b23f48> (a java.lang.ref.Reference$Lock)
"VM Thread" os_prio=2 tid=0x0000000015bb6800 nid=0x1378 runnable
"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x0000000002426000 nid=0x156c runn
able
"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x0000000002428000 nid=0x15ac runn
able
"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x0000000002429800 nid=0x1574 runn
able
"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x000000000242b800 nid=0x1578 runn
able
"VM Periodic Task Thread" os_prio=2 tid=0x0000000017472000 nid=0x678 waiting on
condition
JNI global references: 373
Thanks! |
|
#8
|
||||
|
||||
|
Re: SmartDashboard Extension
When you launch the dashboard from within the Driver Station, the Driver Station uses an ini file to determine which program to run. This ini file is located in the directory:
Code:
C:\Users\Public\Documents\FRC The name of the ini file is: Code:
FRC DS Data Storage.ini Code:
DashboardCmdLine = "java -jar "C:\\Users\\mmaunu\\wpilib\\tools\\SmartDashboard.jar"" Inside the Driver Station, on the "Setup" tab, leave the dashboard type to "Default". By default, it will look for the command to run in the ini file. Your extensions should be installed in the following folder: Code:
C:\Users\mmaunu\SmartDashboard\extensions We create a jar file that contains our extensions and then just save the jar file to the folder above. Hope this helps. |
|
#9
|
||||
|
||||
|
Re: SmartDashboard Extension
Quote:
Inside the lib folder is javacpp.jar, javacv.jar, javacv-windows-x86.jar, and WPIJavaCV.jar. The timestamps for everything is around 2013 -- could I be using an outdated jar? Can someone upload their WPICameraExtension.jar and others for me? I think this might be the case. Thanks! |
|
#10
|
||||
|
||||
|
Re: SmartDashboard Extension
I haven't written any custom extensions that have dependencies on other jars so I'm unsure. I can try to test it later, but have you tried something like putting all of the jar files directly in the extensions folder (instead of having the java cv and cpp jars in "lib", put them all in "extensions")?
|
|
#11
|
||||
|
||||
|
Re: SmartDashboard Extension
Quote:
|
|
#12
|
|||
|
|||
|
Re: SmartDashboard Extension
Quote:
|
|
#13
|
||||
|
||||
|
Re: SmartDashboard Extension
Quote:
|
|
#14
|
|||
|
|||
|
Re: SmartDashboard Extension
Are you using 32 bit java with your smartdashboard? If I remember correctly one of the libraries only works on 32 bit java (i think it's javacpp).
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|