Servers by jDrones

Alternate encoder configs

(mroberts) #1

Hi, with the new encoder functionality, is it possible to run just ONE encoder off (for example) one of the motor gears on a standard RC-type car and get a more accurate speed measurement? I know that wouldn’t give the yaw.

I assume you’d just active one, and set the y=0. Will the EKF be able to handle / use that?

Also, at the moment, the quadrature encoders use two input lines for each one. Do you think there’d be a more general desire for support for more single-line encoders (assuming you’re using a “normal” steering vehicle where detecting reverse isn’t relevant)?

(rmackay9) #2

I have never tried with just one encoder but I suspect the EKF will use it. I’ve asked Paul if he can comment.

As long as the vehicle never goes backwards, the single line encoder might work OK. If the vehicle can go backwards though and we have no way to sense that with the encoder… I think it would cause problems.

(priseborough) #3

Mathematically there is no reason why it shouldn’t work. Use the midpoint between the two driven wheel hub coordinates when setting WENC_POS_X,Y,Z

(mroberts) #4

Thanks. I’ll give it a go and report back. I’m hoping this will give better speed accuracy at low speeds.

(Pavlo Kolomiiets) #5

Currently, wheel odometry in Ardupilot doesn’t compute yaw even with 2 encoders installed. Moreover, there is a bug (link) which always rejects readings from one of 2 encoders, so only one is actually used.

(rmackay9) #6

Thanks for the reminder on the wheel encoder issue. Somehow I missed that so I’ve asked Paul if he can have a look.
I hope that if we really are only using one encoder that we can fix that.