I’ve seen some teams using a laptop to display useful information about the robot, like the live camera feed and such. I think that our team is going to try and code something like this for IRI and next year’s competition, but how would one go about doing this? We use Windriver for our robot.
Would you have to code the computer program in Visual Basic? Or what language? And how exactly would your program the robot to send data to it, and the computer program to receive the data?
I’m not a programmer, but I think there is standard code you can get, which works out of the box, and which can be customized. Same (sorta) as the ‘standard’ template for robot control.
We used the Labview dashboard on and off in testing and found it pretty useful, mainly for the 984 byte user data packet but a bit on the camera as well.
There is a Windriver / C++ equivalent to the LabView dashboard application. I believe there is also a demo application included. There’s quite a bit mentioned about the Dashboard class in the 1.1 update notes (http://first.wpi.edu/FRC/frcupdates.html)
The code on the dashboard and the robot do not have to be written in the same tool. They are connected by a UDP buffer and nothing else. The only provided template was written in LV. Others have been written in C#, Java, and the like, but since this runs on the PC, I don’t believe doing this in WindRiver makes sense.
To write data to the dashboard laptop using C++, use the dashboard classes already mentioned. To parse it on the diagram, use the documentation and a PC GUI capable dev tool to take the data out of the buffer.
I’m not too skilled at programming GUI’s; Visual Basic seemed the easiest for that aspect. However, if Labview has a built in dashboard, that would be able to interface with the robot, correct? Even if they’re running different platforms or whatever?
I guess I’ve got a lot of learning to do between this season and next…
Right. As a couple people have said, the Robot just sends Dashboard data over the communications channel along with other things the DS needs to know from the robot. Either of the Robot programming environments (LabVIEW or WindRiver C++) can be used to send Dashboard data in the communications packets. Both environments include example code on how to do this.
I cannot speak for the LabVIEW example, but the WindRiver example doesn’t actually send useful information. Rather, it shows you how to send the data.
For the PC side, the KOP-provided version of LabVIEW (with all appropriate updates applied) has an example/template program, which you can customize, that is a GUI Dashboard which runs on a PC connected to the Driver’s Station. However, all it does behind the scenes is read the network data, so, as others have suggested, it is quite possible to make a “Dashboard” in other PC-based programming environments.
LabView gives you access to some very nifty ‘front panel’ GUI objects and is very easy to hook up to inputs and drive outputs from it. Having these GUI objects for our robot code debugging was one of the big reasons we went with LabView this year. I would consider it at least as easy as Visual Studio in this regard.
The example Dashboard program that comes with the KOP Labview install is super-easy to compile and get running. It tracks all of the PWM, relay, and analog outputs and inputs on the robot, displays the camera view, battery voltage, and more. By default it dumps the 984 bytes of user data to a string in a log window, but you could decode that data however you want to drive your own gages, dials, lights, etc.