|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: FTC: Using the Hitechnic SuperPro Prototype Board
Quote:
One suggestion is don't draw too much power from the motor controllers at once (like putting full throttle on a six motor drivetrain instantaneously) since that does in fact mess up the encoder count. |
|
#2
|
|||
|
|||
|
Re: FTC: Using the Hitechnic SuperPro Prototype Board
Quote:
My FTC team used encoders to achieve infinite rotation on our swerve drive last year, and we had no issues with the encoders returning the wrong position. A few more questions - How old are the encoders you're using? Some of the older packages they made used adhesive backing, which I've seen come loose. When deciding the encoders are returning incorrect values, are you looking at the value itself, or just seeing the results of an action using the encoders? If you are observing the robot driving different distances, but the encoder values are consistant, your issue may be rooted in how your code decides it is "there". |
|
#3
|
||||
|
||||
|
Re: FTC: Using the Hitechnic SuperPro Prototype Board
Can you guys show some sample code?
When I say "its random" I mean when they enter autonomous mode sometimes the robot moves correctly, other times it never stops moving, sometimes it moves the opposite direction, and sometimes it barely moves. Many of my teams use LabView and they always include a "reset encoder" module block before and after every move forward segment of code. I'd love to iron out these issues and be able to communicate them back to other coaches who are also frustrated about it. Has anyone used the IR sensors attached to the prototype board rather than the IR sensor from hitechnic? |
|
#4
|
|||
|
|||
|
Re: FTC: Using the Hitechnic SuperPro Prototype Board
I don't have access to LabView or RobotC currently but the pseudo-code should be:
Code:
reset encoder;
while (encoder<some_value) //assuming positive is forward
{
motors go forward;
}
motors stop;
Quote:
The code above has no feedback control and with a reliable reasonable drivetrain, it should consistently be +/- 1 in. per 2 feet. |
|
#5
|
||||
|
||||
|
Re: FTC: Using the Hitechnic SuperPro Prototype Board
Ok. I'll see if the robot c team have the same in their code.
Is there any way to get more precise/repetitive than +/- 1in per 2 feet? |
|
#6
|
|||
|
|||
|
Re: FTC: Using the Hitechnic SuperPro Prototype Board
Quote:
Also, in most scenarios +/- 1 in. is more than enough since the field usually have different elements (such as taped lines / walls / IR sensor) to "reset" the robot. With "advanced" implementation techniques (such as mounting the IR sensor on a servo, having multiple IR sensor from different angles, etc.) the IR sensor can be extremely beneficial; even just directly polling from the IR sensor and drive till a certain value is reached is accurate, as long as there is a shield to block out ambient light. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|