Skip to content

Trouble with Tank Drive distances (inPerTick isn't linear?) #501

@a-f-waterhouse

Description

@a-f-waterhouse

Hi! So I posed this question on the FTC discord and got told to open an issue here :)

I am using roadrunner for a Tank Drive, which has 2 drive motors, and I'm using the encoders in those for my localization.
My theoretical value for InPerTick is 0.07928 (from calculation based on motor + wheel diameter etc.), and this is close to some measured values of it, however my issue is that different distances result in different values form InPerTick (within about a +- 0.01 range).

In practice, while using the theoretical value of 0.07928, this means that the robot can travel most distances accurately, but not small (<10ish inches) or large (>30ish inches) distances [the error becomes more apparent for increasingly smaller/larger distances]. Based on the field view on FTC dashboard, the robot doesn't register this error as error - it thinks it has gone the correct distance when it is in fact much more/less.

My other values from the tuning process are:
kA: 0.00001
kS: 3.998110439966781
kV: 0.00481769727090664
trackWidthTicks: 126
ramseteBBar: 5
ramseteZeta: 0.7

Only things I can think of worth noting from those is that ramseteBBar is quite high (at lower values it turns far too aggressively) and I've also limited the maxWheelVel to 20, but I am not sure whether either of those are linked at all :]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions