|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Graphing Data
Is there anyway of easily graphing data from the robot. I have tried pushing a number to the SmartDashboard, but when I try to set it to line plot, it dissapears. Are there any alternatives?
|
|
#2
|
||||
|
||||
|
Re: Graphing Data
What language are you writing your dashboard in?
|
|
#3
|
|||
|
|||
|
Re: Graphing Data
c++
|
|
#4
|
||||
|
||||
|
Re: Graphing Data
Our code release http://www.chiefdelphi.com/forums/sh....php?p=1516461 may be helpful. Look at the bits about 'data logging'.
We logged the data to a file (in CSV format) on the roboRIO (either in /home/lvuser, or on a thumb drive plugged into the roboRIO). We could then copy the file off with SFTP/SCP/FTP (or pull the thumb drive), and plot it with Excel, Veusz, or something else. It's not realtime, but that wasn't our intent. We *have* done realtime plotting with a custom network tables client on the driver station, it's doable, but icky. It's written in Java, but it should have enough detail in there to get you going (writing files in C++ isn't any harder than in Java). PM me if questions. |
|
#5
|
||||
|
||||
|
Re: Graphing Data
There are a lot of really cool easy to use graphing libraries available in Javascript. Perhaps send the data via NetworkTables and write your dashboard using HTML/Javascript? Very simple, not icky at all.
I should probably put together a graphing example one of these days...in particular, epoch.js looks really promising. |
|
#6
|
||||
|
||||
|
Re: Graphing Data
virtuald is right, doing this with network tables and pynetworktables2js would be pretty simple. I guess I meant to say "the way we did it (Swing) was icky".
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|