Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   2220's Play/Record Macro for Autonomous (http://www.chiefdelphi.com/forums/showthread.php?t=136151)

2220Dennis 27-03-2015 14:32

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)

Fields 27-03-2015 14:48

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?

Ozuru 27-03-2015 14:54

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?

Poseidon5817 27-03-2015 14:58

Re: 2220's Play/Record Macro for Autonomous
 
We attempted this also, but could not get playback to work.

2220Dennis 27-03-2015 16:04

Re: 2220's Play/Record Macro for Autonomous
 
Quote:

Originally Posted by Fields (Post 1462763)
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.

2220Dennis 27-03-2015 16:06

Re: 2220's Play/Record Macro for Autonomous
 
Quote:

Originally Posted by Ozuru (Post 1462767)
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.

techplex 28-03-2015 16:27

Re: 2220's Play/Record Macro for Autonomous
 
What does the BTStorage class do? Is it important? It isn't in the repository.

Ichlieberoboter 28-03-2015 17:34

Re: 2220's Play/Record Macro for Autonomous
 
Is there a version in labview?

slickvic2252 28-03-2015 19:11

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

Jacob Bendicksen 28-03-2015 19:21

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.

orangemoore 28-03-2015 19:54

Re: 2220's Play/Record Macro for Autonomous
 
Quote:

Originally Posted by slickvic2252 (Post 1463074)
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?

2220Dennis 28-03-2015 20:10

Re: 2220's Play/Record Macro for Autonomous
 
Quote:

Originally Posted by Techwiz (Post 1463023)
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.

2220Dennis 28-03-2015 20:26

Re: 2220's Play/Record Macro for Autonomous
 
Quote:

Originally Posted by Jacob Bendicksen (Post 1463077)
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.

Sperkowsky 28-03-2015 20:32

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.

AlexC 28-03-2015 21:24

Re: 2220's Play/Record Macro for Autonomous
 
Quote:

Originally Posted by orangemoore (Post 1463082)
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.


All times are GMT -5. The time now is 00:47.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi