View Single Post
  #2   Spotlight this post!  
Unread 17-01-2014, 21:49
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: X and Z axis change when gyro reaches 90 degrees

Quote:
Originally Posted by rc4rest View Post
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.
__________________
"Never let your schooling interfere with your education" -Mark Twain
Reply With Quote