|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Creating a Dashboard
Hello everyone,
This is my second year in FRC, and first year of being one of the main coders (though I have previous C++ experience). Last year, we were using Labview, and it was fairly simple to create a custom dashboard. However, this year, we are thinking of switching to C++, and I have absolutely no idea how to create one. Could you guys help me at all with this? Thanks |
|
#2
|
|||
|
|||
|
Re: Creating a Dashboard
QT and bsd sockets are the way to go. Take a look at QT-Creator (qt.digia.com) for building a dashboard on the laptop side. For sending the data I use QT's QTcpSocket on the laptop and the TCPHelper Functions on the robot.
Last edited by agartner01 : 27-09-2012 at 19:31. |
|
#3
|
|||||
|
|||||
|
Re: Creating a Dashboard
You don't have to program the Dashboard using the same language you program the robot with. If you follow the data format properly in a C++ robot program, you can easily send data to a LabVIEW Dashboard program.
|
|
#4
|
||||
|
||||
|
Re: Creating a Dashboard
No need to create an entirely new dashboard from scratch (unless you want to, that is). Check out ZomB and SmartDashboard, both of which are fairly mature, have decent documentation, and work pretty well.
It's also completely possible to use the LabView dashboard with Java or C++ if you follow a few steps to make it compatible. |
|
#5
|
||||
|
||||
|
Re: Creating a Dashboard
Yep, we used SmartDashboard this year and it was great. The more people use it, the bigger the community, the more widgets will get added, and the better it will become. I think SmartDashboard is not only the most integrated, but it was really easy to set up and get going. It's part of WPILib now, so my guess is you'll get the best support with this solution.
|
|
#6
|
|||||
|
|||||
|
Re: Creating a Dashboard
Quote:
|
|
#7
|
|||
|
|||
|
Re: Creating a Dashboard
Quote:
My team used Network Tables last season, and personally, I found them inefficient and inaccurate (which was probably more because of the bandwith problems rather than poor design), half of the time the data never was recieved... Hopefully Network Tables 2.0 will be better (the FirstForge page makes them sound so). On the note of Qt, sockets, and c++: I actually got a system to send and recieve data values to the robot up and running in about an hour (with pretty much zero knowledge of socket programming). The TCPHelper functions really make it easy on the robot side... On the laptop side it's pretty much just socket.connectToHost(), then socket.write(), or socket.read() (without error checking, of course). TL;DR: You can probably get by using NetworkTables, but don't be afraid of sockets... |
|
#8
|
|||
|
|||
|
Re: Creating a Dashboard
Thanks to everyone! I would prefer to go with the option that has the least amount of work involved, and produces acceptable results--so I think we might just use LabView. Thanks Alan/Rapture for suggesting that--I wasn't sure if they were compatible with each other. I don't have much experience building a dashboard (Though I would assume it's all pre-packaged in the 'Build Dashboard Project' option in LabView; I'm sure it won't be too hard to extend the ready-made code). Are there any finer points to deal with connecting to such a dashboard in C++? And would I just use the functions provided in the Dashboard class? The Dashboard.AddType() functions (in Dashboard.h)? I guess Labview will have similar options for reading, and writing back.
However, what functions would I use for listening to the Dashboard from the CRio? Once again, thanks! |
|
#9
|
||||||
|
||||||
|
Re: Creating a Dashboard
Quote:
If two way communication is important, I would suggest starting with the SmartDashboard, which supports two way communication natively. I think that managing the datatype using the Dashboard class to communicate with the LabVIEW dashboard is a pain, but that isn't necessary with SmartDashboard. |
|
#10
|
|||
|
|||
|
Re: Creating a Dashboard
While I won't discourage you from learning the lower level packing functions that are provided for sending stuff to the dashboard, a beta quality set of VIs that implement the SmartDashboard protocol were released last year.
The 2.0 version should make it far easier to mix and match languages and to allow for two-way communications. So perhaps you want to wait until more of that is available. Greg McKaskle |
|
#11
|
|||
|
|||
|
Re: Creating a Dashboard
That first link describing how to use the Labview dashboard with C++ seems to have been deleted. Is this still possible to do?
|
|
#12
|
||||
|
||||
|
Re: Creating a Dashboard
Probably, but the SmartDashboard has been more then sufficient for any task I've had for it. Unless your concerned about aesthetics, I don't see any reason to not use the SmartDashboard.
|
|
#13
|
|||
|
|||
|
Re: Creating a Dashboard
It is still possible to do. Communicating to the LV or Java SmartDashboard from C++ is identical. Simply write to a SmartDashboard variable.
Building the dashboard visuals is different and both tools have a variety of ways to accomplish it. Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|