acmerobotics / road-runner-quickstart

FTC quickstart for https://github.com/acmerobotics/road-runner
BSD 3-Clause Clear License
168 stars 855 forks source link

Localization Method #55

Closed Mihneaghitu closed 4 years ago

Mihneaghitu commented 4 years ago

I cannot seem to find a proper localization method for TrackWidthtTuner. I am using encoders, I think I did VelocityPIDTuner and StraightTest ok and in the code it says to set a localization method that does not rely on encoders for determining position.As I saw StandardTrackingWheelLocalizer relies on encoders and if I use a basic Localizer, I do not know how to implement the three methods (getPoseEstimate, setPoseEstimate and update). Any help would be extremely much appreciated.

rbrott commented 4 years ago

The default localizer and the tracking wheel localizer both do not use drive encoders for heading computation.

Mihneaghitu commented 4 years ago

Do I need to change something in the StandardTrackingWheelLocalizer or is it ok as it is (because my configuration is 4 mecanum drive wheels, not as it shows there) ?

rbrott commented 4 years ago

You should not use StandardTrackingWheelLocalizer if you do not have tracking wheels. The default localizer uses the drive encoders which appears to be what you need (i.e., no call to setLocalizer() is necessary).

Mihneaghitu commented 4 years ago

So the setLocalizer() method doesn't need to appear in the mecanum drive hardware config or in the TrackWidthTuner class if using the default Localizer?

rbrott commented 4 years ago

No

Mihneaghitu commented 4 years ago

Thank you so much for the responses, they helped a lot!