View Single Post
  #4   Spotlight this post!  
Unread 09-02-2011, 23:41
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Mecanum Drifting

Quote:
Originally Posted by dboisvert View Post
We are using Victors

Code:
RobotDrive *m_robotDrive;
m_robotDrive = new RobotDrive(1, 2, 3, 4);
I think that's the root of your problem. The version of the RobotDrive constructor that takes four PWM channel numbers sets them up as Jaguars. You need to open four Victors and pass them to the version of the RobotDrive constructor that takes four motor references.

The reason this makes a difference is that the factory-calibrated neutral PWM value for a Victor is slightly higher than the neutral PWM value for a Jaguar. Because of the incorrect translation from -1..1 speed control to PWM pulse width, you'll end up running motors a bit faster in reverse than with the same forward speed command. In your case, the right motors will go faster than the left ones when you're driving forward. At very low speeds, the difference will be relatively large.
Reply With Quote