Go to Post NOOOOOOOOOOOOooooooo!!!!! I hate regolith. - apalrd [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 03-02-2012, 11:01
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
E4P Encoder Scaling

This is the comment for the Encoder::SetDistancePerPulse() method:
Quote:
* Set the distance per pulse for this encoder.
* This sets the multiplier used to determine the distance driven based on the count value
* from the encoder.
* Do not include the decoding type in this scale. The library already compensates for the decoding type.
* Set this value based on the encoder's rated Pulses per Revolution and
* factor in gearing reductions following the encoder shaft.
* This distance can be in any units you like, linear or angular.
From this link:
Quote:
The encoders provided are 360 CPR. With 4X quadrature decoding, you get 1440 positions per revolution.
I have 8" direct driven wheels on my robot. Because the comment says the library already compenstates for the decoding type I used the 360 number. I wanted my speeds in feet/sec so I set my distance per pulse accordingly:

Code:
pLeftEncoder->SetDistancePerPulse((3.14*(8.0/12.0))/360.0);
pRightEncoder->SetDistancePerPulse((3.14*(8.0/12.0))/360.0);
The problem is I don't believe the values I am getting from Encoder::GetRate(). I used a tach to measure the max speed of the wheels and it read 517 rpm which is 18fps which is what we design the drive to be capable of. However my encoders are reading 12fps. The only thing I can think to change would be to use 1440 instead of 360 but that would just lower the speed I am reading. Help?
 


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 20:08.

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