Bumblebot: rollin’ along

How to make a spherical robot, with three degrees of freedom, tumble in a straight line due to center of gravity displacement?

To continue are State Machine discussion…

  • Goal objective exists?
    • Move!
  • Navigation objective exists?
    • Forward!
  • System objective exists and is amenable to bot movement?
    • Plenty of battery!
  • Orientation objective (OO) exists?
    • Current OO?
      • Roll X:Forward 1 revolution.

In order to accomplish this…

  • Current bot orientation (BO: where we are now, angle wise)
    • X: 0, Y: 0
  • Target BO: (where we want to be after our first applied action)
    • X: -90, Y: 0
  • MO: Set Motor orientation to:
    • XF:1.0, XB: -1.0
    • YL:0.5, YR: 0.5
    • ZU:0.5, ZD: 0.5
    • Where 0.0 on the axes is the center for each axis and “1” & “-1” means one radius towards the front, and the 0.5 settings indicate a 1/2 radius.

So, we’re gonna use motor #1 to real up the line at the front, let out the line at the back (motor #2), loosen up the other four motors’ pulleys to give us some slack and tumble forward one quarter rotation.

Saying this again but given the below diagram, having shifted the central control hub (not shown), and therefore the center of gravity forward 1 radius (XF: 1.0, XB: -1.0) and also loosened the other four lines half a radius to allow for slack, the bot should pivot X:Forward until the Gyroscope’s X (pitch) value = -90° (down) while the Y (roll) should remain steady at 0°.

At this point, the X:Back arrow should be pointing straight up, the Z:Up arrow should point forward and the X:Forward arrow should point straight down. The Y arrows remain unchanged.

To keep the bot rolling forward we now need to alter the MO, the motor’s orientation such that:

  • Current BO: Bot orientation
    • X: -90, Y: 0
  • Target BO:
    • X: -180, Y: 0
  • MO: Set Motor orientation to:
    • XF:0.5, XB: 0.5
    • YL:0.5, YR: 0.5
    • ZU:1.0, ZD: -1.0

This should induce the bot to roll one more quarter forward, ending with Z:Up arrow pointed straight down and X:Forward pointed backwards — half way there.

We keep doing this, checking our Orientation object (1 revolution forward) as well as checking our Bot orientation, adjusting our Motor orientation until our Orientation objective has been met.

Roll 1/4th the way, 1/4th more, 1/4th more and one more time until we’re back at the gyroscope’s angles of X:0, Y:0 and we’re one revolution down the road in the X direction.

Now, to code all this up in a language (C++) which I do NOT enjoy.

Note: Technically, there are X (pitch), Y (roll) and Z (yaw) — 3 dimensional space — when comes to working with gyroscopes & accelerometers, however, the Z axis or “yaw” (imagine a record player spinning its record around the Z axis) cannot be easily measured as, well, gravity’s orientation, applied to the record that’s playing, doesn’t change just because you’re spinning it. Typically, a magnetometer is used for this (a compass), and your phone prolly has one (if you’ve installed a compass app), but for now, I’m gonna work on getting this thing to tumble under command.

One thought on “Bumblebot: rollin’ along

Leave a comment