|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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 ![]() |
|
#3
|
||||
|
||||
|
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
|
||||
|
||||
|
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. |
|
#5
|
||||
|
||||
|
Re: Steering Wheel and Throttle programming
We have two joysticks every year. It makes it much easier to control especially the turning
|
|
#6
|
||||
|
||||
|
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.
|
|
#7
|
||||
|
||||
|
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:
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |