Page 1 of 1

Use Wheel Encoders to Calibrate

Posted: Mon Mar 13, 2017 5:54 pm
by fvc.alan
Back to things not going in a straight line, any hints on how we can use the set motors command along with reading the wheel encoders to calibrate/adjust so we can make the Allcode go in a straight line?

Cheers,
Alan

Re: Use Wheel Encoders to Calibrate

Posted: Tue Mar 14, 2017 11:06 am
by Benj
Hello Alan,

Which command are you using to drive the robot?

Are you using the firmware mode or the API mode?

Re: Use Wheel Encoders to Calibrate

Posted: Tue Mar 21, 2017 8:54 am
by fvc.alan
Hi Ben,

I want to use SetMotors so that everything isn't locked up while it's moving. I can get feedback from the wheel encoders, and think I know what to do with that info (I've never worked with things that move before!)
(Regarding the wheel encoders, is there a further API guide that isn't in the course book? I found that one by looking in the python code.)

Thing is, if the buggy is moving and I request the encoder values one at a time (left then right), the delay in communication means the values will never be correct. Is it possible to request both encoder values in a single command to get simultaneous values? This might allow me to perform what I'm thinking seems like a constant calibration to keep the buggy in a straight line.

That actually got me thinking further, if that did prove to be possible is it possible to do similar with the IR sensors? One of the issues when trying to drive round a maze is (I think) the fact that each sensor in turn needs to be queried over bluetooth, if they could be queried in a single command with a list/array returned that might speed everything up? Or is there already a way of doing this that I've missed?

Cheers,
Alan