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
Use Wheel Encoders to Calibrate
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Use Wheel Encoders to Calibrate
Hello Alan,
Which command are you using to drive the robot?
Are you using the firmware mode or the API mode?
Which command are you using to drive the robot?
Are you using the firmware mode or the API mode?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Use Wheel Encoders to Calibrate
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
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