Go to Post Blame it on the programmer. - colt527 [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 22-01-2016, 14:08
Taylor's Avatar
Taylor Taylor is offline
Professor of Thinkology, ThD
AKA: @taylorstem
FRC #3487 (EarthQuakers)
Team Role: Teacher
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Indianapolis, IN, USA 46227
Posts: 4,581
Taylor has a reputation beyond reputeTaylor has a reputation beyond reputeTaylor has a reputation beyond reputeTaylor has a reputation beyond reputeTaylor has a reputation beyond reputeTaylor has a reputation beyond reputeTaylor has a reputation beyond reputeTaylor has a reputation beyond reputeTaylor has a reputation beyond reputeTaylor has a reputation beyond reputeTaylor has a reputation beyond repute
Re: Question on Autonomous Mode

We've put physical switches on our chassis that we have set before auto mode began to let the robot select the proper autonomous mode
__________________
Hi!
  #2   Spotlight this post!  
Unread 22-01-2016, 14:18
nightpool's Avatar
nightpool nightpool is offline
robotRectifier
AKA: Evan
no team (formerly of CORE 2062)
Team Role: Alumni
 
Join Date: Oct 2011
Rookie Year: 2011
Location: Waukesha, WI
Posts: 81
nightpool is on a distinguished road
Re: Question on Autonomous Mode

Quote:
Originally Posted by Taylor View Post
We've put physical switches on our chassis that we have set before auto mode began to let the robot select the proper autonomous mode
If you don't mind, was there any particular reason you chose to use physical switches over using SmartDashboard or the FRC dashboard? Just a matter of comfort, or something else? Seems like a lot less flexible option to me, but I'm wondering if there's something else.
__________________
Proud alum of CORE 2062.
www.core2062.com
  #3   Spotlight this post!  
Unread 22-01-2016, 18:29
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,049
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: Question on Autonomous Mode

OP, I think you're using RobotPy [you had posted on the python forum earlier]?

RobotPy's wpilib utilities has some really useful autonomous tooling to allow you to select multiple modes via SmartDashboard (each .py file in the autonomous directory is automatically detected and added to the options), and also a really easy to use state machine helper for quick and easy autonomous mode creation.

Code:
from robotpy_ext.autonomous import StatefulAutonomous
        
class DriveForward(StatefulAutonomous):

    MODE_NAME = 'Drive Forward'

    def initialize(self):
        pass

    @timed_state(duration=0.5, next_state='drive_forward', first=True)
    def drive_wait(self):
        pass

    @timed_state(duration=5)
    def drive_forward(self):
        self.drive.move(0, 1, 0)
Check it out at http://robotpy-wpilib-utilities.read...utonomous.html

We also have a sample program that uses both the stateful autonomous helper and the automatic autonomous chooser.
__________________
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
  #4   Spotlight this post!  
Unread 24-01-2016, 15:55
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 329
fovea1959 will become famous soon enough
Re: Question on Autonomous Mode

Quote:
Originally Posted by nightpool View Post
If you don't mind, was there any particular reason you chose to use physical switches over using SmartDashboard or the FRC dashboard? Just a matter of comfort, or something else? Seems like a lot less flexible option to me, but I'm wondering if there's something else.
We've gone both ways, they each have pros and cons.

Doing switches on the robot is reliable, but you can occasionally forget to set the switches before leaving the field (when you would still have a chance to fix it on the DS).

Doing it on the DS is fine, but you either have to make the settings stick across power downs, or else have enough time to set the autonomous in the interval between when your DS makes contact with the robot and when the match starts. If you are having trouble getting the DS talking to the bot (happens...), you might not have enough time.

DS with persistence seems to be best middle ground; you can set it while in queue, and fix it at the last second if needed.
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 17:19.

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