SmartDashboard LinePlot Question

In SmartDashboard, you have the option to plot data on a lineplot, and it will plot the data against the time, which is measured in “units”. My question is what exactly those time units are, since they obviously aren’t seconds and it doesn’t seem like their deci-seconds either. Are they octaseconds?Also it would be nice to know if I could adjust those units.

Thanks a bunch for reading this and any insight would be greatly appreciated. Have a nice rest of the day!

I’ve also been looking for this info and I can’t find it. The “time” variable increments by 1 every time a data point is sent to SmartDashboard, regardless of actual time passed. I don’t know if SD receives data at a fixed / constant rate or if this rate ever changes. Let us know if you find out!

Ah, that’s useful information. Thanks! Makes sense too, as it explains why I never found data between two time points. Kinda feel silly now that I didn’t put that together.

I think the next time I have the robot in front of me (Saturday), I’ll graph an actual timer object’s data against it and see if there’s any consistent correlation. Though even if it is, I wonder if I can trust it with other data…

Perhaps while I’m on here, though, I can ask a few more questions.

First, do you know what time unit the CANTalon’s getEncVelociity() uses? I couldn’t find that information on the CTR’s API, though perhaps its safe to assume it’s seconds?

Second, do you have any insight on how to accurately measure a robots maximum acceleration and jerk? We’re trying to get motion profiling working, and are having a bit of trouble figuring out a way to find those out. We were thinking of using the highest noticed change in getEncVelocity() that appeared on a Smart Dashboard line plot for maximum acceleration, but if we don’t have consistent time units there it may be trickier than we thought.

We have found that the plots are not time series. Each time the value changes a new point is added. This makes it very difficult to line up multiple plots.

To get the maximum acceleration for a given time period, can’t you use a timer to measure the time elapsed between GetEncVel calls and divide the change in velocity by the change in time? And maximum jerk by a similar principle? You can’t make a cool accurate graph this way, though.

FYI we’re working on a new dashboard app that fixes this problem, among (many) other issues. Here’s a short video of how the new graph widgets will look.

It’s very much still in initial development so don’t expect the UI to look the same in the release.

Ah, that looks great Sam! Nice to know that we’ll have that someday. :slight_smile:

Hm, Chris that would probably work, and I suppose we’ll try that now, we’ve just always avoided time-stamping a value because it looked tricky and possibly inaccurate (we really should learn more about the Timer class we use). Thanks for the help!

What version of SmartDashboard are you using? The 2017.3.1 update changed the behavior from being purely data based (no time) to plotting against time in seconds.

Since default network tables transmission rate is 10hz, unless you changed something (or sent data slower), the old behavior would be 10hz, unless the data wasn’t changed.

I talked to you about this at champs and voiced my concerns with the current one. We are really looking forward to being able to use this after seeing the demo. Multiple values on a single plot will be very useful.

Apparently a version before 2017.3.1. The other nice improvement I saw on the list was the ability to reset a line plot. We used to always change the plots to a text box and then back to plot and typically lost the value amongst all the other stuff on the dashboard in the process.