Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Encoders and Mecanum Drive (http://www.chiefdelphi.com/forums/showthread.php?t=94954)

wiiking123 01-05-2011 23:26

Encoders and Mecanum Drive
 
Recently, our team decided to add Digital Encoders into our drivetrain containing mecanum wheels. I was wondering exactly how we go about integrating our encoders into our code. Examples would be much appreciated, but advice is just as good.

Ether 02-05-2011 09:59

Re: Encoders and Mecanum Drive
 
Quote:

Originally Posted by wiiking123 (Post 1057974)
Recently, our team decided to add Digital Encoders into our drivetrain containing mecanum wheels. I was wondering exactly how we go about integrating our encoders into our code. Examples would be much appreciated, but advice is just as good.

Figure out what a reasonable value for maximum wheel speed is for your drivetrain. Scale the encoder rate feedback so it has a range of -1 to +1, where +1 corresponds to that maximum speed. For each of the four wheels, use the existing +/-1 open-loop wheel speed command (from your mecanum inverse kinematic calculation) as the setpoint for a PID, and use the scaled encoder rate for that wheel as the process variable.

Be advised of the following: 1) tuning a PID for speed is different from tuning a PID for position (there are some helpful threads on this topic); 2) there are some known issues (FPGA) with the encoder rate computation


If all you want to do with the encoders is to make autonomous more accurate, you could consider reading position from the encoders instead of rate. Starting with a sequence of known intermediate stations along a desired vehicle path, compute the rotation for each wheel for each station and close the loop on wheel rotation for each wheel, keeping the command one station ahead of the current vehicle position. You may need to limit the time rate of change of each PID output in order to prevent wheel slipping. The spacing of the stations need not be equidistant. Experiment with the spacing of the stations to get the desired result.



vhcook 02-05-2011 14:36

Re: Encoders and Mecanum Drive
 
With mechanum, you will need encoders on all four wheels to get an accurate position reference, and you'll have to correct for wheel diameter and the vector of the force applied by the angled rollers. I have some detailed notes from our development this season, and I'll see if I can put together a white paper over the next couple of weeks. There is a bit of slip because of the rollers, but you can get reasonably accurate readings.

Ether 02-05-2011 15:14

Re: Encoders and Mecanum Drive
 
Quote:

Originally Posted by vhcook (Post 1058254)
I have some detailed notes from our development this season, and I'll see if I can put together a white paper over the next couple of weeks.

You might find the following CD papers useful as you are preparing your notes:

http://www.chiefdelphi.com/media/papers/1836

http://www.chiefdelphi.com/media/papers/2390

http://www.chiefdelphi.com/media/papers/2434



Quote:

With mechanum ... you'll have to correct for ... the vector of the force applied by the angled rollers.
The inverse kinematic calculation of the wheel speeds takes care of that.




vhcook 02-05-2011 15:22

Re: Encoders and Mecanum Drive
 
Quote:

Originally Posted by Ether (Post 1058269)
You might find the following CD papers useful as you are preparing your notes:

Thanks! That will definitely help.

jhersh 06-05-2011 23:19

Re: Encoders and Mecanum Drive
 
Quote:

Originally Posted by Ether (Post 1058115)
2) there are some known issues (FPGA) with the encoder rate computation

FYI, Doug found the source of the problem in the FPGA... we are considering releasing a new image that contains a fix for use in the off-season... is that of value to anyone? Or is the current work-around sufficient?

-Joe

Joe Ross 07-05-2011 12:58

Re: Encoders and Mecanum Drive
 
Quote:

Originally Posted by jhersh (Post 1059874)
FYI, Doug found the source of the problem in the FPGA... we are considering releasing a new image that contains a fix for use in the off-season... is that of value to anyone? Or is the current work-around sufficient?

I would appreciate a new image. It probably wouldn't be that useful for teams working on their current robot, but for everyone working on new platforms, it would be very nice to have.

Ryan Gordon 13-05-2011 17:22

Re: Encoders and Mecanum Drive
 
Quote:

Originally Posted by jhersh (Post 1059874)
FYI, Doug found the source of the problem in the FPGA... we are considering releasing a new image that contains a fix for use in the off-season... is that of value to anyone? Or is the current work-around sufficient?

-Joe

Our team would definitely like the new image

kamocat 07-06-2011 13:57

Re: Encoders and Mecanum Drive
 
I would like the new image as well.
All my encoders are connected to Jaguars, but I do use the semi-period counter functions for SONAR.

jhersh 21-06-2011 16:03

Re: Encoders and Mecanum Drive
 
There is a new update posted for LabVIEW... see here. http://www.chiefdelphi.com/forums/sh...2&postcount=71


All times are GMT -5. The time now is 06:50.

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