OCCRA
Go to Post All I ask is that you stay with FIRST. It's a great place to be - Wayne Doenges [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-25-2012, 11:10 PM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #6367 (), FRC #7240 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,410
virtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond repute
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
__________________
Maintainer of RobotPy (Python for FRC) & WPILib Contributor
Creator of pyfrc (Robot Simulator + utilities for Python), pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript), and lots more...

Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #2   Spotlight this post!  
Unread 04-01-2012, 12:59 AM
carrillo694's Avatar
carrillo694 carrillo694 is offline
Alex Carrillo
FRC #0694 (Stuypulse)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2009
Location: New York, NY
Posts: 66
carrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the roughcarrillo694 is a jewel in the rough
Re: Award Winning SmartDashboard extension

Nice! How resource-intensive is this widget? Did it cause any noticeable lag on your Driver Station during operation?
  #3   Spotlight this post!  
Unread 04-01-2012, 01:01 AM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #6367 (), FRC #7240 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,410
virtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond repute
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.
__________________
Maintainer of RobotPy (Python for FRC) & WPILib Contributor
Creator of pyfrc (Robot Simulator + utilities for Python), pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript), and lots more...

Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #4   Spotlight this post!  
Unread 04-01-2012, 03:37 PM
JB987 JB987 is offline
Registered User
AKA: Joe Barry
FRC #0987 (HIGH ROLLERS)
Team Role: Coach
 
Join Date: May 2006
Rookie Year: 2002
Location: LAS VEGAS
Posts: 1,290
JB987 has a reputation beyond reputeJB987 has a reputation beyond reputeJB987 has a reputation beyond reputeJB987 has a reputation beyond reputeJB987 has a reputation beyond reputeJB987 has a reputation beyond reputeJB987 has a reputation beyond reputeJB987 has a reputation beyond reputeJB987 has a reputation beyond reputeJB987 has a reputation beyond reputeJB987 has a reputation beyond repute
Re: Award Winning SmartDashboard extension

Exactly what sensors are you using to register presence of the ball at each location?
  #5   Spotlight this post!  
Unread 04-01-2012, 03:57 PM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #6367 (), FRC #7240 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,410
virtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond repute
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.
__________________
Maintainer of RobotPy (Python for FRC) & WPILib Contributor
Creator of pyfrc (Robot Simulator + utilities for Python), pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript), and lots more...

Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #6   Spotlight this post!  
Unread 04-04-2012, 04:18 PM
MikeE's Avatar
MikeE MikeE is offline
Wrecking nice beaches since 1990
FRC #0568 (Volunteer)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: Alaska
Posts: 381
MikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond repute
Lightbulb 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?
  #7   Spotlight this post!  
Unread 04-04-2012, 04:24 PM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #6367 (), FRC #7240 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,410
virtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond reputevirtuald has a reputation beyond repute
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.
__________________
Maintainer of RobotPy (Python for FRC) & WPILib Contributor
Creator of pyfrc (Robot Simulator + utilities for Python), pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript), and lots more...

Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
  #8   Spotlight this post!  
Unread 04-04-2012, 04:37 PM
Ken Streeter's Avatar
Ken Streeter Ken Streeter is offline
Let the MAYHEM begin!
FRC #1519 (Mechanical Mayhem)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Team: Milford, NH; Me: Bedford, NH
Posts: 515
Ken Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond repute
Re: Award Winning SmartDashboard extension

Quote:
Originally Posted by virtuald View Post
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!
__________________
Ken Streeter - Team 1519 - Mechanical Mayhem (Milford Area Youth Homeschoolers Enriching Minds)
2015 NE District Winners with 195 & 2067, 125 & 1786, 230 & 4908, and 95 & 1307
2013 World Finalists & Archimedes Division Winners with 33 & 469
2013 & 2012 North Carolina Regional Winners with teams 435 & 4828 and 1311 & 2642
2011, 2010, 2006 Granite State Regional Winners with teams 175 & 176, 1073 & 1058, and 1276 & 133
Team 1519 Video Gallery - including Chairman's Video, and the infamous "Speed Racer!"
Closed Thread


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 08:51 PM.

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


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi