2
$\begingroup$

I have a robot with two motors A and B connected to wheels 21.6mm in diameter. The motors move in steps, and there are twenty steps for each complete revolution of the wheel. To make the robot move forwards, I turn on A and B in the forward direction and have it rotate a number of steps. To make it move backwards, I turn on A and B in the reverse direction. To get it to turn left, I turn on A and turn off B. Similarly to get it to turn right, I turn off A and turn on B. Using this scheme, I can get the robot to move in any direction.

My question is this: is it possible to transform the steps of motor A and motor B into the X/Y coordinates for the robot? For example, if I move the robot forward 10 steps, turn right 10 steps and move forwards again 10 steps can I calculate the X/Y coordinates of the robot? Assume that the robot starts at point 0,0.

$\endgroup$
3
  • 1
    $\begingroup$ Are you asking whether sufficient information about the problem is stated, or about your own abilities? Show the results of giving the example a try! $\endgroup$ – greybeard Aug 19 '20 at 5:53
  • 1
    $\begingroup$ The only additional information you may need is the distance between the two wheels to compute properly the rotation. You may then assume the static wheel is the center of the circle described my the mobile one. $\endgroup$ – Optidad Aug 19 '20 at 9:10
  • $\begingroup$ @Optidad. Agreed. Or turning wheels in opposite directions for turns. $\endgroup$ – TEMLIB Aug 19 '20 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.