Go to Post Being good people is as important as being the winners of some robotics competition! - ExTexan [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
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 09-05-2011, 20:34
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
paper: Killer Bees BuzzXVI Code and Auto Scripting

Thread created automatically to discuss a document in CD-Media.

Killer Bees BuzzXVI Code and Auto Scripting by apalrd
Reply With Quote
  #2   Spotlight this post!  
Unread 09-05-2011, 20:36
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

Just like last year, I am releasing my code to the ChiefDelphi community. This code was written entirely by me, with lots of guidance and help from my mentors (especially Jim and Eric). I also included a stand-alone version of my Beescript autonomous interpreter which we used during this past season to speed up autonomous updates.

Questions?
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #3   Spotlight this post!  
Unread 16-05-2011, 08:46
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

There were a couple vi's missing, something from an openG directory that was used to detect change in some data. Looked at it this weekend, very nice documentation and breakdown of work. But I don't have the specifics here at work.

We are loosing our two senior programmers this year, and only have 2 freshman interested. Have you ever thought of doing a training class?

What was the "root cause" for the bias needed? Seems mechanically, not required.

Also, can you publish your sensor parts list used, we had issues with the KOP encoders not being very robust.

Again, Great Year, very impressive!
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #4   Spotlight this post!  
Unread 16-05-2011, 09:28
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

1. The OpenG Boolean Trigger and OpenG Data Changed VI's are required to run. They're not very complex VI's but I had them and they were nice to use.

2. The bias in drive_straight is actually not used. We initially used that to control drift, and it worked fine as long as we didn't change anything, but the slightest mechanical differences required us to re-tune it. We now use the gyro compensator to dynamically handle drift which works amazingly.

3. We used the 250-count AM encoders (just like the kit encoders) on modified SuperShifters, a previous KOP 150 deg/sec gyro (although the practice robot used the current KOP gyro 250deg/sec and it worked very well), a 270-degree pot on the wrist, and a 10-turn pot on the elevator.

4. There are a lot of legacy VI's in the autonomous system. As we added new features we wanted to keep our old routines working, so we have commands like DRIVE_GYRO_TURN_OLD, DRIVE_GYRO_TURN_BASIC, and DRIVE_GYRO_TURN to handle turns differently. The old one is the original turn code, BASIC is a modified version which is more accurate, and the plain one does a slower (only moving one side of the drivetrain) but much more accurate turn. Only the plain turn updates the heading target of the drive_straight. Likewise, DRIVE_STRAIGHT_BASIC just drives, while DRIVE_STRAIGHT does realtime drift compensation with the gyro.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #5   Spotlight this post!  
Unread 03-01-2012, 12:28
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

We tackled using the gyro and a proportional loop to do the turns and tuned the gain, here is our proof.

http://youtu.be/3Q_lrvty8Ig

We spent yesterday going through the drive straight gyro code, and could use a little help with the Arc Drive.vi

What does the 5.43 constant represent? Is that the max speed in FPS of the bot in that gear?

It looks to us, that the throttle is divided by that “range” which gives a fraction of top speed, or essentially the motor controller output, 0 to 1. The “wheel” comes from the gyro error, times a gain kp, then is scaled by the “fraction of top speed” and added to throttle. Throttle is speed calculated by the position error to target * gain…

We are still a little foggy on what the range of values of “wheel” should be and how they relate to the 5.43 number.

Thanks for the help, good luck this season, look forward to seeing the Bees again in 2012.

Scott.
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #6   Spotlight this post!  
Unread 03-01-2012, 15:59
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

Are you looking through the drive-straight autonomous functions?
Those are quite complicated.

The 5.43 is the max speed in low gear

The algorithm work like this:
-We calculate a proportional term to drive straight
-We apply it using the arc drive code which proportionally applies the term based on the output forward speed (which is in ft/sec)
-If the speed drops below a threshold, we latch the p term because the algorithm is unreliable while we slow down or speed up.

Clarification on wheel:
-We've been looking at various HMI's, and in many arcade and halo drives, a throttle stick and steering wheel are traditionally used, leading us to refer to inputs to an arcade drive as 'throttle' and 'wheel', even in the absence of an actual steering wheel
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack

Last edited by apalrd : 03-01-2012 at 16:02. Reason: what wheel is
Reply With Quote
  #7   Spotlight this post!  
Unread 04-01-2012, 08:02
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

Quote:
Originally Posted by apalrd View Post
Are you looking through the drive-straight autonomous functions?
Those are quite complicated.
Yes, but that is where the Magic happens! (and it's a lot less complicated when you know it works.)

Quote:
Originally Posted by apalrd View Post
-We apply it using the arc drive code which proportionally applies the term based on the output forward speed (which is in ft/sec)
Ok, I get it now, you have to tune the gyro gain to work a full throttle. Then you scale gyro P(id) contribution to the output bases on the speed you are actually moving at.

Quote:
Originally Posted by apalrd View Post
Clarification on wheel:
-We've been looking at various HMI's, and in many arcade and halo drives, a throttle stick and steering wheel are traditionally used, leading us to refer to inputs to an arcade drive as 'throttle' and 'wheel', even in the absence of an actual steering wheel
Makes perfect sense, I tripped up thinking wheel was a robot wheel, not a steering wheel. I have only seen tank drives, makes sense as an arcade drive.

What was the value of the gyro p gain you used? When we tuned the gain for the rotation we ended up at .006 but our algorithm we added minimum constant, which was the threshold minimum motor value that it took to move the bot. I saw how you solved this just by telling the bot to go farther than it needed to, with the addition of the "overshoot" distance. Nice simple solution.

In our turn to heading, we are exiting the loop when the error has settled for a second, at less than .5 degrees. This allowed the bot to overshoot and correct, at the end of the video you can see it jiggle a bit, that is it correcting for the overshoot.
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #8   Spotlight this post!  
Unread 04-01-2012, 12:38
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

When we do turns, we settle after ~200ms of sitting inside of the +-3deg exit threshold, and reset the counter if we are outside of that area.

We correct for the +-3deg of error in the drive straight, which brings us back to virtually no error (less than a degree, usually less than half a degree).

We had to do this to be as fast as possible, because of time constraints in the routine (we finish about 14.5s after auto starts).

The turn we do drives only the outer wheel for accuracy. We also have a fast turn which turns with both wheels and stops when it gets to or past the target (just killing the output power instead of overshooting), we use the fast turn as the first turn in the 2-tube routine, which turns from the backup to get the second tube. We are much more tolerant of error in this turn, and will compensate for this error later in the second turn and drive.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #9   Spotlight this post!  
Unread 06-02-2012, 15:27
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

Howdy, me again...

Hope your season is going well, I am trying to get someone to look at beescript, on our team. I saw how easily you were able to adjust auto programs last year at Kettering, and really see the value of this approach.

In looking at the beescript standalone file, in the createcommands.vi there is a reference to call.vi, and there is no call.vi in the code. Is that a required vi or can that just be deleted like any other commands in the "scrptlib" folder that is not needed.

Thanks for all the help thus far, we are making some huge strides this year, working with your code from last year, understanding it, and writing our own for our use. I am a PLC programmer by trade, and LV is powerful, but requires learning.

We have been able to ultilize the encoders for distance, drive straight forward with the gyro, (although backwards has some issues) and use encoder p loop to hold on the ramp when the drivers release the sticks. Considering we never had an encoder on the bot until this year, I'd say we have made some huge strides in programming. Look forward to seeing the bees at Kettering, and what you have cooked up this year.
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote
  #10   Spotlight this post!  
Unread 06-02-2012, 15:33
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

oh, yeah, call.vi....

call.vi is an artifact from an earlier version of the code. Feel free to delete the command for it.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote
  #11   Spotlight this post!  
Unread 12-02-2012, 11:31
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 520
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: paper: Killer Bees BuzzXVI Code and Auto Scripting

As we were looking through the code you gave for auton scripting and the code you used for competetion, we saw that in the scripting example the CreatCommands.vi was outside the Auto_Initalization.vi , but in the code you used at competetion you had the CreatCommand.vi inside the Auto_Initialization.vi. Why is this? Any help would be appreciated, Thanks
__________________
The sooner we get behind schedule, the more time we have to catch up.

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 10:32.

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