View Single Post
  #1   Spotlight this post!  
Unread 22-04-2012, 17:34
trilogy2826's Avatar
trilogy2826 trilogy2826 is offline
Mentor - 2826
AKA: Jake Fischer
FRC #2826 (Wave Robotics)
Team Role: Mentor
 
Join Date: Nov 2008
Rookie Year: 2006
Location: Oshkosh, WI
Posts: 113
trilogy2826 has a reputation beyond reputetrilogy2826 has a reputation beyond reputetrilogy2826 has a reputation beyond reputetrilogy2826 has a reputation beyond reputetrilogy2826 has a reputation beyond reputetrilogy2826 has a reputation beyond reputetrilogy2826 has a reputation beyond reputetrilogy2826 has a reputation beyond reputetrilogy2826 has a reputation beyond reputetrilogy2826 has a reputation beyond reputetrilogy2826 has a reputation beyond repute
Encoder function calls reporting inf

While attempting to improve our autonomous distance driving by employing a velocity based feedback control using the GetRate() function, we noticed that many of our encoder function calls to retrieve data are reporting inconsistent to our expectations.

GetDistance(): Works without flaw. Currently a mainstay in our autonomous code. This is our main reason to assume our encoder is connected properly

GetRate(): Reports 0(zero) no matter the speed of the encoder physically turning

GetPeriod(): Reports inf no matter the speed of the encoder physically turning. This is odd because this function is necessary for GetDistance() to work according to the encoder.c file

We are calibrating the encoder using SetDistancePerPulse()

We have one encoder per side of a WCD style drive, both side reporting the same.

Encoder sampling is not changed from the default 4X

Both A and B channels for both encoders are connected to the Side Car in ports 6,7,9 and 10 Slot 2 in a 4 slot cRio

All data is being viewed using a cout from the WTX console (currently our main method of debugging).

Thanks in advance for any help
Reply With Quote