Thread: Mecanum Spin
View Single Post
  #1   Spotlight this post!  
Unread 03-03-2010, 22:19
Bart Bart is offline
Registered User
FRC #2625
 
Join Date: Feb 2010
Location: Canada
Posts: 5
Bart is an unknown quantity at this point
Mecanum Spin

Hey, I'm currently trying to figure out how to change the magnitude of the holonomic drive system. I tried the obvious approach (Changing the first float) however, with out current code, nothing seemed to change at all. Could someone look it over and tell me what they think? We basically want the spin of the robot to be dependent on the value returned by the joystick throttle:

Code:
//Stop Button
		if(!joyStick->GetRawButton(3))
		{
			//Turn left
			if(joyStick->GetRawButton(4))
				joanRobo->HolonomicDrive(joyStick->GetThrottle(), 0.0, -180.0);
			
			//Turn right
			else if (joyStick->GetRawButton(5))
				joanRobo->HolonomicDrive(joyStick->GetThrottle(), 0.0, 180.0);
			
			//Regular holonomic movement
			else
				joanRobo->HolonomicDrive(joyStick->GetMagnitude(), joyStick->GetDirectionDegrees(), 0.0);
		}
		else
			//Stop all movement
			joanRobo->HolonomicDrive(0.0, 0.0, 0.0);
Reply With Quote