virtuald
25-03-2012, 23:10
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
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