|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Java Custom Dashboard Difficulties
I was wondering if anybody knew any good tutorials for making a custom dashboard in Java. I HAVE found out about the dashboard example project, although editing it does not seem to do anything to the dashboard.
Another thing I have found out is that I can make the dashboard itself in LabView and transfer data between the two somehow. That is where I hit the dead end. I was never really great in LabView and am having trouble figuring out what I would need to change or add to the project to make it receive MY data from the robot. (I understand that something does this automatically when there are no custom clusters coming through. I would also like to know if i need to override anything to make it work). Thanks to anyone who can help me with this. |
|
#2
|
||||
|
||||
|
Re: Java Custom Dashboard Difficulties
Quote:
The dashboard that comes by default with the driver station is done in LabView. You've got a few choices there. You can either use lowDashData, TCP/UDP, or the NetworkTables implementation that's being added to FRC LabView this year. It's not super-well documented but a couple google searches should pull up some useful materials. http://www.chiefdelphi.com/forums/sh...d.php?t=104343 Otherwise (and this is what I recommend), you could use the SmartDashboard, which is similar except that it was designed more specifically toward Java/C++ teams. Here you would use NetworkTables for everything, basically, and it's a bit less frustrating than trying to get LabView and Java/C++ to play nicely together. |
|
#3
|
||||
|
||||
|
Re: Java Custom Dashboard Difficulties
I am having trouble understanding what I am to do with smart dashboard. I have run the installer and found the client application. How do I implement this so that I can use it in my code? I can't find any good documentation on it and when I try to use functions from the Library it doesn't really do anything. To be completely honest, I don't know what I'm doing.
|
|
#4
|
||||
|
||||
|
Re: Java Custom Dashboard Difficulties
There are two types of extendable SmartDashboard elements: Widgets and StaticWidgets. Widgets show up on the dashboard in response to code on the robot calling SmartDashboard.put() (or putDouble(), etc.); I don't think many teams created this type of widget during the 2012 season because it wasn't well documented and was pretty entrenched in the overall SmartDashboard system. However, there seems to be new documentation regarding them (here), so I think they will be more used in 2013. StaticWidgets are not made in response to data, and are instead added to the dashboard manually. The CameraExtension that many teams based their image processing on was a StaticWidget, and other StaticWidgets can be found under View->Add.
See also the official SmartDashboard documentation wiki and the responses to this post |
|
#5
|
|||
|
|||
|
Re: Java Custom Dashboard Difficulties
I actually did make a (less than spectacular) nonstatic Widget because I couldn't find the line chart option in the number widget. The one that I eventually found packed in SmartDashboard was way better in my opinion.
Here's a link to my code for it if anyone wants to look at how a custom Widget works https://github.com/pordonj/frc1675-SmartDashboardPlot Eventually the buffer size, max/min, etc. would have been configurable properties but I found the built-in one before I got that far I think. |
|
#6
|
||||
|
||||
|
Re: Java Custom Dashboard Difficulties
Wait, aren't there built in widgets? putData doesnt seem to work and the robot doesnt seem to be connecting with it either. Lastly, I can't seem to understand how to get it to launch upon startup of the driverstation, as it is a .jar file.
Please, I am very confused and need answers. This thing is driving me nuts. |
|
#7
|
||||
|
||||
|
Re: Java Custom Dashboard Difficulties
Quote:
Ok, so there's 3 download on that website. One is the bare .jar file, one is the installer (.exe), and one is the "InstallerCreator." If you have the driverstation installed and updated, using the installer will automatically change the driverstation's dashboard over to the SmartDashboard, and install the SmartDashboard in the Program Files folder on your computer. Do this, if you have not already. Navigate to C:\Program Files\SmartDashboard\extensions. Drop your custom extensions in that folder. Now go back up one directory and double-click the smartdashboard .jar. Your static extensions should now show up under View>Add Last edited by F22Rapture : 16-12-2012 at 23:15. |
|
#8
|
||||
|
||||
|
Re: Java Custom Dashboard Difficulties
So, to make it clear, there are no default extensions included. They all need to be made from scratch?
|
|
#9
|
|||
|
|||
|
Re: Java Custom Dashboard Difficulties
There are a bunch included. In most situations you will not need to make your own extensions.
|
|
#10
|
||||
|
||||
|
Re: Java Custom Dashboard Difficulties
Hmm. So it seems then that the robot is not connecting to the dashboard according to the connection indicator. I suspect the issue might be that I am using iterative robot, not command based java. Can anyone confirm?
I would also like to ask if there are any objects that need to be created in the code if it is not absolutely necessary to use command based java, and if there are any necessary commands to call. |
|
#11
|
|||
|
|||
|
Re: Java Custom Dashboard Difficulties
Command-based is not required. I don't believe you need to create any extra objects. It is a little fuzzy but looking at out last year's code you should just need to refer to SmartDashboard statically (i.e. SmartDashboard.putInt("Integer", myInt); ). I don't have immediate access to our computers but I think there is an IP address setting in the SmartDashboard settings in the application. Is it configured correctly?
|
|
#12
|
||||
|
||||
|
Re: Java Custom Dashboard Difficulties
In case you never found a solution...
We had a similar problem (dashboard never showing anything) and it turned out to be a configuration problem. In one of the sections of the SmartDashboard pulldowns is a "settings" tab. Make sure that you have your team number set in the settings or NOTHING will show up. Just a thought. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|