Go to Post Teams are overconfident every year. Honest evaluation of your capabilities with regard to your design strategy is a skill few teams have. - Chris is me [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 20-10-2013, 17:49
MichaelBick MichaelBick is offline
Registered User
FRC #1836 (MilkenKnights)
Team Role: Alumni
 
Join Date: Oct 2011
Rookie Year: 2010
Location: Los Angeles
Posts: 734
MichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant future
Auton Programming with Encoders and Gyros

We have been starting to use sensors on our robot, which really helped last year. We used banner sensors to quickly speed our shooter wheels up to the correct speed and then keep them up at speed so that we could quickly and accurately shoot multiple shots. Recently we have added encoders and gyros onto our 2013 robot so that our programmers can learn how to program a more complex auton.

Ideally we would like to have two autons. One of them should have the robot start and the back, center of the pyramid and then drive back to block the 2 center frisbees after we shoot our frisbees. Ideally, we would like to do this with only encoder feedback(KISS). The second auto should have the robot start from the back right of the pyramid, move back a little, turn, and then drive back to block the center frisbees. We would like to learn how to program this with both encoder and gyro feedback.

We have encoder giving us feedback already, and gyros will soon be able to give us feedback too. I was wondering if someone could give us guidance on how to program autonomous modes like these(psuedocode would be nice too).
__________________
Team 1836 - The Milken Knights
2013 LA Regional Champions with 1717 and 973
2012 LA Regional Finalists with 294 and 973
To follow Team 1836 on Facebook, go to http://www.facebook.com/MilkenKnights
To go to our website, go to http://milkenknights.com/index.html
Reply With Quote
  #2   Spotlight this post!  
Unread 20-10-2013, 18:16
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Auton Programming with Encoders and Gyros

Quote:
Originally Posted by MichaelBick View Post
We used banner sensors to quickly speed our shooter wheels up to the correct speed and then keep them up at speed
Just curious: what control algorithm did you use, what was the iteration rate, and how stable was the speed control?

Quote:
I was wondering if someone could give us guidance on how to program autonomous modes like these
What kind of drivetrain?


Reply With Quote
  #3   Spotlight this post!  
Unread 20-10-2013, 19:05
MichaelBick MichaelBick is offline
Registered User
FRC #1836 (MilkenKnights)
Team Role: Alumni
 
Join Date: Oct 2011
Rookie Year: 2010
Location: Los Angeles
Posts: 734
MichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant futureMichaelBick has a brilliant future
Re: Auton Programming with Encoders and Gyros

We used the bangbang algorithm. It was stable enough for us, and was 150 rpms under setpoint at the worst. I am not the main programmer, but as far as I know it runs at the same iteration speed as the rest of our code. I'll make sure to ask at our next meeting though.

We are running a 6wd with cheesy drive(one joystick is throttle, the other controls our turning)
__________________
Team 1836 - The Milken Knights
2013 LA Regional Champions with 1717 and 973
2012 LA Regional Finalists with 294 and 973
To follow Team 1836 on Facebook, go to http://www.facebook.com/MilkenKnights
To go to our website, go to http://milkenknights.com/index.html
Reply With Quote
  #4   Spotlight this post!  
Unread 20-10-2013, 22:54
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Auton Programming with Encoders and Gyros

Quote:
Originally Posted by MichaelBick View Post
We are running a 6wd
I think with a skid-steer drivetrain your best bet would be a combination of driving in straight line segments plus rotating-in-place. You'd want to figure out where your center of rotation is and factor that into the calculations.

So for example...

Given:

a) The center of rotation of your robot is located at field coordinates (0,0), and

b) The robot is oriented at an angle A0 degrees clockwise from the +Y axis of the field coordinate system, where the +Y axis is straight downfield (away from the driver station), and

c) When autonomous starts, you want to drive to field coordinates (X1,Y1) and then to (X2,Y2), and

d) When you get to (X2,Y2) you want to orient the robot to angle A2

Proceed as follows:

1) When autonomous starts, set the gyro reading to A0, then

2) Rotate-in-place until the gyro angle equals (180/pi)*atan2(-X1,-Y1)+180 degrees, then

3) Drive straight a distance sqrt(X12+Y12), then

4) Rotate-in-place until the gyro angle equals (180/pi)*atan2(-(X2-X1),-(Y2-Y1))+180 degrees, then

5) Drive straight a distance sqrt((X2-X1)2+(Y2-Y1)2), then

6) Rotate-in-place until the gyro angle equals A2 degrees



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 13:23.

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