Go to Post Hundreds of teams. Thousands of students. Countless memories. Infinite fun. You'll love it, I promise you that. - smurfgirl [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-01-2016, 12:48
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 68
gerthworm has a spectacular aura aboutgerthworm has a spectacular aura about
Processor load and other data

Hi All!

Our team this year is working on a more-advanced, on-RIO logging system to record robot data during matches. We want to use this to help validate some of our controls algorithms, benchmark drivetrain performance, and help diagnose any issues which show up during a match.

As part of this, we'd like to be able to log things like the roboRIO's processor load, available RAM, network load, etc. Anything we can get our hands on, really. Anyone have any experience getting this information in Java at runtime?

It doesn't look like WPILIB supports it directly, and the handful of Java examples I've found on line seem to cause runtime errors as soon as the code is loaded on (I presume this is because the functionality isn't implemented in the real-time system). I would suspect this info is somewhere since it shows up in the driver station, I'm just not sure how to get at it.

Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 17-01-2016, 13:17
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Processor load and other data

Much of what you desire can already be obtained in the Driver Station..

Above the log console in the driver station, click the gear and hit "View Log File". These log files should have everything you asked for. If not, than you'll need to post the code you're working with to record data and the console output.
__________________
FRC Team 1684 - Head Programmer (2013-2016)
FRC Team 5460 - Programming Mentor (2015-2016)

FIRST in Michigan - Technical Crew (2015-continuing)
Reply With Quote
  #3   Spotlight this post!  
Unread 17-01-2016, 13:42
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 68
gerthworm has a spectacular aura aboutgerthworm has a spectacular aura about
Re: Processor load and other data

Understood, pulling driver station logs is always an option.

As to what had been attempted, I had tried to work with java.lang.management.ManagementFactory and java.lang.management.OperatingSystemMXBean per the suggestions on this stack overflow post. The actual permutations of code I tried got lost between commits (bad programmer!). No worries if this isn't enough, just curious if anyone else has had success yanking these numbers in software on the RIO itself.
Reply With Quote
  #4   Spotlight this post!  
Unread 17-01-2016, 14:05
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Processor load and other data

This has been on my todo list to figure out for a while. Since the FRCNetworkComms task knows the values because it sends to the driver station, you could file a feature request to have those accessible to the robot program also. However, if FIRST did decide to implement that, it wouldn't be until next season
Reply With Quote
  #5   Spotlight this post!  
Unread 17-01-2016, 15:38
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 68
gerthworm has a spectacular aura aboutgerthworm has a spectacular aura about
Re: Processor load and other data

Thanks for the info! Pending what we find this season, I may enter that request.

FYI, the background on this is we have had some very hard-to-diagnoses failures in the past where we lose control of the robot briefly. What I'm hoping to do is to track fine-grained data every run about voltages, current draw, drive commands, network status, processor load, etc. - all in the hope that if/when we have a failure, we'll have enough info to know where to go start debugging (even on a non-reproducible problem).

Additionally, some of the algorithms suggested this year would need to be tuned and evaluated on real hardware. Not sure if we'll be successful in implementing and using them, but I figured the logging infrastructure would be needed anyway to properly evaluate these algorithms performance.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:01.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi