OCCRA
Go to Post Use these tools as a starting point, not as an end product. - Tom Bottiglieri [more]
Home
Go Back   Chief Delphi > Technical > Programming > WindRiver C++
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 04-05-2009, 06:45 AM
kyungjin kyungjin is offline
Software Specialist
AKA: Daniel
VRC #0646
Team Role: Programmer
 
Join Date: Aug 2008
Rookie Year: 2009
Location: Honolulu, Hawaii
Posts: 65
kyungjin is an unknown quantity at this point
Send a message via AIM to kyungjin Send a message via MSN to kyungjin Send a message via Skype™ to kyungjin
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
Reply With Quote
  #2   Spotlight this post!  
Unread 04-05-2009, 11:14 AM
Uberbots's Avatar
Uberbots Uberbots is offline
Mad Programmer
AKA: Billy Sisson
FRC #1124 (ÜberBots)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Avon
Posts: 739
Uberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond reputeUberbots has a reputation beyond repute
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
__________________
A few of my favorite numbers:
175 176 177 195 230 558 716 1024 1071 1592 1784 1816
RPI 2012
BREAKAWAY
Reply With Quote
  #3   Spotlight this post!  
Unread 04-05-2009, 12:08 PM
Cadyyan Cadyyan is offline
The Button Man
FRC #1716 (Redbird Robotics)
Team Role: Mentor
 
Join Date: Sep 2008
Rookie Year: 2007
Location: Wisconsin
Posts: 11
Cadyyan is an unknown quantity at this point
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
__________________
Watch your face!
Reply With Quote
  #4   Spotlight this post!  
Unread 04-06-2009, 10:02 AM
virtuald virtuald is offline
Registered User
AKA: Dustin Spicuzza
FRC #1418
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Northern Virginia
Posts: 513
virtuald is a splendid one to beholdvirtuald is a splendid one to beholdvirtuald is a splendid one to beholdvirtuald is a splendid one to beholdvirtuald is a splendid one to beholdvirtuald is a splendid one to behold
Re: Programming Arcade Drive

Quote:
Originally Posted by Cadyyan View Post
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.
__________________
Co-maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables (NetworkTables for Python)

Team #1418: 2014 VA Regional: Finalists, #2 seed overall, Industrial Design Award; DC Regional: Finalists, #6 alliance captain
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


FRC Software Resources (including 2014 python code): http://www.virtualroadside.com/FRC/
WPILib Doxygen Repo: http://www.virtualroadside.com/WPILib/index.html
Reply With Quote
  #5   Spotlight this post!  
Unread 04-06-2009, 10:28 AM
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 7,861
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Send a message via AIM to Alan Anderson
Re: Programming Arcade Drive

Quote:
Originally Posted by Cadyyan View Post
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.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Arcade Drive Issue and Pnuematics chenvoy NI LabVIEW 10 02-23-2009 07:03 PM
Non-Arcade Drive causes problems in Autonomous... pinballwizard96 NI LabVIEW 2 02-01-2009 07:45 PM
Arcade/Tank Drive Malfunction piedmont Programming 2 01-19-2009 04:37 PM
Arcade Drive Anfony VEX 4 11-08-2006 06:46 PM
vex programming arcade drive setting MikeL303 FIRST Tech Challenge 3 10-17-2005 08:26 PM


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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