Go to Post Whatever you do, do it in graciously professional manner. - EricH [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 07-02-2015, 17:16
goldenguy00 goldenguy00 is offline
Registered User
FRC #0619
 
Join Date: Feb 2015
Location: Virginia
Posts: 4
goldenguy00 is an unknown quantity at this point
Correcting Mecanum Wheels with Encoders (Ether, We Summon You!)

We have the mecanum wheels set up to properly move in the Y (forwards and back) direction and to turn without any problems, but when attempting to strafe, the robot veers off to one side instead of going straight to the side. To fix this, we are using encoders, but we are running into some severe difficulties. Through a bit of troubleshooting, I found that this works...
Code:
public class TalonCan {

    CANTalon talon;

    public TalonCan(int canID){
	talon = new CANTalon(canID);
        talon.changeControlMode(ControlMode.PercentVbus);
    }
}
And this doesn't...
Code:
public class TalonCan {
    
    CANTalon talon;
    
    public TalonCan(int canID){
        talon = new CANTalon(canID);
	talon.changeControlMode(ControlMode.Speed);
	talon.setPID(0.1, 0.001, 1, 0.0001, 100, 36, 0);
	talon.set(0);
	talon.setFeedbackDevice(FeedbackDevice.QuadEncoder);
    }
}
I believe it's from not using the encoders, so my question is, what am I doing wrong in the second example? The robot does not move in autonomous, nor in teleop.

[EDIT]
We have already put the robot on blocks and the wheels are moving in the correct direction and correct speed. It's only on the floor that we have problems, hence the need for encoders.

Last edited by goldenguy00 : 07-02-2015 at 17:26.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:42.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi