danfan
#1
This is from a Purdue article explaining Odometry: Odometry - BLRS Wiki (purduesigbots.com)
I have questions on two things:
In step 3, how does one update the previous values of the encoders? By resetting them back to 0?
In step 4, what is the difference between deltaLr and deltaL, and deltaRr and deltaR
You would update previous encoder values by setting them to your encoder value variable after they have been used
example
lEncoder = RotationL.position(degrees);
bEncoder = RotationB.position(degrees);
distL = change in encoder values convert to rad;
distB = change in encoder values convert to rad;
prevLE = lEncoder;
prevBE = bEncoder;
DeltaR and DeltaL are the change in encoder values in radians while DeltaRr and Delta Lr are the change in distance.