View Single Post
  #3   Spotlight this post!  
Unread 12-06-2014, 22:43
virtuald's Avatar
virtuald virtuald is online now
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,086
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: Challenge problem: 'ladder of abstraction' iterative design in FRC

Quote:
Originally Posted by Colby Skeggs View Post
On the technical side of implementing these kinds of features, I'm not quite sure how it would be done well.
I agree, that's why I called it a challenge problem.

I think the tricky thing is really being able to maintain state about the robots behavior in a way that the simulator/emulator could do proper reasoning/adjustment of.

Another way I could imagine tackling the problem (particularly for autonomous mode state machines) is controlling the robot via abstractions that have state built into them, so that the simulator/stepper has ultimate control over the state machine. Then the variables are exposed via some mechanism, and that's how you do variance over time.

I implemented a very early version of something like that for our code this year, where the actual logic for switching states is done by an underlying object, and the user code didn't have (much) to do with changing that.

One more thought that I'm definitely going to implement by next year for PyFRC is just showing a basic 2D field that shows where the robot is. It's an easy enough thing to do, and though not totally accurate, would get one close enough for good testing.
__________________
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