Go to Post However, I think the laws of physics indicate that doing so is going to be very difficult at best. - EricH [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 03-08-2016, 08:11
azaclauson azaclauson is offline
Registered User
FRC #5593
 
Join Date: Jul 2016
Location: Tasmania
Posts: 17
azaclauson is an unknown quantity at this point
Set Driver Station Autonomous Mode Options & Commands

Is it possible to use the default FRC Driver Station and set the options in the autonomous mode drop down and/or the different commands on the "Commands" tab without programming (I don't need to change much and like the current UI)?

I found the .txt & .ini files in C:\Users\Public\Documents\FRC and was able to make changes to the "Checklist" tab by editing Checklist.txt. Is there a way to do the same thing for the two requests above? Perhaps by adding a new section to DashboardSettings.ini?
Reply With Quote
  #2   Spotlight this post!  
Unread 03-08-2016, 10:53
adciv adciv is offline
One Eyed Man
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2010
Location: Southern Maryland
Posts: 478
adciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to alladciv is a name known to all
Re: Set Driver Station Autonomous Mode Options & Commands

You can't change it by editing a configuration file. You can add new controls and read these on the robot. Alternatively you can read the existing controls on the robot. It depends on how complex you need them to be. What language do you use?
__________________
Quote:
Originally Posted by texarkana View Post
I would not want the task of devising a system that 50,000 very smart people try to outwit.
Reply With Quote
  #3   Spotlight this post!  
Unread 04-08-2016, 08:05
azaclauson azaclauson is offline
Registered User
FRC #5593
 
Join Date: Jul 2016
Location: Tasmania
Posts: 17
azaclauson is an unknown quantity at this point
Re: Set Driver Station Autonomous Mode Options & Commands

I get the feeling the C++ code shown below, which comes from the wpilib sample robot project, is close. The comments from the sample do state it's for the Java SmartDashboard but they don't explain how to set the chooser options for the LabView dashboard?

Code:
chooser = new SendableChooser();
chooser->AddDefault(autoNameDefault, (void*)&autoNameDefault);
chooser->AddObject(autoNameCustom, (void*)&autoNameCustom);
SmartDashboard::PutData("Auto Modes", chooser);
Reply With Quote
  #4   Spotlight this post!  
Unread 04-08-2016, 08:13
hardcopi hardcopi is offline
Registered User
AKA: Rich Lester
FRC #2959 (The Robotarians)
Team Role: Mentor
 
Join Date: Apr 2013
Rookie Year: 2013
Location: Coloma, MI
Posts: 271
hardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud ofhardcopi has much to be proud of
Re: Set Driver Station Autonomous Mode Options & Commands

Not sure about other programming languages, but the dashboard is just a program. We had ours set to read in a text file and run the code from that. This would let us change the functionality of the autonomous mode on the fly.
Reply With Quote
  #5   Spotlight this post!  
Unread 05-08-2016, 07:45
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Set Driver Station Autonomous Mode Options & Commands

If you are talking about having the default dashboard supply parameters to your auto, the basic tab has a handful of numeric sliders and strings that the driver can set and the robot's auto read. You can modify the name of the controls by setting other Network Table variables from your robot. You can persist these by going to the Variable tab and double clicking on the variables that you want to retain their value from match to match. If you want a constant default value for them, the robot can set the variables once, but then allow the driver to update them.

And as others have said, the dashboard is just a program. In fact the default dashboard is just an exe built from the LV template dashboard.

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 16-08-2016, 07:32
azaclauson azaclauson is offline
Registered User
FRC #5593
 
Join Date: Jul 2016
Location: Tasmania
Posts: 17
azaclauson is an unknown quantity at this point
Re: Set Driver Station Autonomous Mode Options & Commands

Thanks for the tips.

I can successfully set the string, button and slider fields on the Driver Station "Basic" tab, code snippet below. I haven't been able to find a way to set the options on the chooser on the "Drive" tab. Is that meant to be possible from the robot code or is it only possible by building a custom Driver Station app with LabView?

Code:
SendableChooser *chooser;
const std::string autoNameDefault = "Default";
const std::string autoNameCustom = "My Auto";

void RobotInit()
{
         // These work.
	SmartDashboard::PutString("DB/String 0", "33");
	SmartDashboard::PutBoolean("DB/Button 1", true);
	SmartDashboard::PutNumber("DB/Slider 0", 3.58);

        // This doesn't work.
	chooser = new SendableChooser();
	chooser->AddDefault(autoNameDefault, (void*)&autoNameDefault);
	chooser->AddObject(autoNameCustom, (void*)&autoNameCustom);
	//SmartDashboard::PutData("Auto Modes", chooser);
	SmartDashboard::PutData("DB/Auto Modes", chooser);
}
Reply With Quote
  #7   Spotlight this post!  
Unread 21-08-2016, 08:29
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Set Driver Station Autonomous Mode Options & Commands

The auto selector shows the value of the "Auto List" string array. It should be pretty easy to set it in some initializers so that valid autos show up in the list, always consistent with the code. If you would rather have it come from file, you can use a persisted NT variable.

And of course, you can also make a custom dashboard if you want another means of selecting.

Greg McKaskle
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 12:15.

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