Go to Post I can attest that mentoring is probably the most important aspect of this program. - Tom Bottiglieri [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 26-01-2013, 11:34
xForceDee's Avatar
xForceDee xForceDee is offline
Registered User
AKA: Bart Kerfeld
FRC #4239 (Warpspeed)
Team Role: College Student
 
Join Date: Dec 2012
Rookie Year: 2012
Location: Minnesota
Posts: 58
xForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to behold
Autonomous Modes

Hello Everyone,
I could have swore I saw a post similar to this earlier, however, I cannot seem to find it. Anyway, a little refresher never hurt anyone. My question is: how do I implement a way to switch between a few different autonomous commands in command-based using a smartdashboard button. Ideally, I would like to be able to place our robot in three different spots and then have the driver push one of the three corresponding buttons on the smartdashboard and have it execute that specific command. Sorry if that was unclear. Thanks in advance for the help.
Reply With Quote
  #2   Spotlight this post!  
Unread 26-01-2013, 12:18
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: 543
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: Autonomous Modes

Quote:
Originally Posted by xForceDee View Post
Hello Everyone,
I could have swore I saw a post similar to this earlier, however, I cannot seem to find it. Anyway, a little refresher never hurt anyone. My question is: how do I implement a way to switch between a few different autonomous commands in command-based using a smartdashboard button. Ideally, I would like to be able to place our robot in three different spots and then have the driver push one of the three corresponding buttons on the smartdashboard and have it execute that specific command. Sorry if that was unclear. Thanks in advance for the help.
SmartDashboard.putData(yourCommand)
Reply With Quote
  #3   Spotlight this post!  
Unread 26-01-2013, 14:07
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Autonomous Modes

Take a look at this page in the documentation. It has an example of exactly what you're looking for:

http://wpilib.screenstepslive.com/s/...smartdashboard

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #4   Spotlight this post!  
Unread 26-01-2013, 14:26
xForceDee's Avatar
xForceDee xForceDee is offline
Registered User
AKA: Bart Kerfeld
FRC #4239 (Warpspeed)
Team Role: College Student
 
Join Date: Dec 2012
Rookie Year: 2012
Location: Minnesota
Posts: 58
xForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to behold
Re: Autonomous Modes

Thanks that is exactly what I need. However, the SmartDashboard is not updating whenever I do anything with java code. Any SmartDashboard.putData method seems to do nothing or SmartDashboard.(anything). Any thoughts as to why that is happening? Probably a simple fix but I am new to smart dashboard.
Reply With Quote
  #5   Spotlight this post!  
Unread 26-01-2013, 17:49
xForceDee's Avatar
xForceDee xForceDee is offline
Registered User
AKA: Bart Kerfeld
FRC #4239 (Warpspeed)
Team Role: College Student
 
Join Date: Dec 2012
Rookie Year: 2012
Location: Minnesota
Posts: 58
xForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to behold
Re: Autonomous Modes

Nevermind I fixed the problem
Reply With Quote
  #6   Spotlight this post!  
Unread 26-01-2013, 18:31
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Autonomous Modes

Are you seeing anything on the SmartDashboard? One thing to check is that the IP address is properly configured. You should make sure that your team number is in the preferences (File, then Preferences). That determines the IP address.

I just added this article that might help debug any SmartDashboard connection issues.

http://wpilib.screenstepslive.com/s/...ard-is-working

Good luck
Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #7   Spotlight this post!  
Unread 26-01-2013, 18:32
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Autonomous Modes

Quote:
Originally Posted by xForceDee View Post
Nevermind I fixed the problem
What was wrong?
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #8   Spotlight this post!  
Unread 26-01-2013, 20:54
xForceDee's Avatar
xForceDee xForceDee is offline
Registered User
AKA: Bart Kerfeld
FRC #4239 (Warpspeed)
Team Role: College Student
 
Join Date: Dec 2012
Rookie Year: 2012
Location: Minnesota
Posts: 58
xForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to beholdxForceDee is a splendid one to behold
Re: Autonomous Modes

Not 100% sure, I just made a brand new project and started from scratch. However, what may have happened is that in one of my subsystems, I may have forgotten to set the default command otherwise, I am fairly confident everything else was right. Thanks for all of your help today. I was able to get a lot done from a software aspect.
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:53.

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