Go to Post The fact of the matter comes down to this: No matter what you are interested in, you can always encourage others. - Amanda Morrison [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 07-02-2006, 19:51
gabrielse's Avatar
gabrielse gabrielse is offline
Registered User
FRC #1748 (Lab Rats)
Team Role: Teacher
 
Join Date: Jun 2005
Rookie Year: 2004
Location: Baltimore
Posts: 55
gabrielse is a splendid one to beholdgabrielse is a splendid one to beholdgabrielse is a splendid one to beholdgabrielse is a splendid one to beholdgabrielse is a splendid one to beholdgabrielse is a splendid one to beholdgabrielse is a splendid one to behold
Arcade Function

We programmed our robot with the Arcade function. It is too sensitive to drive.

We want to make it less sensitive/slow it down. We tried to use a variable to collect the output from the Arcade function. Then we were going to use a linear function to reduce the speed of the output and send the result to the motors.

When we tried to send the PWM signals to a variable (we tried various types) in the Arcade function we got really large numbers that didn't vary with the joystick.

If anyone has more information on the Arcade function, or how to make our robot controls less sensitive, please let us know. Thanks.
  #2   Spotlight this post!  
Unread 08-02-2006, 00:49
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Arcade Function

Quote:
Originally Posted by gabrielse
We programmed our robot with the Arcade function. It is too sensitive to drive.

We want to make it less sensitive/slow it down. We tried to use a variable to collect the output from the Arcade function. Then we were going to use a linear function to reduce the speed of the output and send the result to the motors.

When we tried to send the PWM signals to a variable (we tried various types) in the Arcade function we got really large numbers that didn't vary with the joystick.

If anyone has more information on the Arcade function, or how to make our robot controls less sensitive, please let us know. Thanks.
I'm guessing you are looking for "ramping" where the values increase gradually rather than at the same rate the joystick is moved.

The arcade function is a single block that first reads values from the joysticks, mixes the X and Y values, and sends the values to the left and right motors. You could replicate this code yourself and add in the ramping function.

To read the joystick inputs use the "Analog OI Input" block. This will return a value between 0-255 that corresponds to the joystick value with 127 in the center.

To set the motor speeds, use the "PWM Control" block. It takes a value between 0-255 as well.

The ramping is done by determining whether the current value is bigger or smaller than the "requested" value. Then add/subtract a small increment in the requested direction each time through your robot control loop. The size of that increment will determine the speed that the motors catch up with the requested speed.

A slightly tricky part of this will be simulating the arcade steering and mixing the X and Y values. The left and right motors effectively get Y+X and Y-X where the signs depend on the mounting of the motors. You also have to handle the overflow case (where the X+Y or X-Y inputs either exceed 255 or are less than 0).
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
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
Loop time for OperatorControl function? Debug blows... Chris_Elston Programming 10 13-02-2006 14:42
TTL port to a serial port on a demo board ImmortalAres Programming 16 09-07-2005 23:44
RoboEmu2(code simulator)--now with C! rbayer Programming 23 17-02-2005 09:17
1418's Fundraising Arcade Machine (Game Suggestions) phrontist General Forum 29 26-10-2004 14:02
heres the code. y this not working omega Programming 16 31-03-2004 15:18


All times are GMT -5. The time now is 01:35.

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