|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Drive Backwards Causes A Rotation Movement
We are using the Logitech Extreme 30 Pro Joystick to control our mechanum drive base this year. Drive forward works fine and so does strafing. When we drive backwards the robot wants to rotate instead. We used smart dash board to locate the problem. When we pull the joystick backwards the Z axis has an input greater than the Y axis input.
Our Code is: Code:
myRobot.MecanumDrive_Cartesian(stick.GetX(), stick.GetY(), stick.GetTwixt()/3, 0) |
|
#2
|
|||||
|
|||||
|
Re: Drive Backwards Causes A Rotation Movement
A twist-style joystick seems obvious for controlling a holonomic drivebase, but in practice it's just too easy to twist it by accident. My suggestion is to use a separate joystick for rotation control.
|
|
#3
|
||||
|
||||
|
Re: Drive Backwards Causes A Rotation Movement
The problem is our driver gets confused when using two joysticks and prefers one
|
|
#4
|
||||
|
||||
|
Re: Drive Backwards Causes A Rotation Movement
Quote:
|
|
#5
|
||||
|
||||
|
Re: Drive Backwards Causes A Rotation Movement
Forward=
Y = 1.000 Z = 0.008 Backwards = Y = -1.000 Z = -0.0062 It's a small difference but it makes the robot rotate. |
|
#6
|
||||
|
||||
|
Re: Drive Backwards Causes A Rotation Movement
Quote:
When we pull the joystick backwards the Z axis has an input greater than the Y axis input. Last edited by Ether : 13-02-2015 at 17:02. |
|
#7
|
||||
|
||||
|
Re: Drive Backwards Causes A Rotation Movement
Yes the Y axis is greater than the Z axis but the robot still rotates when driving backwards.
|
|
#8
|
||||
|
||||
|
Re: Drive Backwards Causes A Rotation Movement
Quote:
repeat for negative Y commands. If all the Z values are within +/-0.0099, try adding deadband to your code: if (fabs(Z)<.01) Z=0; |
|
#9
|
||||
|
||||
|
Re: Drive Backwards Causes A Rotation Movement
Where would you put that in the code?
|
|
#10
|
||||
|
||||
|
Re: Drive Backwards Causes A Rotation Movement
Right after you read the joystick Z axis (i.e. before you use it).
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|