View Single Post
  #9   Spotlight this post!  
Unread 12-28-2008, 08:50 PM
koreabell koreabell is offline
Team 956 Safety Captain
FRC #0956 (Eagles)
Team Role: Programmer
 
Join Date: Sep 2008
Rookie Year: 2007
Location: Oregon
Posts: 24
koreabell is an unknown quantity at this point
Re: Getting Familiar with Programming in WindRiver

Quote:
Originally Posted by kyungjin View Post
One thing I noticed so far in the code, is the use of an "Arcade Joystick". Is that referring to "tank-drive" type steering or to single joystick control of the robot? Also, is it possible to use a different type of steering mechanism, for example a steering wheel, to control the robot? If so, what other resources would I need and how will I be able to implement it in the source code?
If you read the WPI Robotics Library doxygen document (C Programming Reference),

under class "RobotDrive", there's definition for every function related to driving mechanism

Here's description for "ArcadeDrive" function
Quote:
Originally Posted by WPI Robotics Library Documentation
Arcade drive implements single stick driving. Given a single Joystick, the class assumes the Y axis for the move value and the X axis for the rotate value. (Should add more information here regarding the way that arcade drive works.)
if you want to make your robot to be controlled with tank drive system, there's a function called "TankDrive"

Description for "TankDrive" function
Quote:
Originally Posted by WPI Robotics Library Documentation
Provide tank steering using the stored robot configuration. Drive the robot using two joystick inputs. The Y-axis will be selected from each Joystick object.
there are more functions having same name -TankDrive- but taking different parameters so you should check it before you use it.


in the code you should call function by doing something like this
Code:
RobotDrive::TankDrive(Left,Right); //basic tank drive function under RobotDrive Class
or if you have RobotDrive type variable, you can do this also
Code:
variable->TankDrive(Left,Right);

and you can use steering wheel for controlling robot but, programming will be same since throttle stick or pedal will have/return y-axis value and the steering wheel will have/return x-axis value

Last edited by koreabell : 12-28-2008 at 08:53 PM.
Reply With Quote