Go to Post a robot is never finished... It can always be redone and improved. - EricVicenti [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 05-02-2011, 15:02
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 495
tomy has a spectacular aura abouttomy has a spectacular aura about
Auto Mode Help

ok so this year we have a complicated arm.

is there some kind of code or program that records what a driver does in telop mode that we can play back in auto mode.

example:

the driver drives the robot up to the pegs and score a tube in telop mode while he/she is doing this we are recording the code. we then take that code and play it back into auto mode

is this possible?
Reply With Quote
  #2   Spotlight this post!  
Unread 05-02-2011, 22:33
Trump Trump is offline
Registered User
FRC #2053
 
Join Date: Feb 2010
Location: New York
Posts: 18
Trump is an unknown quantity at this point
Re: Auto Mode Help

At the moment, i can't think of any way to do this specifically, but something that we've done in the past is to send autonomous signals based on time. For example, raise shoulder at .6 speed for 1 sec, then raise elbow at .3 speed for 2 seconds. With some tweaking, you should be able to get a pretty smooth motion, however position won't be exact.

If you have some sort of positional feedback on the arm (potentiometers, encoders...) you could find what the positions of the arm are after the driver gets it to a spot that they want it. Then set the arm to move to those predefined positions. In this case, the arm will go to the same spot every time.
Reply With Quote
  #3   Spotlight this post!  
Unread 05-02-2011, 22:40
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 495
tomy has a spectacular aura abouttomy has a spectacular aura about
Re: Auto Mode Help

then how to i drive the victor in auto mode?
Reply With Quote
  #4   Spotlight this post!  
Unread 05-02-2011, 22:58
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 671
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Auto Mode Help

Autonomous driving is all about sensors. First, you have to decide what sensors you want to use to guide your driving. For this year's game, I have heard the following strategies:
  • Line following using light sensors.
  • Distance and turn driving using encoders and gyros
  • Vision driving: using camera to recognize the pegs and driving towards it.
  • No sensors, use pure timing (e.g. drive motor x with power y for z seconds). If you are trying to play a recorded route, this is probably one way to do it.
There may be some other strategies, but these are the ones I am aware of. Once you decided which sensors to use, then you write the code to read the sensors, calculate the power to each driving motors accordingly and program the PWMs. If you decide on doing line following, FIRST has provided sample code on how to do that. If you decide to use encoders and gyros, you can use PID control algorithm which are also supported in WPI library and there are many sample programs you can look at. And so is vision driving. There are a lot of sample code from the last couple years (Lunacy and Breakaway).
__________________
Reply With Quote
  #5   Spotlight this post!  
Unread 05-02-2011, 23:12
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 495
tomy has a spectacular aura abouttomy has a spectacular aura about
Re: Auto Mode Help

That helps but how do I drive a specific motor like a victor in auto mode because that is the type of motor that we are using for our arm
Reply With Quote
  #6   Spotlight this post!  
Unread 05-02-2011, 23:17
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 671
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Auto Mode Help

For your arm motor, do you have any sensor on it to tell you the position of the arm? For us, we have an elevator and we mounted an encoder on the motor path to tell us the height. If you don't have any sensors, then your arm can only be driven blind. Depending on your design, you may want to add some sensors to it.
__________________
Reply With Quote
  #7   Spotlight this post!  
Unread 05-02-2011, 23:20
tomy tomy is offline
Registered User
FRC #3038 (I.C.E. Robotics)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Stacy, Minnesota
Posts: 495
tomy has a spectacular aura abouttomy has a spectacular aura about
Re: Auto Mode Help

We have sensors to make sure it dosent go to far and fall over
Reply With Quote
  #8   Spotlight this post!  
Unread 05-02-2011, 23:26
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 671
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Auto Mode Help

So I assume you have limit switches on a digital input channel then? If so, you can just program the victor with:
Code:
if (limitSwitch->Get() == 0)
{
    armMotor->Set(0.5);
}
else
{
    armMotor->Set(0.0);
}
__________________
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 03:08.

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