View Single Post
  #11   Spotlight this post!  
Unread 14-01-2009, 21:35
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
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: need help understanding c code in robotdrive

There are three ways of getting the robot to turn under program control in the library:
  1. RobotDrive:: Drive(speed, curve) - this takes a forward speed and rate of curve value. It tries to use the curve value to create a constant angle curve regardless of speed. We'd be interested in feedback on how well it's working for you. The sensitivity parameter is used to modify that turn rate based on the curve parameter.
  2. RobotDrive::ArcadeDrive(moveValue, rotateValue) - uses the moveValue for forward speed and the rotateValue to bias the left and right sides of the robot like you would expect. One interesting thing here is that there is an optional parameter where it will square the inputs. Because the parameters are between -1.0 and 1.0 squaring the input has the effect of making the robot more sensitive at low speeds (expanding the low end of the joystick range). This can also be used with a Joystick parameter making it very easy to create a driving robot.
  3. RobotDrive::TankDrive(leftValue, rightValue) - the traditional tank drive sending the leftValue to the left side of the robot and the rightValue to the right side of the robot. This can also be used with Joystick parameters making it very easy to create a driving robot.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote