|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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);
|
|
#2
|
||||
|
||||
|
Re: Mecanum Spin
Quote:
|
|
#3
|
|||
|
|||
|
Re: Mecanum Spin
Well we're using the standard kop joystick, and our controller is indeed moving the robot properly, what we attempted doing is have it spin using to of the top buttons, and regulate the speed of the spin using the throttle on the joystick.
|
|
#4
|
||||
|
||||
|
Re: Mecanum Spin
If you want to regulate the spin by the throttle, you should probably doing something like this:
Code:
if (joyStick->GetRawButton(4))
joanRobo->HolonomicDrive(0.0, 0.0, -joyStick->GetThrottle());
//Turn right
else if (joyStick->GetRawButton(5))
joanRobo->HolonomicDrive(0.0, 0.0, joyStick->GetThrottle());
//Regular holonomic movement
else
joanRobo->HolonomicDrive(joyStick->GetMagnitude(), joyStick->GetDirectionDegrees(), 0.0);
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| pic: Hot Shot Spin Bar | Madison | Extra Discussion | 5 | 15-09-2009 15:38 |
| A different spin on things. | Matt Attallah | Chit-Chat | 28 | 24-07-2006 11:38 |
| Will the tetras spin? | SteveO | Rules/Strategy | 15 | 20-01-2005 02:36 |
| PUSA and Spin Doctors | Jeff Rodriguez | Chit-Chat | 1 | 08-08-2003 03:37 |
| Motor Spin Direction | archiver | 2000 | 6 | 23-06-2002 23:43 |