Go to Post "The purpose of computation is insight, not numbers." - Tom Ore [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 Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 27-03-2015, 14:32
2220Dennis's Avatar
2220Dennis 2220Dennis is offline
Registered User
FRC #2220
 
Join Date: Mar 2015
Location: United States
Posts: 6
2220Dennis is an unknown quantity at this point
2220's Play/Record Macro for Autonomous

Hey all-

Team 2220 implemented this at the Central Illinois Regional when Team 4009 DNA told us about a super useful tool they wrote to code autonomous programs. They had their robot programmed in Python, so we spent the night transferring the code into Java and making it work with our setup.

https://github.com/DennisMelamed/FRC-Play-Record-Macro

Here's the gist: you press a button in teleop while you're practicing that records any motions you make into a .csv file stored on the roboRio. Then during autonomous, you have it read back that file, outputting the exact same values to your motors/other things. Easy to setup, create, and change autonomous programs quickly and without a lot of planning.

Thoughts/improvements? Big thanks to Team 4009 for the idea and their code in python (you can find the link to their code in the github readme)
  #2   Spotlight this post!  
Unread 27-03-2015, 14:48
Fields's Avatar
Fields Fields is offline
Classic
FRC #5637 (Titanium Polars)
Team Role: Mentor
 
Join Date: Dec 2014
Rookie Year: 2015
Location: Minneapolis
Posts: 99
Fields is a name known to allFields is a name known to allFields is a name known to allFields is a name known to allFields is a name known to allFields is a name known to all
Re: 2220's Play/Record Macro for Autonomous

Sounds cool.

Question:
Is it easy to go back and clean up some of the commands?

Say the driver didn't go forward enough on the first try and had to bump it a little. Is it easy to adjust for one smooth motion instead of two?
  #3   Spotlight this post!  
Unread 27-03-2015, 14:54
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: 2220's Play/Record Macro for Autonomous

This sounds pretty neat and would be very useful. Nice work. Have you used this in competition? How has it gone?
  #4   Spotlight this post!  
Unread 27-03-2015, 14:58
Poseidon5817's Avatar
Poseidon5817 Poseidon5817 is offline
"Cool" Squad
AKA: Mitchel Stokes
FRC #5817 (Uni-Rex)
Team Role: Mentor
 
Join Date: Aug 2013
Rookie Year: 2014
Location: Clovis, CA
Posts: 360
Poseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud of
Re: 2220's Play/Record Macro for Autonomous

We attempted this also, but could not get playback to work.
__________________
My FRC History:

2014 - Team 1671: Central Valley Regional Finalist and Chairman's Award Winner, Sacramento Regional Finalist, Archimedes Quarterfinalist
2015 - Team 1671: Central Valley Regional Semifinalist, Sacramento Regional Semifinalist and Chairman's Award Winner, Newton Winner, Einstein Winner
2016 - Team 5817: Central Valley Regional Finalist and Rookie All-Star, Orange County Regional Quarterfinalist and Rookie All-Star, Newton Division
2017 - Team 5817: Return of the bench grinder


  #5   Spotlight this post!  
Unread 27-03-2015, 16:04
2220Dennis's Avatar
2220Dennis 2220Dennis is offline
Registered User
FRC #2220
 
Join Date: Mar 2015
Location: United States
Posts: 6
2220Dennis is an unknown quantity at this point
Re: 2220's Play/Record Macro for Autonomous

Quote:
Originally Posted by Fields View Post
Sounds cool.

Question:
Is it easy to go back and clean up some of the commands?

Say the driver didn't go forward enough on the first try and had to bump it a little. Is it easy to adjust for one smooth motion instead of two?
That would require accessing the csv file in the roboRio, which you can do by sshing into the roborio to the file you want. It would be kind of difficult, as the motor values are recorded multiple times a second, so there would be a whole lot of entries to sort through. It is possible though, and you could adjust them individually one by one using something like excel. The easier option would be to just re-record the auto program.
  #6   Spotlight this post!  
Unread 27-03-2015, 16:06
2220Dennis's Avatar
2220Dennis 2220Dennis is offline
Registered User
FRC #2220
 
Join Date: Mar 2015
Location: United States
Posts: 6
2220Dennis is an unknown quantity at this point
Re: 2220's Play/Record Macro for Autonomous

Quote:
Originally Posted by Ozuru View Post
This sounds pretty neat and would be very useful. Nice work. Have you used this in competition? How has it gone?
We have used this in competition, it works much better than trying to get the timing of all the motions down in the code It ended up being one of the few times our auto program did what we wanted it to.
  #7   Spotlight this post!  
Unread 28-03-2015, 16:27
Techwiz's Avatar
Techwiz Techwiz is offline
Blake B
AKA: Blake
FRC #4909 (The Bionics)
Team Role: Mentor
 
Join Date: Mar 2009
Rookie Year: 2007
Location: Massachusetts
Posts: 85
Techwiz will become famous soon enough
Re: 2220's Play/Record Macro for Autonomous

What does the BTStorage class do? Is it important? It isn't in the repository.
__________________
Blake
Electrical, Programming and Design

Creator FRC Q&A 2017
Mass FRC Team 4909: The Bionics
Maine FRC Team 5122: The RobOTies (2014-2015)
Maine FRC Team 2648: Infinite Loop (2008-2011)

Last edited by Techwiz : 28-03-2015 at 16:27. Reason: typo
  #8   Spotlight this post!  
Unread 28-03-2015, 17:34
Ichlieberoboter's Avatar
Ichlieberoboter Ichlieberoboter is offline
Awards and Programming
AKA: Maria Valentini
FRC #2499 (Industrial Revolution)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2012
Location: Minnesota
Posts: 243
Ichlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud ofIchlieberoboter has much to be proud of
Re: 2220's Play/Record Macro for Autonomous

Is there a version in labview?
__________________
Team 2499-Industrial Revolution
2015 Lake Superior Regional Judges Award

Head Programmer Chairman's Award Presenter Awards Submitter Electrical Team Website Designer Strategy Team

  #9   Spotlight this post!  
Unread 28-03-2015, 19:11
slickvic2252's Avatar
slickvic2252 slickvic2252 is offline
mentor
AKA: Theren Vickery
FRC #2252 (Mavericks)
Team Role: Mentor
 
Join Date: Mar 2013
Rookie Year: 2010
Location: ohio
Posts: 42
slickvic2252 is an unknown quantity at this point
Re: 2220's Play/Record Macro for Autonomous

Yes 2252 made a 3 tote auto using the same system in labview and was successful 11 out of 14 times

Last edited by slickvic2252 : 28-03-2015 at 19:15.
  #10   Spotlight this post!  
Unread 28-03-2015, 19:21
Jacob Bendicksen's Avatar
Jacob Bendicksen Jacob Bendicksen is offline
Figuring out what's next
no team
Team Role: Alumni
 
Join Date: Apr 2013
Rookie Year: 2012
Location: United States
Posts: 762
Jacob Bendicksen has a reputation beyond reputeJacob Bendicksen has a reputation beyond reputeJacob Bendicksen has a reputation beyond reputeJacob Bendicksen has a reputation beyond reputeJacob Bendicksen has a reputation beyond reputeJacob Bendicksen has a reputation beyond reputeJacob Bendicksen has a reputation beyond reputeJacob Bendicksen has a reputation beyond reputeJacob Bendicksen has a reputation beyond reputeJacob Bendicksen has a reputation beyond reputeJacob Bendicksen has a reputation beyond repute
Re: 2220's Play/Record Macro for Autonomous

That's amazing!

Funny coincidence, too - the FLL team that I coached last year built pretty much exactly this, but it ran on an EV3 that was controlled via Bluetooth by another EV3. They ended up winning the Software Award at the Oregon State Championship, and you guys deserve to win something for this - it's a great piece of work.
__________________
jacobbendicksen.com | @jacobbendicksen

Yale University Class of 2020

Team 1540 | 2012-2016
7 Chairman's Awards, 6 other awards, 2015 Dean's List Finalist, 1 event win, 2 finalist finishes. Thanks for an amazing ride.
  #11   Spotlight this post!  
Unread 28-03-2015, 19:54
orangemoore orangemoore is online now
Registered User
AKA: Roger Moore
FRC #3135 (Robotic Colonels)
Team Role: College Student
 
Join Date: Dec 2012
Rookie Year: 2013
Location: Chicago
Posts: 2,307
orangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond reputeorangemoore has a reputation beyond repute
Re: 2220's Play/Record Macro for Autonomous

Quote:
Originally Posted by slickvic2252 View Post
Yes 2252 made a 3 tote auto using the same system in labview and was successful 11 out of 14 times
Is it possible to get that program?
__________________
Stronghold


Student 2013-2016
3135 -- Robotic Colonels
3507 -- Robotheosis (FTC)
  #12   Spotlight this post!  
Unread 28-03-2015, 20:10
2220Dennis's Avatar
2220Dennis 2220Dennis is offline
Registered User
FRC #2220
 
Join Date: Mar 2015
Location: United States
Posts: 6
2220Dennis is an unknown quantity at this point
Re: 2220's Play/Record Macro for Autonomous

Quote:
Originally Posted by Techwiz View Post
What does the BTStorage class do? Is it important? It isn't in the repository.
A BTStorage object has a bunch of motor constant values, port numbers, etc. We need access to it in our play/record classes because we are setting values to motors. If your code is set up differently, you won't need to pass it in.
  #13   Spotlight this post!  
Unread 28-03-2015, 20:26
2220Dennis's Avatar
2220Dennis 2220Dennis is offline
Registered User
FRC #2220
 
Join Date: Mar 2015
Location: United States
Posts: 6
2220Dennis is an unknown quantity at this point
Re: 2220's Play/Record Macro for Autonomous

Quote:
Originally Posted by Jacob Bendicksen View Post
That's amazing!

Funny coincidence, too - the FLL team that I coached last year built pretty much exactly this, but it ran on an EV3 that was controlled via Bluetooth by another EV3. They ended up winning the Software Award at the Oregon State Championship, and you guys deserve to win something for this - it's a great piece of work.
Thanks! Team 4009 DNA really deserves the credit, those guys wrote some really awesome code.
  #14   Spotlight this post!  
Unread 28-03-2015, 20:32
Sperkowsky's Avatar
Sperkowsky Sperkowsky is online now
Professional Multitasker
AKA: Samuel Perkowsky
FRC #2869 (Regal Eagles)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Bethpage, NY
Posts: 1,885
Sperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond reputeSperkowsky has a reputation beyond repute
Going to talk to our lead programmer about this. Being programming is our strong suit and next year we are losing him we need to explore different things before we lose him.
  #15   Spotlight this post!  
Unread 28-03-2015, 21:24
AlexC's Avatar
AlexC AlexC is offline
Registered User
AKA: Alex Crouch
FRC #5413 (Stellar)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Norwalk Ohio
Posts: 41
AlexC will become famous soon enough
Re: 2220's Play/Record Macro for Autonomous

Quote:
Originally Posted by orangemoore View Post
Is it possible to get that program?
Yes it is. Here is the latest version of our 2015 code along with our 3 tote auto file. The file type that windows assigns the auto recording seems to be rather random but just open the file with a excel or an equivalent program with tab seperation and it should open fine.

https://drive.google.com/file/d/0B-Q...ew?usp=sharing


Using recording and open office to edit the file we were able to develop our 3 tote auto in just a little over two hours.
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 10:02.

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