View Single Post
  #2   Spotlight this post!  
Unread 04-03-2016, 11:05
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: Play-Record Macro

1). The solution to the first problem is definitely moving the macro code to a separate Thread. The only other way is for the creators of the macro to add a wait function that both freezes the Thread and notifies the macro code of the delay.

2). The inaccuracy problem is due to how the macro works at it's core. The macro records the motor speed values and how long they were maintained. The problem is that at different battery voltages, motor speed values change. For example, on a fully charged battery, a motor running at 0.8 might go at "10 speed". On a slightly less charged battery, a motor running at 0.8 will go at "7 speed". This causes the Robot to drive different distances and turn to different angles based off it's current battery charge. This variance will be present even between two different fully charged batteries, just to a lesser extent. This problem isn't really solvable on your end; your options are wait for a change in the macro, write your own code that tracks more trust-able data (i.e. encoder and gyroscope values instead of motor speeds), or just write a normal autonomous that doesn't work off of recording teleop actions.
__________________


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

Last edited by Oromus : 04-03-2016 at 11:24.