Go to Post we were sick and tired of compromises: "speed or torque", "traction or maneuverability", etc.; bump that, we want it all. all we had to compromise was simplicity. - RogerR [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 20-04-2013, 21:57
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 431
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
SmartDashboard Sendable Chooser not showing up on dasboard

I've been making some changes to our dashboard in preparation for championships. I've added a few SendableChoosers to the dashboard which drive some case statements in our commands.

I only have a few days of testing on this code, but it has been working reliably until today. On numerous occasions I would start the driver station, dashboard, and robot (order didn't seem to make a difference) and some times one of the lists of radio buttons (sendable chooser) would not show up. The default option would be observed by the code (there is an associated getNumber call in a later method).

I'm not sure what it takes to get the chooser back. Either cRIO, robot, or dashboard reboot - or some combination thereof. I haven't had enough time to troubleshoot this completely.

I'm concerned this will happen on the field and it would likely have undesirable results.

The code in question is below.
I've changed some of the names of variables, but other than that it's functionally equivalent. Sorry if it doesn't make much sense after the variable name changes.

Code:
private static double disc1Delay = 3.5,
                      disc2Delay = 0.7,
                      disc3Delay = 0.7;
private static final String TIME_1_DELAY_KEY = "Delay before shot 1",
                            TIME_2_DELAY_KEY = "Delay before shot 2",
                            TIME_3_DELAY_KEY = "Delay before shot 3";

public static final int A_1 = 1,
                      A_2 = 2,
                      A_3 = 3,
                      A_4 = 4,
                      B_1 = 1,
                      B_2 = 2,
                      B_3 = 3;

    public void robotInit() {
        // Initialize all subsystems
        CommandBase.init();
        
        //Start the compressor
        compressor = new Compressor(RobotMap.compressorPressureSwitch, RobotMap.compressorPower);
        compressor.start();
                
        SmartDashboard.putBoolean("SomeBoolean", someBoolean);

        //This set of radio buttons always seems to show up fine on the dashboard
    	aChooser = new SendableChooser();
    	aChooser.addDefault("a1", new Integer(A_1));
    	aChooser.addDefault("a2", new Integer(A_2));
    	aChooser.addDefault("a3", new Integer(A_3));
    	afterShotChooser.addDefault("a4", new Integer(A_4));
    	SmartDashboard.putData("A Chooser", aChooser);
    	
    	SmartDashboard.putNumber(TIME_1_DELAY_KEY, disc1Delay);
    	SmartDashboard.putNumber(TIME_2_DELAY_KEY, disc2Delay);
    	SmartDashboard.putNumber(TIME_3_DELAY_KEY, disc3Delay);
    	
        //Methods to display some parameters of one of the Drivetrain Commands
    	SmartDashboard.putNumber("fast speed", DriveDrivetrainTurn_Simple.getFastSpeed());
    	SmartDashboard.putNumber("slow speed", DriveDrivetrainTurn_Simple.getSlowSpeed());
    	
    	//this chooser doesn't show sometimes.
        //I've tried running it later (here) and earlier in the robotInit() method.
        //I've also tried calling the putData method multiple times. Same results
    	bChooser = new SendableChooser();
    	bChooser.addDefault("b1", new Integer(B_1));
    	bChooser.addObject("b2", new Integer(B_2));
    	bChooser.addObject("b3", new Integer(B_3));
    	SmartDashboard.putData("B Chooser", bChooser);
    }

Has anyone seen sendableChoosers not show up on the dashboard?
It's strange since it only happens with this one chooser.

I've tried saving the layout when the chooser was there, then reloading the saved layout (to get the chooser to show back up), but that didn't fix the problem.

I can open the dashboard now on my computer (no robot online). And none of the choosers show up. All other elements appear to be there though.
What's so special about the SendableChooser?

What is the mechanism that actually causes the chooser to get displayed?
__________________
http://team2168.org
Reply With Quote
  #2   Spotlight this post!  
Unread 29-04-2013, 21:02
thephpdev's Avatar
thephpdev thephpdev is offline
Registered User
AKA: Josh Larson
FRC #2502 (Talon Robotics)
Team Role: Programmer
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Eden Prairie, MN
Posts: 16
thephpdev is an unknown quantity at this point
Re: SmartDashboard Sendable Chooser not showing up on dasboard

I have noticed this problem as well. I didn't know how to fix it, but one time on accident I pressed "File->New" and it wiped the dashboard of anything that was being unused. Once I did that, the SendableChoosers became visible with their radio buttons. I can't explain why, or a better way to do it. Although it's a pretty good starting point
Reply With Quote
  #3   Spotlight this post!  
Unread 30-04-2013, 15:01
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 431
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: SmartDashboard Sendable Chooser not showing up on dasboard

Thanks for the reply.

As far as I know, we never saw this occur at champs, which was my original concern. The only potentially related change I made in the code was that the chooser keys (thier string names) were changed. I'm not sure if this had any direct affect though since I haven't identified a way to reliably reporoduce the problem.

There may be a lingering bug out there with the Choosers... Hopefully it doesn't rear its head in the off season.
__________________
http://team2168.org
Reply With Quote
  #4   Spotlight this post!  
Unread 30-04-2013, 16:06
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,817
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: SmartDashboard Sendable Chooser not showing up on dasboard

I saw two teams with this issue (once each) on the field at CMP. I don't know what they did to fix it though.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #5   Spotlight this post!  
Unread 30-04-2013, 16:42
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 431
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: SmartDashboard Sendable Chooser not showing up on dasboard

Quote:
Originally Posted by Mark McLeod View Post
I saw two teams with this issue (once each) on the field at CMP. I don't know what they did to fix it though.
Do you happen to know which teams?
__________________
http://team2168.org
Reply With Quote
  #6   Spotlight this post!  
Unread 11-05-2013, 17:19
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: SmartDashboard Sendable Chooser not showing up on dasboard

I'm having the same problem as OP. Anyone have any solutions?

[I'm using the version on http://first.wpi.edu/FRC/java/netbea...le/updates.xml , does the Release update work?]
__________________
All opinions are my own.
Reply With Quote
  #7   Spotlight this post!  
Unread 15-06-2013, 22:01
apples000's Avatar
apples000 apples000 is offline
Registered User
no team
 
Join Date: Mar 2012
Rookie Year: 2012
Location: United States
Posts: 222
apples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant futureapples000 has a brilliant future
Re: SmartDashboard Sendable Chooser not showing up on dasboard

We had the same thing at champs. It cost us two matches because the FTA started before we were able to tell our problems. For us, the problem was random, but happened the most when we were on the competition field. Later in the day, we found some first person who was aware of the issue. We had a non programmer talk to him, and he said that some sort of connection or table ID is retained, and that it can be fixed by a reformat.
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 11:37.

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