Quote:
Originally Posted by rc4rest
We are using Mechanum wheels and are trying to use a Gyro to make things easier for the driver. The base code had to be changed by swapping the throttle(axis 3) and y axis. The unit drives great until we turn on the gyro and rotate right or left beyond 90 degrees. We are using labview and used sample library code. At which point the robot starts moving sideways in the direction that you were rotating.
|
Can you go into more detail about how it behaved before you swapped axis 3 and the y axis? It may be easier if you use the Cartesian one instead of the Polar mecanum. I would strongly advise you not flip the inputs, especially if you're trying to use field centric. I'm guessing you had to swap axis because one needs to be inverted. This is pretty easy to test on Cartesian. Start with just y, if it doesn't go forward invert it. If it goes in a weird direction, you probably need to flip the motor connectors to the speed controller. To make sure when you apply only y all the motors turn in the same direction.
Next add in the x, if it doesn't strafe in the right direction invert it. Then finally add in your rotation and do the same.
This should give you robot centric control. Then add the gyro as the forth input, and you should have a field centric control.