Go to Post FIRST kids never cease to amaze me. - Wayne C. [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
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 19-02-2015, 12:14
nickmcski nickmcski is offline
Registered User
AKA: Nicholas McCurry
FRC #1482 (Grandin Ghosts)
Team Role: Alumni
 
Join Date: Nov 2012
Rookie Year: 2012
Location: Canada
Posts: 111
nickmcski has a spectacular aura aboutnickmcski has a spectacular aura aboutnickmcski has a spectacular aura about
Smile Re: Custom SmartDashboard Widget Repository

If your just looking for a wide range of tools you may want to try SmartDashboard 2.0 (SFX) it comes with a lot more standard options and has a lot of styling potential. I still know a lot of people who like how basic the original SmartDashboard but I would recommend giving SFX a try.
  #2   Spotlight this post!  
Unread 19-02-2015, 12:22
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Custom SmartDashboard Widget Repository

Quote:
Originally Posted by nickmcski View Post
If your just looking for a wide range of tools you may want to try SmartDashboard 2.0 (SFX) it comes with a lot more standard options and has a lot of styling potential. I still know a lot of people who like how basic the original SmartDashboard but I would recommend giving SFX a try.
We will probably move to that eventually, but I usually equate "new" with "potentially buggy". I value stability - the kind built upon the backs of those early adopters who have suffered through the trials and tribulations for me.

Regardless of when I make that switch, it still would be swell if we could build a bigger library of shared original SmartDashboard widgets in this thread.

I'm requesting a "standard" of posting a .jar file as a minimum contribution, along with any associated source code you might wish to share, for those intrepid Java-programming souls who might make use of it.

Thanks in advance to all who share, as well as those who have shared already!
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
  #3   Spotlight this post!  
Unread 19-02-2015, 17:59
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Custom SmartDashboard Widget Repository

Here's the other useful widget I wrote; it displays commands that have parameters, which you can set from the SmartDashboard. It requires code on the robot, which I have only written in Java, but it can be ported to C++ fairly easily.

This widget is useful for debugging commands, because you can put them on the SD and then play with parameters and make sure they react correctly.

The ParameterCommand.jar file contains the widget, while the src folder contains the source for both the widget and the robot code. The robot code includes an example (RotateToCommand.java) from our code which demonstrates the usage of the ParameterCommand.

When you want to use put the command on the SD, you simply have to call:
Code:
SmartDashboard.putData(yourParameterCommand);
If you use RobotBuilder, the "Button on SmartDashboard" checkbox also works as long as your command has a default constructor.
Attached Files
File Type: zip ParameterCommand.zip (71.4 KB, 11 views)
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists

Last edited by Ben Wolsieffer : 19-02-2015 at 18:00. Reason: forgot attachment
  #4   Spotlight this post!  
Unread 21-02-2015, 07:02
Brrch Brrch is offline
Registered User
AKA: Alon
FRC #2212 (Spikes)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2013
Location: Israel
Posts: 4
Brrch is an unknown quantity at this point
Re: Custom SmartDashboard Widget Repository

Quote:
Originally Posted by lopsided98 View Post
Here's the other useful widget I wrote; it displays commands that have parameters, which you can set from the SmartDashboard. It requires code on the robot, which I have only written in Java, but it can be ported to C++ fairly easily.

This widget is useful for debugging commands, because you can put them on the SD and then play with parameters and make sure they react correctly.

The ParameterCommand.jar file contains the widget, while the src folder contains the source for both the widget and the robot code. The robot code includes an example (RotateToCommand.java) from our code which demonstrates the usage of the ParameterCommand.

When you want to use put the command on the SD, you simply have to call:
Code:
SmartDashboard.putData(yourParameterCommand);
If you use RobotBuilder, the "Button on SmartDashboard" checkbox also works as long as your command has a default constructor.
When I tried to copy the classes to a Robot Project it said that the import edu.wpi.first.smartdashboard could not be resolved. Which library should I use?
  #5   Spotlight this post!  
Unread 21-02-2015, 11:50
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Custom SmartDashboard Widget Repository

Quote:
Originally Posted by Brrch View Post
When I tried to copy the classes to a Robot Project it said that the import edu.wpi.first.smartdashboard could not be resolved. Which library should I use?
Which classes? The only file that needs to in your robot project is ParameterCommand.java. The .java in the smartdashboard directory are the source for the SmartDashboard widget, which are only necessary if you want to modify the the code running in the SmartDashboard.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
  #6   Spotlight this post!  
Unread 05-04-2015, 19:00
M3rcuriel's Avatar
M3rcuriel M3rcuriel is offline
Mentor
AKA: Lee Mracek
FRC #0299 (Valkyrie Robotics)
Team Role: Mentor
 
Join Date: Jun 2014
Rookie Year: 2013
Location: Cupertino
Posts: 19
M3rcuriel is on a distinguished road
Re: Custom SmartDashboard Widget Repository

Quote:
Originally Posted by lopsided98
When I tried to copy the classes to a Robot Project it said that the import edu.wpi.first.smartdashboard could not be resolved. Which library should I use?
Where did you get the libraries for SmartDashboard source - I can't seem to find them.
  #7   Spotlight this post!  
Unread 05-04-2015, 19:32
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Custom SmartDashboard Widget Repository

Quote:
Originally Posted by M3rcuriel View Post
Where did you get the libraries for SmartDashboard source - I can't seem to find them.
Are you looking for the source for the SmartDashboard or the library jar file?

The source for the SmartDashboard is here: https://bitbucket.org/byteit101/oldsmartdashboard/src, but if you only want to write extensions for it, you need to add "HOME/wpilib/tools/SmartDashboard.jar" as a library in Eclipse/Netbeans.
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
  #8   Spotlight this post!  
Unread 05-04-2015, 19:33
M3rcuriel's Avatar
M3rcuriel M3rcuriel is offline
Mentor
AKA: Lee Mracek
FRC #0299 (Valkyrie Robotics)
Team Role: Mentor
 
Join Date: Jun 2014
Rookie Year: 2013
Location: Cupertino
Posts: 19
M3rcuriel is on a distinguished road
Re: Custom SmartDashboard Widget Repository

Quote:
Originally Posted by lopsided98 View Post
Are you looking for the source for the SmartDashboard or the library jar file?

The source for the SmartDashboard is here: https://bitbucket.org/byteit101/oldsmartdashboard/src, but if you only want to write extensions for it, you need to add "HOME/wpilib/tools/SmartDashboard.jar" as a library in Eclipse/Netbeans.
Okay that makes sense. How do you deploy the widgets, then? None of this seems to be documented.
  #9   Spotlight this post!  
Unread 05-04-2015, 19:37
Ben Wolsieffer Ben Wolsieffer is offline
Dartmouth 2020
AKA: lopsided98
FRC #2084 (Robots by the C)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Manchester, MA (Hanover, NH)
Posts: 520
Ben Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud ofBen Wolsieffer has much to be proud of
Re: Custom SmartDashboard Widget Repository

Quote:
Originally Posted by M3rcuriel View Post
Okay that makes sense. How do you deploy the widgets, then? None of this seems to be documented.
You have to put the .jar file containing the extension in "HOME/SmartDashboard/extensions".
__________________



2016 North Shore District - Semifinalists and Excellence in Engineering Award
2015 Northeastern University District - Semifinalists and Creativity Award
2014 Granite State District - Semifinalists and Innovation in Control Award
2012 Boston Regional - Finalists
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 01:41.

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