Lesson 05 · 60 minutes

Sideways Is a Direction

Mecanum wheels and adding arrows

Today's goal

Predict how the robot will move from the direction of each wheel, then drive a path a normal car cannot.

Ideas in this lesson

Sense → Think → Do

DO gets interesting. The robot works out four wheel speeds from three wishes: how fast forward, how fast sideways, how fast turning.

How the session runs

  1. Look at the rollers: they form an X seen from above. Draw each wheel's push arrow on a whiteboard.
  2. Act it out: four kids are wheels, each pushing at 45 degrees. Who pushes which way to go sideways?
  3. Drive with the app's pad: w forward, d strafe right, q and e spin. Feel the difference between strafing and turning. With an IMU, the robot holds its nose steady while you strafe.
  4. Try the two-stick controller page (sticks.html): the left stick sets the speed and turns, the right stick picks which way to slide, so it can slide and turn at the same time. Move and turn at the same time.
  5. Program tab: open 'Example: crab box' and RUN it: slide right, forward, slide left, back, nose always pointing the same way. Then build a crab zigzag yourself: a repeat with 'drive toward 45 degrees' and 'drive toward -45 degrees' inside.
  6. Run circle strafe face-in (pk, or 9 on the remote) with a person standing at the middle. The robot circles them, staring at them the whole way.
  7. Use the Demos tab size slider to shrink circle strafe to 25% for small rooms. Look at its preview: the ticks show where the nose points.
  8. Program tab: 'Example: J-turn there and back' drives a straight line while the body spins 180. The path stays straight even though the robot is turning.

Try this

When it goes wrong

What you seeWhat it means
Strafing drifts forward or backwardFloor or roller differences. Calibrate (lesson 4); on a slippery floor it gets better, on thick carpet worse.
The robot spins instead of strafingA motor is wired backwards or on the wrong corner. Check with t0-t3.
A move slower than expectedThe robot slowed the move to keep every wheel under its top speed (it says 'move: slowing to N%').
Notes for the grown-up

The 'four kids as wheels' activity is worth the chaos. Vectors land far better acted out than drawn.

Ages: K-5: 'walk sideways while looking at the teacher', remote driving, the crab box program. 6-12: write the wheel equations (forward + strafe + spin, forward - strafe - spin, ...) and build a program that needs all three at once.

Materials: Robot, IR remote, app (Drive, Program and Demos tabs), whiteboard, open floor about 2 m by 2 m.

← Every Robot Is DifferentToo Much, Too Little, Just Right →