Go to Post ...if two good things are good by themselves let's do them both together to make a better thing. So who's up for an apple pie burrito? - Katy [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 07-03-2015, 20:59
Defensoft3585 Defensoft3585 is offline
Programming Captain
AKA: The Defenestrator
FRC #3585 (Rogue Robots of 4H)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Claremont, NH 03743
Posts: 12
Defensoft3585 is on a distinguished road
Text-based Autonomous POC

I've just returned from the West Springfield, MA competition. While there, I noticed that only about 50% of the teams actually had autonomous mode. I came up with an idea - what if autonomous could be simpler? And therefore, this was born:
https://github.com/JavaMatrix/TextBasedAutonomous
It's currently untested, but it's a proof of concept. This code makes autonomous easy. For example, our autonomous mode this year could be represented as:
chassis drive 1.0 0.0 2.0
"chassis": the subsystem to be activated.
"drive": the method to be called.
"1.0": the amount of power to give the wheels.
"0.0": the amount to turn.
"2.0": the number of seconds to run.
The signature of the method is:
Chassis.drive(power, twist)
and the command is run for 2 seconds. It's quite technical, and not quite polished. As of now you can only use primitive types and Strings for arguments, but it would be easy to add more types.
Thoughts on this system? Does it seem feasible?
Reply With Quote
  #2   Spotlight this post!  
Unread 07-03-2015, 22:40
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: Text-based Autonomous POC

if you do command based, yes Its nice to have something like this or a command group. What type of solution could you do for an iterative robot? or even a simple robot? Also most teams that use java/c++ and have the command based robot usually have an autonomous.
Reply With Quote
  #3   Spotlight this post!  
Unread 07-03-2015, 23:05
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 234
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: Text-based Autonomous POC

Seems like it would be easier to just explain to teams that you want them to have a driving forward autonomous (the most basic for simplicity) and just add
Code:
RobotDrive.whateverDrive(value,value);
to their autonomous section. If you were to give an autonomous program to another team hopefully you are only counting on them to be able to drive forward. Anything beyond that and you're probably asking too much.
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
  #4   Spotlight this post!  
Unread 07-03-2015, 23:21
Ozuru's Avatar
Ozuru Ozuru is offline
It's always the programmer's fault.
no team
 
Join Date: May 2013
Rookie Year: 2010
Location: Earth
Posts: 268
Ozuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to behold
Re: Text-based Autonomous POC

Usually almost all teams that don't have autonomous use iterative. If you could port this to iterative (or even simple) you could make this effective. It seems kind of pointless in command based, though; oversimplifying something already simplified. It's a great idea you have but it doesn't seem too feasible, in my opinion.
Reply With Quote
  #5   Spotlight this post!  
Unread 08-03-2015, 00:23
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: Text-based Autonomous POC

Quote:
Originally Posted by Ozuru View Post
Usually almost all teams that don't have autonomous use iterative.
my point exactly! but i think if we made it any simpler you would see every team with a 20 point auto
Reply With Quote
  #6   Spotlight this post!  
Unread 08-03-2015, 03:22
dellagd's Avatar
dellagd dellagd is offline
Look for me on the field!
AKA: Griffin D
FRC #2590 (Nemesis) #2607 (The Fighting Robovikings)
Team Role: Mentor
 
Join Date: Sep 2011
Rookie Year: 2011
Location: PA
Posts: 890
dellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond reputedellagd has a reputation beyond repute
Re: Text-based Autonomous POC

Quote:
Originally Posted by Fauge7 View Post
my point exactly! but i think if we made it any simpler you would see every team with a 20 point auto
Not to be a stick in the mud, but I think that might be a bit presumptuous.
__________________
Check out some cool personal projects in computers, electronics, and RC vehicles on my blog!

2016 MAR DCMP Engineering Excellence Award
2016 MAR Westtown Innovation in Control Award
2016 MAR Hatboro-Horsham Industrial Design Award
2015 Upper Darby District Winners - Thanks 225 and 4460!
2015 Upper Darby District Industrial Design Award
2015 Hatboro-Horsham District Winners - Thanks 2590 and 5407!
2014 Virginia Regional Winners - Thanks so much 384 and 1610, I will never forget that experience!
2014 Virginia Quality Award
2014 MAR Bridgewater-Raritan Innovation in Control Award
2014 MAR Hatboro-Horsham Gracious Professionalism Award
2013 MAR Bridgewater-Raritan Innovation in Control Award
2012 MAR Lenape Quality Award
Reply With Quote
  #7   Spotlight this post!  
Unread 08-03-2015, 10:08
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,574
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Text-based Autonomous POC

It sounds like a great idea - essentially writing an autonomous scripting language. It would certainly make it easier to reprogram autonomous in the queue.

Also, consider supporting commands which are not time-based, but sensor based, e.g. "drive until both curb feelers hit the scoring platform" or "raise load until the top limit switch is engaged". It would probably have to be up to the teams to code the sensor monitoring and declare that the command is finished through their isFinished() method. In a 15 second autonomous period, you don't want to wait for a timeout once you know the result is complete.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #8   Spotlight this post!  
Unread 08-03-2015, 10:38
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,047
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: Text-based Autonomous POC

Quote:
Originally Posted by Fauge7 View Post
my point exactly! but i think if we made it any simpler you would see every team with a 20 point auto
I suspect you haven't done 20-point auto reliably, otherwise you wouldn't make such a statement.
__________________
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
Reply With Quote
  #10   Spotlight this post!  
Unread 08-03-2015, 11:57
Oromus's Avatar
Oromus Oromus is offline
Lead Programmer, Community Liason
AKA: Ryan
FRC #1902 (Exploding Bacon)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2013
Location: Florida
Posts: 82
Oromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to beholdOromus is a splendid one to behold
Re: Text-based Autonomous POC

We actually do something similar to this with Piggy Plotter, our autonomous designer. We use the scripting-like approach because it allows the ability to store autonomouses which can easily be selected/edited/added/removed on a flash drive that's on the roboRIO, as well as a general file that any robot regardless of language can read from.
Reply With Quote
  #11   Spotlight this post!  
Unread 08-03-2015, 15:22
Defensoft3585 Defensoft3585 is offline
Programming Captain
AKA: The Defenestrator
FRC #3585 (Rogue Robots of 4H)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Claremont, NH 03743
Posts: 12
Defensoft3585 is on a distinguished road
Re: Text-based Autonomous POC

Well, I wouldn't have guessed that there were that many. The concept could easily be ported to iterable. I may add support for sensors later on if anyone wants me to.
On the topic of "everyone with Command-Based Robot has autonomous," that's just not true. My team didn't for three years, and we've always used Command-based robot.
The other nice thing about this approach is that one need not be a programmer to use the text-based autonomous.
I don't care if anyone uses it, but I did have fun making it.
Reply With Quote
  #12   Spotlight this post!  
Unread 08-03-2015, 15:24
Defensoft3585 Defensoft3585 is offline
Programming Captain
AKA: The Defenestrator
FRC #3585 (Rogue Robots of 4H)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Claremont, NH 03743
Posts: 12
Defensoft3585 is on a distinguished road
Re: Text-based Autonomous POC

Ether, the thing I'm noticing with those it that none of them are simple text - most are more complicated than Java. The benefit of this system is that anyone who's played Minecraft and used commands or tinkered with a command line will be able to write autonomous.
Reply With Quote
  #13   Spotlight this post!  
Unread 08-03-2015, 15:34
MrRoboSteve MrRoboSteve is offline
Mentor
AKA: Steve Peterson
FRC #3081 (Kennedy RoboEagles)
Team Role: Mentor
 
Join Date: Mar 2012
Rookie Year: 2011
Location: Bloomington, MN
Posts: 574
MrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond reputeMrRoboSteve has a reputation beyond repute
Re: Text-based Autonomous POC

One thing to think about when designing a programming language like this (whether or not you think so, you're designing a programming language) is what use cases are in and what are out.

For example, will you allow:

variables

subroutines

logic (if/then/else)

looping

Another example -- what support will you have for detecting errors in the script and communicating them to the user?

Once you decide what is in and what is out, you should compare the effort to do what your scripting language does to the effort needed to write the same thing in the underlying language (Java, in this case). These examples will be good to use when you're trying to convince people that what you've developed makes things so much simpler that they'll learn your language in addition to Java.
__________________
2016-17 events: 10000 Lakes Regional, Northern Lights Regional, FTC Burnsville Qualifying Tournament

2011 - present · FRC 3081 Kennedy RoboEagles mentor
2013 - present · event volunteer at 10000 Lakes Regional, Northern Lights Regional, North Star Regional, Lake Superior Regional, Minnesota State Tournament, PNW District 4 Glacier Peak, MN FTC, CMP
http://twitter.com/MrRoboSteve · www.linkedin.com/in/speterson
Reply With Quote
  #14   Spotlight this post!  
Unread 08-03-2015, 17:34
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 234
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: Text-based Autonomous POC

Teams that don't have any autonomous are definitely not going to be able to program a 20 pt auto in 2 1/2 days. Even if they the entire field to themselves it would take much more time to get tuning right.

Also, no robot is alike, so if you wanted to have any interaction with the game elements the programming would have to be done by a programmer from that team (and if they could've they would've).
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
  #15   Spotlight this post!  
Unread 08-03-2015, 18:31
dradel's Avatar
dradel dradel is offline
Registered User
FRC #4557 (Full Metal Falcons)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: CT
Posts: 404
dradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to beholddradel is a splendid one to behold
I'd be happy if everyone was able to get a simple robot set! I know the points are low so many have said it isn't worth it, but keep in mind that with the system working like it does this year every point makes a difference in quals!
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 09:07.

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