Go to Post If duct tape isn't the answer, you're not asking the right question. - Morgoth [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
  #16   Spotlight this post!  
Unread 28-03-2015, 21:35
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,063
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: 2220's Play/Record Macro for Autonomous

Cool stuff, glad to hear a python team did it first..

In 2003, the first year that FIRST had autonomous modes, I was a senior in high school and I implemented this exact same type of thing that year in PBASIC. Only had 22k of flash memory to write to though... but it worked like a champ!
__________________
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
  #17   Spotlight this post!  
Unread 12-04-2015, 04:26
auxchar's Avatar
auxchar auxchar is offline
Spaghetti Code Mentor
AKA: Austin Fuller
FRC #4009
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Esko
Posts: 4
auxchar is an unknown quantity at this point
Re: 2220's Play/Record Macro for Autonomous

Hey, take this to worlds with ya, ok?
  #18   Spotlight this post!  
Unread 21-04-2015, 18:43
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

Just an update for those still interested in this- after some debugging, the entire setup should be much more stable now, hope that the changes will help.
  #19   Spotlight this post!  
Unread 21-04-2015, 22:08
Cyborg Mustang's Avatar
Cyborg Mustang Cyborg Mustang is offline
Registered User
FRC #2647
 
Join Date: Oct 2013
Location: Phoeniz, AZ
Posts: 18
Cyborg Mustang is an unknown quantity at this point
Thank you and Team DNA for this awesomeness. Do you mind if i work on making a universal version of this?
__________________
Cyborg Mustangs Team 2647
North High School
Phoenix, AZ
  #20   Spotlight this post!  
Unread 11-05-2015, 08:14
jtrv's Avatar
jtrv jtrv is offline
github.com/jhtervay
AKA: Justin
FRC #2791 (Shaker Robotics)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Latham, NY
Posts: 148
jtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to alljtrv is a name known to all
Re: 2220's Play/Record Macro for Autonomous

One of the most clever things I've seen yet. Nice work.
__________________
2791 (2012-2017)
  #21   Spotlight this post!  
Unread 05-02-2016, 22:46
doctorflems doctorflems is offline
Registered User
FRC #4506 (PioNerds)
Team Role: Programmer
 
Join Date: May 2015
Rookie Year: 2015
Location: MN
Posts: 10
doctorflems is an unknown quantity at this point
Question Re: 2220's Play/Record Macro for Autonomous

Quote:
Originally Posted by AlexC View Post
Could you take some screenshots of the block diagrams and describe how you did this?
In most cases, I am terrible at writing an autonomous sequence, but it is in this case that I believe I can get a firm grasp of the concept.
  #22   Spotlight this post!  
Unread 04-03-2016, 09:54
jojoguy10's Avatar
jojoguy10 jojoguy10 is offline
Programming/Controls Mentor
AKA: Joe Kelly
FRC #0997 (Spartan Robotics) and FRC #2990 (Hotwire Robotics)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2010
Location: Corvallis, OR
Posts: 294
jojoguy10 has a brilliant futurejojoguy10 has a brilliant futurejojoguy10 has a brilliant futurejojoguy10 has a brilliant futurejojoguy10 has a brilliant futurejojoguy10 has a brilliant futurejojoguy10 has a brilliant futurejojoguy10 has a brilliant futurejojoguy10 has a brilliant futurejojoguy10 has a brilliant futurejojoguy10 has a brilliant future
Re: 2220's Play/Record Macro for Autonomous

Quote:
Originally Posted by doctorflems View Post
Could you take some screenshots of the block diagrams and describe how you did this?
In most cases, I am terrible at writing an autonomous sequence, but it is in this case that I believe I can get a firm grasp of the concept.
I'm also interested in this program as well. I requested access to view the Drive folder.
__________________

2013 and 2014 - Student (FRC#2990), Programmer (LabVIEW)
2015 and 2016 - Mentor (FRC#2990), Programming (LabVIEW)
2017-Current - Mentor (FRC#997), Controls/Programming (Java)
2015-Current - A/V Volunteer at Oregon events
  #23   Spotlight this post!  
Unread 04-03-2016, 10:00
Jaci's Avatar
Jaci Jaci is offline
Registered User
AKA: Jaci R Brunning
FRC #5333 (Can't C# | OpenRIO)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 257
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: 2220's Play/Record Macro for Autonomous

I wrote something like this a while ago, and I've got a little bit of advice.

During a competition, any periodic functions aren't exactly constant. Their timing may change, especially on a field, as it waits for data from the Driver Station. To remedy this, use something like a 'heartbeat' thread, that triggers on a constant rate, all the time (for us, we use 50hz). This means you don't get the next data point at an inconsistent rate, which causes jerking in driving and/or any other mechanisms.

Other than that, it looks good . Good luck in Autonomous!
__________________
Jacinta R

Curtin FRC (5333+5663) : Mentor
5333 : Former [Captain | Programmer | Driver], Now Mentor
OpenRIO : Owner

Website | Twitter | Github
jaci.brunning@gmail.com
  #24   Spotlight this post!  
Unread 04-03-2016, 10:09
acastagna acastagna is offline
Registered User
FRC #1493
 
Join Date: Jan 2012
Location: Albany High School
Posts: 36
acastagna is an unknown quantity at this point
Re: 2220's Play/Record Macro for Autonomous

Jaci - Did you just use a timer in your thread to pace the reads and writes, or some other triggering mechanism? Thanks!
  #25   Spotlight this post!  
Unread 04-03-2016, 10:11
Jaci's Avatar
Jaci Jaci is offline
Registered User
AKA: Jaci R Brunning
FRC #5333 (Can't C# | OpenRIO)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 257
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: 2220's Play/Record Macro for Autonomous

Quote:
Originally Posted by acastagna View Post
Jaci - Did you just use a timer in your thread to pace the reads and writes, or some other triggering mechanism? Thanks!
We use a heartbeat it times the 'error' in time between the last trigger and the conclusion of the heartbeat. (i.e. if your code takes 25ms and your heartbeat is 100ms, it will wait 75ms). We're using Thread.sleep since the Java library is still using Thread.sleep instead of an actual hardware timer

EDIT: Whoops, i misunderstood. We do reads and writes as we go along. Since the RIO non-volatile storage is flash, we've tested that just reading from a BufferedReader is fast enough to not cause hickups
__________________
Jacinta R

Curtin FRC (5333+5663) : Mentor
5333 : Former [Captain | Programmer | Driver], Now Mentor
OpenRIO : Owner

Website | Twitter | Github
jaci.brunning@gmail.com
  #26   Spotlight this post!  
Unread 04-03-2016, 10:34
acastagna acastagna is offline
Registered User
FRC #1493
 
Join Date: Jan 2012
Location: Albany High School
Posts: 36
acastagna is an unknown quantity at this point
Re: 2220's Play/Record Macro for Autonomous

Thank you!
  #27   Spotlight this post!  
Unread 04-03-2016, 10:46
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: 2220's Play/Record Macro for Autonomous

We did this last year, but wound up not using it due to inconsistency of the motor values due to battery charge. Since a motor running at a speed of, lets say, 0.8 runs at different speeds depending on the charge of the battery. This causes the autonomous, depending on the battery charge, to look right, but wind up not driving/turning the correct distance. How did you guys tackle this problem? Do you incorporate encoders and/or a gyroscope?
__________________


2016 Roles: Manipulator, Strategy Co-Lead, Programmer
2016 Orlando Regional: Quarterfinalist (Captain w/ 1557, 5557 and 4352)
2016 Rocket City Regional: Quarterfinalist (w/ 283 and 34), Regional Chairman's Award Winner
2016 Championship: N/A (had fun and was inspired, that's what counts)
-------------
2015 Role: Programmer
2015 GSCR: Quarterfinalist (w/ 4189 and 4026), Regional Chairman's Award Winner
2015 Orlando Regional: Semifinalist (w/ 456 and 86), Imagery Award Winner
2015 Championship: Pit Safety Award Winner
  #28   Spotlight this post!  
Unread 04-03-2016, 10:50
Jaci's Avatar
Jaci Jaci is offline
Registered User
AKA: Jaci R Brunning
FRC #5333 (Can't C# | OpenRIO)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 257
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: 2220's Play/Record Macro for Autonomous

Quote:
Originally Posted by Oromus View Post
We did this last year, but wound up not using it due to inconsistency of the motor values due to battery charge. Since a motor running at a speed of, lets say, 0.8 runs at different speeds depending on the charge of the battery. This causes the autonomous, depending on the battery charge, to look right, but wind up not driving/turning the correct distance. How did you guys tackle this problem? Do you incorporate encoders and/or a gyroscope?
For my team, we're using a different tactic of Motion Profiling to overcome this. It's not really play/record, but it's certainly worth it, especially with the inconsistency this year of where you'll end up after crossing a defense. Just my $0.02
__________________
Jacinta R

Curtin FRC (5333+5663) : Mentor
5333 : Former [Captain | Programmer | Driver], Now Mentor
OpenRIO : Owner

Website | Twitter | Github
jaci.brunning@gmail.com
  #29   Spotlight this post!  
Unread 04-03-2016, 10:53
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: 2220's Play/Record Macro for Autonomous

Quote:
Originally Posted by Jaci View Post
For my team, we're using a different tactic of Motion Profiling to overcome this. It's not really play/record, but it's certainly worth it, especially with the inconsistency this year of where you'll end up after crossing a defense. Just my $0.02
Oh yeah, we're something similar this year (sensor data PIDs with an autonomous mapping/design program). I'm just curious to see if the play/record macro did something to fix the inaccuracy of using motor speed values, since it would wind up being quite annoying to deal with for the teams using it.
__________________


2016 Roles: Manipulator, Strategy Co-Lead, Programmer
2016 Orlando Regional: Quarterfinalist (Captain w/ 1557, 5557 and 4352)
2016 Rocket City Regional: Quarterfinalist (w/ 283 and 34), Regional Chairman's Award Winner
2016 Championship: N/A (had fun and was inspired, that's what counts)
-------------
2015 Role: Programmer
2015 GSCR: Quarterfinalist (w/ 4189 and 4026), Regional Chairman's Award Winner
2015 Orlando Regional: Semifinalist (w/ 456 and 86), Imagery Award Winner
2015 Championship: Pit Safety Award Winner
  #30   Spotlight this post!  
Unread 04-03-2016, 11:10
Jaci's Avatar
Jaci Jaci is offline
Registered User
AKA: Jaci R Brunning
FRC #5333 (Can't C# | OpenRIO)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 257
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: 2220's Play/Record Macro for Autonomous

Quote:
Originally Posted by Oromus View Post
Oh yeah, we're something similar this year (sensor data PIDs with an autonomous mapping/design program). I'm just curious to see if the play/record macro did something to fix the inaccuracy of using motor speed values, since it would wind up being quite annoying to deal with for the teams using it.
I don't think it's viable. If the play/record is recording actual motor output, that would depend on the voltage of the battery at time of recording. If it's recording desired output, PID wouldn't be viable as the actual output is updated every tick, meaning the PID has no effect. Unless you've got a master control loop running at ~100-150Hz, it wouldn't do much, and even then, you'd see a lot of jitter.
__________________
Jacinta R

Curtin FRC (5333+5663) : Mentor
5333 : Former [Captain | Programmer | Driver], Now Mentor
OpenRIO : Owner

Website | Twitter | Github
jaci.brunning@gmail.com
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 16:36.

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