Go to Post Now that the robot is shipped, maybe I can get to bed before the alarm clock goes off =] - DarMagi [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 Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-01-2008, 05:45
windell747 windell747 is offline
Registered User
FRC #2477
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2001
Location: Hawaii
Posts: 158
windell747 will become famous soon enoughwindell747 will become famous soon enough
Steering Wheel and Throttle programming

Hi, I'm trying to modify the default code so that I can drive our bot using a steeting wheel and throttle. I would like the robot to react as if I was driving a car. The turning rate would be dependent on how far I've turned the steering to one side or the other. How fast the bot would travel would be depended on how far I press the pedal.

Is there any example code that you might know of?

Thanks,
Windell
#2477
  #2   Spotlight this post!  
Unread 28-01-2008, 10:13
JohnC's Avatar
JohnC JohnC is offline
my other name is nigel
FRC #0360 (360 Revolution)
Team Role: Programmer
 
Join Date: Mar 2005
Rookie Year: 2005
Location: user_routines.c
Posts: 100
JohnC is a jewel in the roughJohnC is a jewel in the roughJohnC is a jewel in the roughJohnC is a jewel in the rough
Send a message via AIM to JohnC
Re: Steering Wheel and Throttle programming

Actually...I'm writing that code right now, except we're using joysticks.

If the left joystick is pressed forward, the robot will use encoders to drive straight. When the right joystick is moved side to side, the encoder PID will be turned off and one motor will be slowed while the other is increased, depending on which direction you're turning.

Hopefully it'll be done by friday... I'll post it when I have it
__________________
What place are we at? ... TODAI!
  #3   Spotlight this post!  
Unread 28-01-2008, 15:38
popnbrown's Avatar
popnbrown popnbrown is offline
FIRST 5125 HOTH Lead Mentor
AKA: Sravan S
FRC #5125 (Hawks on the Horizon)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Illinois
Posts: 367
popnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond repute
Re: Steering Wheel and Throttle programming

We were thinking of doing the same. So we got to work determining what values the steering wheel would output when we turn it right and left. We never figured it out but if we have time I would like to figure it out.

After you figure out the values. You just have to convert them to the values you used to use.

Ours right now is based on a tank drive. Pretty much like what John said. One joystick to go forward and back and the other to turn. So by using the wheel we would have to determine some sort of equation.

If you need help with that let me know,
Sravan
  #4   Spotlight this post!  
Unread 28-01-2008, 17:37
ubergeek5075's Avatar
ubergeek5075 ubergeek5075 is offline
Registered User
FRC #0910 (Foley Freeze)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2005
Location: Troy, MI
Posts: 14
ubergeek5075 is an unknown quantity at this point
Re: Steering Wheel and Throttle programming

We have gotten a single joystick drive working previously, and to make things easy with the steering wheel and throttle, i immediately thought of merging the two. I thought you could just put in the steering wheel analog in as the joystick X and the throttle as the Joystick Y. Then, to make it a little smarter, put in some other logic as to not make it turn even when the throttle is not on. (ours spins in place if the joystick reads all X).

Thats just my thought, Have Fun.
__________________
2005 Newton Division Finalists
2006 IRI Champions
2007 Curie Division Champions
2007 MARC Champions
2007 ARC Champions
2007 Capped in autonomous....Twice
Just remember two things: THE Answer is 42, and
DON'T PANIC!
  #5   Spotlight this post!  
Unread 28-01-2008, 18:05
arhajder's Avatar
arhajder arhajder is offline
Arkadiusz Hajder
FRC #0640 (Viro)
Team Role: Leadership
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Thomas A. Edison
Posts: 60
arhajder will become famous soon enougharhajder will become famous soon enough
Send a message via AIM to arhajder
Re: Steering Wheel and Throttle programming

We have two joysticks every year. It makes it much easier to control especially the turning
  #6   Spotlight this post!  
Unread 28-01-2008, 18:11
ubergeek5075's Avatar
ubergeek5075 ubergeek5075 is offline
Registered User
FRC #0910 (Foley Freeze)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2005
Location: Troy, MI
Posts: 14
ubergeek5075 is an unknown quantity at this point
Re: Steering Wheel and Throttle programming

We usually have tank drive (2 joysticks), but we saw how hard it is to do arcs well with two joysticks. However, we experimented with single joystick drive in 05, and found it did arcs well, but it didn't fit the game until now. We saw the need for more arcs in driving, especially after seeing that one team that's basically done (121 i think, right?) go around the turn.
__________________
2005 Newton Division Finalists
2006 IRI Champions
2007 Curie Division Champions
2007 MARC Champions
2007 ARC Champions
2007 Capped in autonomous....Twice
Just remember two things: THE Answer is 42, and
DON'T PANIC!
  #7   Spotlight this post!  
Unread 29-01-2008, 08:17
popnbrown's Avatar
popnbrown popnbrown is offline
FIRST 5125 HOTH Lead Mentor
AKA: Sravan S
FRC #5125 (Hawks on the Horizon)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Illinois
Posts: 367
popnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond reputepopnbrown has a reputation beyond repute
Re: Steering Wheel and Throttle programming

The combining should work fine. I was thinking just use the steering wheel as joystick X and the throttle as Y. So pretty much the same lines. It only depends upon your code to read both the values and then do whatever they tell you. It'll def. produce more complicated code than if you just use two joysticks.

Quote:
However, we experimented with single joystick drive in 05, and found it did arcs well, but it didn't fit the game until now. We saw the need for more arcs in driving, especially after seeing that one team that's basically done (121 i think, right?) go around the turn.
Why is it better with one joystick? I don't see the difference.
Oh, never mind, it could just be that the driver is just a little bit slower when he/she uses the second joystick to turn. NEVER MIND.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with programing saitekx36f joystick and throttle sonicx059 Programming 4 21-01-2008 20:30
Steering wheel radicalnerd Technical Discussion 30 31-05-2007 00:56
Algorithim question: 4 wheel steering and power Validius Programming 2 15-11-2005 17:41
pic: Chantilly Academy's 4 Wheel Drive 4 Wheel Steering!!!! jskene Robot Showcase 25 18-02-2005 20:24
need glp programing steering with a steering wheel Matchew Programming 2 10-02-2003 14:20


All times are GMT -5. The time now is 19:14.

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