Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Programming Arcade Drive (http://www.chiefdelphi.com/forums/showthread.php?t=76517)

kyungjin 04-05-2009 07:45 AM

Programming Arcade Drive
 
I wanted to ask the Chief Delphi community here how to implement arcade style driving using code efficiently and naturally. To clarify what I mean, I wanted to know how to program arcade style controls by individually controlling the left and right motors that are connected to the wheels (one motor controls two wheels) using an efficient coding scheme.

I know the WindRiver FRC class comes with its own Arcade Drive scheme but, for educational purpose, I tried dissecting some of the code there and couldn't find out how it works. I was hoping the CD community can help me understand just how the Arcade Drive works (I'm wondering if it's some kind of mathematical equation based on X and Y inputs of the joystick).

Thanks a lot for your help guys. I appreciate it.

- Daniel

Uberbots 04-05-2009 12:14 PM

Re: Programming Arcade Drive
 
left = y_axis + x_axis
right = y_axis - x_axis

thats the simple way to do it, and you also have to limit the output

Cadyyan 04-05-2009 01:08 PM

Re: Programming Arcade Drive
 
I don't know if you are using Jaguars but I found that if you do NOT limit your max forward speed and max reverse speed then your jaguars can blow their breakers. To fix this I just used a multiplier of 99% of the max speed. AKA:
MotorOut = Speed * .99

virtuald 04-06-2009 11:02 AM

Re: Programming Arcade Drive
 
Quote:

Originally Posted by Cadyyan (Post 846083)
I don't know if you are using Jaguars but I found that if you do NOT limit your max forward speed and max reverse speed then your jaguars can blow their breakers. To fix this I just used a multiplier of 99% of the max speed. AKA:
MotorOut = Speed * .99

Odd. We've never had this problem.

Alan Anderson 04-06-2009 11:28 AM

Re: Programming Arcade Drive
 
Quote:

Originally Posted by Cadyyan (Post 846083)
I don't know if you are using Jaguars but I found that if you do NOT limit your max forward speed and max reverse speed then your jaguars can blow their breakers. To fix this I just used a multiplier of 99% of the max speed. AKA:
MotorOut = Speed * .99

That's not a Jaguar issue. It'll happen if you put too much load on the circuit no matter what speed controller you use (or don't use). For example, our propeller gearing is slightly off optimum, and at full power the motors want to draw more than 40 amps. We have to throttle them back to keep from tripping the breakers. Incidentally, they are controlled by Victors.

Jaguars do have their own built-in 40-amp limit, and will shut down for several seconds if that limit is exceeded, independent of the circuit breakers.


All times are GMT -5. The time now is 10:18 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi