SNS - Wheel Encoder - #117
Conversation
| if (voltage > kVoltageThreshold && previous_voltage_ < kVoltageThreshold) { count_++; } | ||
| previous_voltage_ = voltage; | ||
| return core::Result::kSuccess; |
There was a problem hiding this comment.
If we keep getting a value over the thresh, at what point do we think the encoders aren't working. Ik nav pays a lot of attention to these so want to make sure we report any possible failure asap.
There was a problem hiding this comment.
Yeah these are our singular most accurate sensor I think. If these give faulty data, we'll only spot it if it's disagreeing with our other data but this data being unreliable could potentially leave us without a ground truth
There was a problem hiding this comment.
it depends on velocity. we can probably calculate a maximum high period before we stop trusting it based off of minimum velocity we expect to hold
| return core::Result::kFailure; | ||
| } | ||
| const core::Float voltage = *optional_voltage; | ||
| if (voltage > kVoltageThreshold && previous_voltage_ < kVoltageThreshold) { count_++; } |
There was a problem hiding this comment.
will fix this, however can you remind me what the reason for this is
| if (voltage > kVoltageThreshold && previous_voltage_ < kVoltageThreshold) { count_++; } | ||
| previous_voltage_ = voltage; | ||
| return core::Result::kSuccess; |
There was a problem hiding this comment.
Yeah these are our singular most accurate sensor I think. If these give faulty data, we'll only spot it if it's disagreeing with our other data but this data being unreliable could potentially leave us without a ground truth
| @@ -0,0 +1,24 @@ | |||
| #pragma once | |||
| #include <memory> | |||
| #include <optional> | |||
wheel encoder support