Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Award Winning SmartDashboard extension (http://www.chiefdelphi.com/forums/showthread.php?t=105052)

virtuald 25-03-2012 23:10

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! :)

The included images were created by Linda Donoghue.

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

carrillo694 01-04-2012 00:59

Re: Award Winning SmartDashboard extension
 
Nice! How resource-intensive is this widget? Did it cause any noticeable lag on your Driver Station during operation?

virtuald 01-04-2012 01:01

Re: Award Winning SmartDashboard extension
 
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.

JB987 01-04-2012 15:37

Re: Award Winning SmartDashboard extension
 
Exactly what sensors are you using to register presence of the ball at each location?

virtuald 01-04-2012 15:57

Re: Award Winning SmartDashboard extension
 
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.

MikeE 04-04-2012 16:18

Re: Award Winning SmartDashboard extension
 
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?

virtuald 04-04-2012 16:24

Re: Award Winning SmartDashboard extension
 
It was maybe two hours of work, pretty trivial to do. :)

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

Ken Streeter 04-04-2012 16:37

Re: Award Winning SmartDashboard extension
 
Quote:

Originally Posted by virtuald (Post 1152360)
On our robot during the competition, we were using 2 IR sensors (Sharp GP2D120) and a limit switch. ...

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.

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!


All times are GMT -5. The time now is 00:49.

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