Go to Post This is what happens when a couple of whackos get an idea at 2 am. - Rich Kressly [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-21-2016, 04:58 PM
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 744
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Is Smart Dashboard really this limited?

After several years of using LabVIEW and building cool custom Dashboards, we've switched to Java and I'm totally frustrated by the basic nature of the Smart Dashbaord....

I'm using a USB cam so it doesn't seem like I can use the more advanced one.

Some questions:

If I'm using iterative control mode, is there really no way I can setup a drop-down multiple choice for selecting autonomous features using the Dashboard?

I see the Command based version, but even this won't give me basic parameter selection (like mode selections within a standard Auto program.

Can I interface a Java control program with a LabVIEW dashboard?

I don't even seem to be able to get a basic slider I can trick into selecting delay times... Is there nothing better than this dashboard?

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #2   Spotlight this post!  
Unread 03-21-2016, 05:09 PM
EmileH's Avatar
EmileH EmileH is online now
it's not a water game, ok?
AKA: Emile Hamwey
FRC #1058 (PVC Pirates) & FF (NE Way You Want It)
Team Role: Programmer
 
Join Date: Dec 2014
Rookie Year: 2011
Location: New England
Posts: 531
EmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant futureEmileH has a brilliant future
Re: Is Smart Dashboard really this limited?

I believe for choosing auto modes you can use a SendableChooser - more info in the WPI screensteps on that. However yes the Java SmartDashboard is fairly basic but you can customize items by going into edit mode (it's in one of the dropdown menus at the top), and right clicking on different items in the Dashboard to change their appearance or parameters.

EDIT: Reread your post, and am not sure about SendableChoosers for Iterative control. I've always used Command Based myself to kind of neaten it up.
__________________
2016-present: High School Student, FRC 1058 PVC Pirates
2016: RiverRage 20 Champions, Battle of the Bay 3 Champions

2013-2015: Middle School Student, FRC 3467 Windham Windup
Reply With Quote
  #3   Spotlight this post!  
Unread 03-21-2016, 05:24 PM
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: Is Smart Dashboard really this limited?

You can use an autonomous selector (SendableChooser) even if you are not using the Command system.

You can place any type of data in the SendableChooser, not just Commands, because SendableChooser.addObject() takes any type of Object as its second parameter. You could use numbers or strings instead and then use these to decide which autonomous to run.

The SmartDashboard does lack a slider control by default, but it fairly easy to write an extension to add this capability.
Here is the one I wrote (both files are necessary):
Slider.java
BindableSlider.java

I also attached a compiled JAR of this extension (inside a zip because CD doesn't allow me to upload a JAR).
Attached Files
File Type: zip SliderExtension.zip (42.0 KB, 2 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
Reply With Quote
  #4   Spotlight this post!  
Unread 03-22-2016, 07:54 AM
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 744
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: Is Smart Dashboard really this limited?

Quote:
Originally Posted by lopsided98 View Post
You can use an autonomous selector (SendableChooser) even if you are not using the Command system.

You can place any type of data in the SendableChooser, not just Commands, because SendableChooser.addObject() takes any type of Object as its second parameter. You could use numbers or strings instead and then use these to decide which autonomous to run.
Hi.

Thanks for the information about the send-able chooser. I had wondered what the limitations were for the attached data. So, how does the program get access to this attached data? The normal chooser operation seems to dictate what gets run in Auto, but I just want to get access to the "chosen" parameter. The Screen Steps docs just jump over how the chooser actually works, and just shows how to use it for automatic command selection.

So, lets say I just want to chose between 6 different enum values. Assuming I can figure out how to load up the chooser, how, where and when do I access the chosen value?

I'm an experienced C++ programmer, but I'm new to Java. It's fun, but I'm just not loving having to guess how to use these classes in the FRC code.

I'll definitely try out your slider code.

Phil
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #5   Spotlight this post!  
Unread 03-22-2016, 08:02 AM
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 542
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Is Smart Dashboard really this limited?

chooser.getSelected()
__________________
FRC Team 1684 - Head Programmer (2013-2016)
FRC Team 5460 - Programming Mentor (2015-2016)

FIRST in Michigan - Technical Crew (2015-continuing)
Reply With Quote
  #6   Spotlight this post!  
Unread 03-22-2016, 08:32 AM
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 985
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Is Smart Dashboard really this limited?

Phil, if you create a new Iterative or Sample robot project you should see an example of using the SendableChooser with non-command date right there in the template.
Reply With Quote
  #7   Spotlight this post!  
Unread 03-22-2016, 08:32 AM
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 744
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: Is Smart Dashboard really this limited?

Quote:
Originally Posted by Arhowk View Post
chooser.getSelected()
That simple huh?

Thanks.
Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #8   Spotlight this post!  
Unread 03-22-2016, 08:33 AM
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 744
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: Is Smart Dashboard really this limited?

BTW, is there any possibility that the USB cam viewer can be used with SmartDashboard 2.0 ?

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #9   Spotlight this post!  
Unread 03-22-2016, 09:07 AM
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 744
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: Is Smart Dashboard really this limited?

Quote:
Originally Posted by RufflesRidge View Post
Phil, if you create a new Iterative or Sample robot project you should see an example of using the SendableChooser with non-command date right there in the template.
OK, that's really weird. I created a new iterative project, and there it was.

How did I not see that???

Oh, well. That's the beauty of Chief Delphi....

Thanks.

Phil.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #10   Spotlight this post!  
Unread 03-22-2016, 12:25 PM
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,033
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Is Smart Dashboard really this limited?

The answer to the thread title is very simple: Yes, it is very limited. AFAIK, SmartDashboard 1.0 hasn't really received any new features since its introduction, and it's annoying to extend due to limited documentation.

You might check out SFX (SmartDashboard 2.0). It's a lot shinier, and has a lot more features (including sliders and such). However, still limited documentation for extending it.

Both of them can be found in your ~/wpilib/tools directory (SmartDashboard.jar or sfx.jar) on a computer with the eclipse tools installed.

Self-promotion: Of course I'm biased, but we write our dashboards using HTML+Javascript. It's a lot more flexible, and easier to extend as you're only limited by your ability to create shiny javascript. Only downside is that you can't connect to the built-in wpilib camera stuff, but that code is fairly terrible anyways. We use mjpg-streamer instead (search the forums).
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
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
Reply With Quote
  #11   Spotlight this post!  
Unread 03-28-2016, 03:19 PM
ARaine ARaine is offline
Registered User
FRC #2834
 
Join Date: Feb 2016
Location: Michigan
Posts: 5
ARaine is an unknown quantity at this point
Re: Is Smart Dashboard really this limited?

If you want you can actually just use a labview dashboard with a java program. I had some success with this by using the labview networktables VIs to get values sent to the smart dashboard. I prefer this over the SmartDashboard because, like you said, it is limited, and labview offers far more control options for the dashboard.
Reply With Quote
  #12   Spotlight this post!  
Unread 03-28-2016, 04:36 PM
Pault's Avatar
Pault Pault is offline
Registered User
FRC #0246 (Overclocked)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston
Posts: 618
Pault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond repute
Re: Is Smart Dashboard really this limited?

Quote:
Originally Posted by PhilBot View Post
I'm an experienced C++ programmer, but I'm new to Java. It's fun, but I'm just not loving having to guess how to use these classes in the FRC code.
Check out the javadocs. They aren't quite as easy to use as screenstepslive, and they occasionally are missing some information, but they are extremely comprehensive in describing all of the classes in WPILIB
Reply With Quote
  #13   Spotlight this post!  
Unread 03-28-2016, 06:16 PM
jkoritzinsky jkoritzinsky is offline
Registered User
AKA: Jeremy Koritzinsky
FRC #4786 (Nicolet F.E.A.R.)
Team Role: Mentor
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Glendale, Wisconsin
Posts: 78
jkoritzinsky will become famous soon enoughjkoritzinsky will become famous soon enough
Re: Is Smart Dashboard really this limited?

You might be interested in DotNetDash. It's still a little feature-limited (especially since I just pushed the code publically today), but it has support for a Sendable Chooser, Digital Inputs, a graphing utility for tuning PID loops (best feature so far). It should have support for USB cameras, but I haven't had a chance to test that (don't have access to a roboRIO at the moment and competition isn't the right place to test this). You can find the repository at https://github.com/robotdotnet/DotNetDash
__________________
Nicolet F.E.A.R. (Team 4786) - Aerial Assist - Programming Manager
Nicolet F.E.A.R. (Team 4786) - 2015+ - Junior Mentor

SuperScouter for FRC Developer
Reply With Quote
  #14   Spotlight this post!  
Unread 03-29-2016, 02:55 AM
quillford quillford is offline
Registered User
FRC #5924
 
Join Date: Nov 2015
Rookie Year: 2015
Location: San Francisco
Posts: 22
quillford is an unknown quantity at this point
Re: Is Smart Dashboard really this limited?

Quote:
Originally Posted by virtuald View Post
The answer to the thread title is very simple: Yes, it is very limited. AFAIK, SmartDashboard 1.0 hasn't really received any new features since its introduction, and it's annoying to extend due to limited documentation.

You might check out SFX (SmartDashboard 2.0). It's a lot shinier, and has a lot more features (including sliders and such). However, still limited documentation for extending it.

Both of them can be found in your ~/wpilib/tools directory (SmartDashboard.jar or sfx.jar) on a computer with the eclipse tools installed.

Self-promotion: Of course I'm biased, but we write our dashboards using HTML+Javascript. It's a lot more flexible, and easier to extend as you're only limited by your ability to create shiny javascript. Only downside is that you can't connect to the built-in wpilib camera stuff, but that code is fairly terrible anyways. We use mjpg-streamer instead (search the forums).
This can be used regardless of programming language since it just seems to use network tables, right?

Last edited by quillford : 03-29-2016 at 04:19 PM.
Reply With Quote
Reply


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 07:24 AM.

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