Go to Post Anyway, everyone, PLEASE READ THE MANUAL VERY CAREFULLY and ask around for the answers before going directly to FIRST. :) - AmyPrib [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
  #31   Spotlight this post!  
Unread 15-03-2011, 23:55
vinnie's Avatar
vinnie vinnie is offline
Registered User
FRC #3309 (Friarbots)
Team Role: College Student
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Los Angeles / Anaheim
Posts: 107
vinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond reputevinnie has a reputation beyond repute
Re: Autonomy: How Did You Guys Do It?

We use a combination of line tracking and ultrasonic rangefinding. Our robot follows the line at about 40% speed and then slows to 20% when it reaches around 60inches away from the wall. We have a lot of fun starting our robot totally crooked and watching it straighten itself out. Also we are using position control for the arm with the E4P encoder in the KOP
  #32   Spotlight this post!  
Unread 17-03-2011, 15:54
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Autonomy: How Did You Guys Do It?

Quote:
Originally Posted by Bethie42 View Post
On another note, has anyone here worked on an autonomous mode that scores more than one tube?
We have, done two tubes.

We turn the robot into a rolling PID Loop and just start executing commands to the PID controllers.

Arm Length and Tilt PID for HighMiddle
Ultrasonic & Gyro PID to 36" from the wall.
Ultrasonic & Camera PID to the peg tube 1
Reverse Claw
Arm Length & Tilt PID to home
Arm Length and Tilt PID for Front Pickup Run Claw Intake
Strafe Wheel Pods & Encoder PID infront of tube 2
Drive FWD until the claw detects a tube
Arm Length & Tilt PID to HighEndPeg
Ultrasonic & Gyro PID 36" from the wall
Ultrasonic & Camera PID to the Peg
Arm Length & Tilt PID to home
Reverse Claw

If you watch the video you can see each step: Video
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni

Last edited by Kingofl337 : 17-03-2011 at 17:16. Reason: added video
  #33   Spotlight this post!  
Unread 17-03-2011, 17:46
AlexD744 AlexD744 is offline
Registered User
FRC #0744 (744 Shark Attack)
Team Role: Alumni
 
Join Date: Jan 2009
Rookie Year: 2008
Location: Ft. Lauderdale, FL
Posts: 639
AlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond reputeAlexD744 has a reputation beyond repute
Re: Autonomy: How Did You Guys Do It?

Quote:
Originally Posted by torihoelscher View Post
We used Line Sensors, a sonar, a Gyro, and a backup way to make the auto move. Of course the Line Sensors gave us a hassle that we had to disable them and trust the sonar. it was great!!!
Are you using the gyro to keep you straight if the robot veers? I feel like that would be a common occurrence with the bumps in the field and a swerve drive.
__________________
www.sharkattack744.com
  #34   Spotlight this post!  
Unread 17-03-2011, 18:24
theprgramerdude theprgramerdude is offline
WPI Freshman
AKA: Alex
FRC #2503 (Warrior Robotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Brainerd, Minnesota
Posts: 347
theprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud of
Re: Autonomy: How Did You Guys Do It?

I used a for loop that drove forward and raised the arm at set speeds. Piece of cake.
__________________
Attending: MN Duluth Regional
  #35   Spotlight this post!  
Unread 17-03-2011, 19:27
Grim Tuesday's Avatar
Grim Tuesday Grim Tuesday is offline
Registered User
AKA: Simon Bohn
FRC #0639 (Code Red)
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Baltimore MD (JHU)
Posts: 1,607
Grim Tuesday has a reputation beyond reputeGrim Tuesday has a reputation beyond reputeGrim Tuesday has a reputation beyond reputeGrim Tuesday has a reputation beyond reputeGrim Tuesday has a reputation beyond reputeGrim Tuesday has a reputation beyond reputeGrim Tuesday has a reputation beyond reputeGrim Tuesday has a reputation beyond reputeGrim Tuesday has a reputation beyond reputeGrim Tuesday has a reputation beyond reputeGrim Tuesday has a reputation beyond repute
Re: Autonomy: How Did You Guys Do It?

We had the whole grand plan: Camera tracking, line following, PID loop. Unfortunately, none of our optical encoders could be coerced to work, despite constant replacements. And the camera made the C-RIO crash.

So now we have a "drive forward, lift up, open grabber" auto.
  #36   Spotlight this post!  
Unread 19-03-2011, 12:54
adf0221 adf0221 is offline
Registered User
FRC #1517 (Lumberjacks)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Bow NH
Posts: 24
adf0221 is an unknown quantity at this point
Re: Autonomy: How Did You Guys Do It?

are you using the newest camera? if so you need to use a non-crossover cable to connect it to the crio to prevent it from crashing..thats how we fixed our problem
  #37   Spotlight this post!  
Unread 19-03-2011, 13:40
PriyankP's Avatar
PriyankP PriyankP is offline
Registered User
FRC #0188 (Woburn Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Toronto, Canada
Posts: 87
PriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud of
Re: Autonomy: How Did You Guys Do It?

We had many combinations of sensors to make the auto work but in the end, we went with line sensors, ultra sonic and pot on the arm.

We start the auto by line tracking at about 8ft/s and stopping the base at some distance away from the wall. While it's line tracking, our arm moves to the high goal preset. Once it reaches the target distance, it starts to orient the tube & de-suck it out of the rollers. And the arm is slightly lowered too.


I tried using gyro but due to sensor inefficiency, the gyro reading would keep increasing even if the robot's not moving. I was told that it happens with all gyros and it shouldn't make a big difference in the 15-20 second autos...
__________________
Champs Schedule Highlighter App [CD Thread]

#### XYZ Regional Finalists
  #38   Spotlight this post!  
Unread 19-03-2011, 15:43
Michael DiRamio Michael DiRamio is offline
Registered User
FRC #1114 (Simbotics)
Team Role: Teacher
 
Join Date: Jan 2006
Rookie Year: 2006
Location: St. Catharines, Ontario, Canada
Posts: 39
Michael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond reputeMichael DiRamio has a reputation beyond repute
Re: Autonomy: How Did You Guys Do It?

Quote:
Originally Posted by PriyankP View Post
I tried using gyro but due to sensor inefficiency, the gyro reading would keep increasing even if the robot's not moving. I was told that it happens with all gyros and it shouldn't make a big difference in the 15-20 second autos...

It will always drift slightly. If you're noticing big changes it's likely that the robot was moving when the gyro initialized and biased. If that happens it will constantly think it is in motion afterwards. Make sure that it's completely still during boot up.
  #39   Spotlight this post!  
Unread 20-03-2011, 02:14
PriyankP's Avatar
PriyankP PriyankP is offline
Registered User
FRC #0188 (Woburn Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Toronto, Canada
Posts: 87
PriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud ofPriyankP has much to be proud of
Re: Autonomy: How Did You Guys Do It?

Quote:
Originally Posted by Michael DiRamio View Post
It will always drift slightly. If you're noticing big changes it's likely that the robot was moving when the gyro initialized and biased. If that happens it will constantly think it is in motion afterwards. Make sure that it's completely still during boot up.
I think the last time I got the gyro to work properly it was changing by a degree every 5 seconds... although it wouldn't have made a huge difference, I abandoned the idea of an auto with gyro to stay straight because it made our base oscillate when I programmed it to stay within +-1degree of the original heading. When I get back to the room again, I'm going to test it again with initialization in robotinit() function, but I doubt it will make a lot of difference because the the degree of change was measured in disabled mode.

On that note, how often do other programmers call for inputs from sensors during autonomous and teleop periods? I've always called it at the beginning of every iteration but not sure if calling it every other iteration would made a huge difference.
__________________
Champs Schedule Highlighter App [CD Thread]

#### XYZ Regional Finalists
  #40   Spotlight this post!  
Unread 20-03-2011, 08:59
davidalln's Avatar
davidalln davidalln is offline
World's Worst Coder
AKA: David Allen
FRC #2415 (The Westminster Wiredcats)
Team Role: Programmer
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Atlanta, GA
Posts: 108
davidalln is on a distinguished road
Send a message via AIM to davidalln
Re: Autonomy: How Did You Guys Do It?

Quote:
Originally Posted by PriyankP View Post
On that note, how often do other programmers call for inputs from sensors during autonomous and teleop periods? I've always called it at the beginning of every iteration but not sure if calling it every other iteration would made a huge difference.
Calling it at the beginning of the loop is probably the best idea. If you call it at the end, and the code hangs up for whatever reason, then you'll be running with stale data the next loop iteration. But in reality, it shouldn't matter that much.

We ubertubed 15/16 matches at Peachtree. Line tracking is working great for us
__________________
SANTOSH ANDREW DECKER RICK WYNNIE SEAN DEREK MATT
(alamo (semis), p'tree (CHAMPS!), nc (CHAMPS!), newton (quarters))


Best four years of my life. Thanks to everyone who made it happen.
  #41   Spotlight this post!  
Unread 20-03-2011, 13:21
MikeE's Avatar
MikeE MikeE is offline
Wrecking nice beaches since 1990
no team (Volunteer)
Team Role: Engineer
 
Join Date: Nov 2008
Rookie Year: 2008
Location: New England -> Alaska
Posts: 381
MikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond reputeMikeE has a reputation beyond repute
Re: Autonomy: How Did You Guys Do It?

We developed camera tracking and have used gyro in previous years but this year we found that the line sensors were very reliable as long as they are calibrated properly to the field. The lights on the front of the sensors make them very easy to calibrate manually when sliding the robot from side to side over the lines.

Our robot has KoP quad encoders for each of the mechanum wheel modules, so we know how far the robot has travelled forward. There is code to detect if an encoder is providing unreliable values, hence excluding it from calculation. Typical problems are no signal due to wiring problems or physical encoder damage.

We do have an encoder on the elevator, but we have found the most reliable method is to drive the elevator to the top and check the current draw from the motor via CAN. As soon as the elevator gets to the top, the motor starts to stall, increasing current draw which we detect and stop the motor. This method also help if we are get too close and hit some other part of the peg grid structure since it will stop the elevator, rather than unsuccessfully trying to drive it through the grid to a preset point.

The code is written in Java in the autonomousPeriodic() method as a state machine, with timeouts on many states to allow for sensor failures.

Summarizing: line sensors for direction, quad encoders on drivetrain for distance travelled, current draw from elevator motor and timing for pneumatics. Ultrasonic range finding would be a helpful addition.

The biggest problem was lack of access to a real field to test out the system. In particular we had extremely limited access to the practice field during our Regional. Testing by watching the system perform during a match is a very public way of finding bugs, which I do not recommend for the thin-skinned.

Last edited by MikeE : 20-03-2011 at 13:26. Reason: improved clarity & fixed typos
  #42   Spotlight this post!  
Unread 20-03-2011, 21:54
siggy2xc siggy2xc is offline
Registered User
AKA: Tyler Siegrist
FRC #1756 (Argos)
Team Role: Programmer
 
Join Date: Mar 2010
Rookie Year: 2009
Location: peoria
Posts: 70
siggy2xc is an unknown quantity at this point
Re: Autonomy: How Did You Guys Do It?

We recorded our joystick inputs to a file on the cRIO and played them back, it worked amazingly well. Heres a link to my program http://www.chiefdelphi.com/forums/sh...ad.php?t=93720
  #43   Spotlight this post!  
Unread 21-03-2011, 19:25
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Autonomy: How Did You Guys Do It?

Sigh... I guess I will have to go with the blind man way... Autonomy with only encoders. Hey, but at least it is so easy to program that.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #44   Spotlight this post!  
Unread 21-03-2011, 19:58
theprgramerdude theprgramerdude is offline
WPI Freshman
AKA: Alex
FRC #2503 (Warrior Robotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Brainerd, Minnesota
Posts: 347
theprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud of
Re: Autonomy: How Did You Guys Do It?

Did you write your own encoder code?
__________________
Attending: MN Duluth Regional
  #45   Spotlight this post!  
Unread 21-03-2011, 20:11
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Autonomy: How Did You Guys Do It?

Quote:
Originally Posted by theprgramerdude View Post
Did you write your own encoder code?
No, because I have no access to the FPGA. I read that all the encoder calculations basic are done on the FPGA and that the WPILib is just an interface with the FPGA. Even if I write my own program to interface with the encoders, the FPGA has to be the middle man. I can't do anything if the FPGA is doing the internal calculations all wrong.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
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 13:19.

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