Award Winning SmartDashboard extension

The RobotWidget is an award-winning extension to the 2012 SmartDashboard (Team 2423 won the Innovation in Controls award at the Boston Regional, and this was cited as a key component of that). It is based in part off of the SendablePIDController and Image widgets that come with the SmartDashboard.

On our robot, this widget shows a picture of the robot, and when the ball sensors on our robot senses a ball it tells the widget to display a picture of a basketball on the appropriate place in our robot.

How it actually works is quite simple:

  • The widget always displays robot.png
  • If the robot sets a variable on a network table to True, then it displays the image associated with that variable on top of the background image. The images are all png format, and are mostly transparent so that multiple images can be displayed simulataneously.

Currently, this widget is very specific to our robot, but I plan to generalize it at some point and submit it to the SmartDashboard project to be included with the default SmartDashboard.

Feel free to use and modify this as you wish subject to the terms in LICENSE, just be sure to give our team credit! :slight_smile:

The included images were created by Linda Donoghue.

Download source code here: http://www.virtualroadside.com/FRC/#RobotWidget

Nice! How resource-intensive is this widget? Did it cause any noticeable lag on your Driver Station during operation?

If you examine the code, the widget doesn’t really do all that much, it just waits for input and then draws the appropriate images – which is a decidely low resource operation on a modern computer. I would imagine resource usage is similar to other widgets on the SmartDashboard.

Exactly what sensors are you using to register presence of the ball at each location?

On our robot during the competition, we were using 2 IR sensors (Sharp GP2D120) and a limit switch. However, we found that the limit switch kept getting stuck on the balls, so we bought some more of the IR sensors that we will be using on the robot in offseason competitions.

One thing to beware of with the IR sensors is that the case is conductive and connected to ground, so we didn’t pass inspection initially until we isolated its case from the chassis. But other than that, we’ve had really good results with them.

Cool idea - we thought about it, but you did the actual work!
Do you have a demonstration of the dashboard in action - perhaps a video?

It was maybe two hours of work, pretty trivial to do. :slight_smile:

However, I do not currently have a video, perhaps we’ll take one before Beantown Blitz.

We have also started using the Sharp IR sensors (GP2D120XJ00F) and have found them to work well for ball detection. Thanks for sharing the tidbit regarding electrical isolation – we’ll be getting them inspected on the robot for the first time tomorrow at the North Carolina Regional and didn’t realize we’d need to isolate them from ground. Your sharing of that info will definitely help us out tomorrow. Thanks!