Go to Post still emotion conveyed through text is really strange. - Blackphantom91 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-05-2011, 23:26
wiiking123 wiiking123 is offline
Registered User
FRC #3855
 
Join Date: Feb 2011
Location: Washington
Posts: 20
wiiking123 is an unknown quantity at this point
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.
Reply With Quote
  #2   Spotlight this post!  
Unread 02-05-2011, 09:59
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Encoders and Mecanum Drive

Quote:
Originally Posted by wiiking123 View Post
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.



Last edited by Ether : 02-05-2011 at 10:13.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-05-2011, 14:36
vhcook's Avatar
vhcook vhcook is offline
Reader of Things
AKA: Victoria
FRC #1939 (Kuh-nig-its)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Kansas City, MO
Posts: 546
vhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond repute
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.
__________________


Reply With Quote
  #4   Spotlight this post!  
Unread 02-05-2011, 15:14
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,042
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Encoders and Mecanum Drive

Quote:
Originally Posted by vhcook View Post
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.



Reply With Quote
  #5   Spotlight this post!  
Unread 02-05-2011, 15:22
vhcook's Avatar
vhcook vhcook is offline
Reader of Things
AKA: Victoria
FRC #1939 (Kuh-nig-its)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Kansas City, MO
Posts: 546
vhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond reputevhcook has a reputation beyond repute
Re: Encoders and Mecanum Drive

Quote:
Originally Posted by Ether View Post
You might find the following CD papers useful as you are preparing your notes:
Thanks! That will definitely help.
__________________


Reply With Quote
  #6   Spotlight this post!  
Unread 06-05-2011, 23:19
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Encoders and Mecanum Drive

Quote:
Originally Posted by Ether View Post
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
Reply With Quote
  #7   Spotlight this post!  
Unread 07-05-2011, 12:58
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,561
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Encoders and Mecanum Drive

Quote:
Originally Posted by jhersh View Post
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.
Reply With Quote
  #8   Spotlight this post!  
Unread 13-05-2011, 17:22
Ryan Gordon Ryan Gordon is offline
Registered User
FRC #2854 (EVHS Robotics)
Team Role: Mentor
 
Join Date: Feb 2009
Rookie Year: 2009
Location: San Jose, CA
Posts: 40
Ryan Gordon is an unknown quantity at this point
Re: Encoders and Mecanum Drive

Quote:
Originally Posted by jhersh View Post
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
Reply With Quote
  #9   Spotlight this post!  
Unread 07-06-2011, 13:57
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
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.
__________________
-- Marshal Horn
Reply With Quote
  #10   Spotlight this post!  
Unread 21-06-2011, 16:03
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Encoders and Mecanum Drive

There is a new update posted for LabVIEW... see here. http://www.chiefdelphi.com/forums/sh...2&postcount=71
Reply With Quote
Reply


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 06:50.

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