Loginskip to content

December 27th, 2006

Omni Teaches Physics

omnipic.jpg

Ever since I saw Steve Hassenplug’s “Omni” (see also in NXTLOG), I wanted to make one of my own. Last week, I finally obtained enough wheels via Bricklink to make the three “omni-wheels” needed. Working on Omni, I soon realized that controlling the three motors is actually the toughest problem with this type of robotic motion. If you want Omni to move in any one direction, you should (in general) operate all three motors in varying speeds. The videos showing Omni in action suggest that Steve controlled each motor independently using a second NXT sending BT commands to the Omni NXT brick. I wanted to use my PSP-Nx PS2 Controller Block and maneuver Omni with a wireless PS2 controller. In this post, I’ll describe how this is done and how Omni can be used to teach students something on elementary rigid body kinematics.

Omni is controlled by three motors. Each motor rotates one “omni-wheel”, comprised of six pairs of freely rotating wheels, as seen in the image above. The “omni-wheel” allows free translation in the direction perpendicular to the motor motion, or in other words, the velocity of the motor perpendicular to the wheel is undetermined. The NXT controls the velocity (or equivalently the “power” in NXT-G terminology) of each of the three motors. Let’s denote the velocities of the three motors by V1, V2 and V3, pointing clockwise as you look on Omni from above (see yellow arrows in image). Notice that only V1 is in the direction of one of the axes (X axis), the other two have components both on the X axis (from Omni center to the right in the picture above) and on the Y axis (from Omni center to the top of the image). The respective perpendicular velocities at each wheel will be denoted with primed symbols – V1′, V2′ and V3′ – , and we will use the convention that these are positive if the wheel tries to move “toward the center” of Omni. We wish to move the Omni in some velocity V at some particular direction, given by an angle θ (This is the greek letter “theta”, not the number eight. Physicists like to denote angles by greek alphabet) from the “forward” direction (see image). For the sake of clarity, I’ll ignore the difference between linear velocity (of Omni as a whole) and angular velocity (set to each motor), since the two are linearly proportional (where the proportionality constant is just the radius of the omni-wheel).

In a rigid body translation without rotation means that every point on the body has the same velocity as the center of mass of the whole body. Thus, for each motor we have two equations relating the velocity (e.g. V1) and the perpendicular velocity (e.g. V1′) with the projections of Omni velocity in the X and Y directions – V sin(θ) and V cos(θ), respectively. Hereafter I’ll denote these two velocity components simply as Vx and Vy.

For the first motor (the one in the forward direction) we have:

Vx=V1
and
Vy=–V1′

For the second wheel:

Vx=–V2 cos(60°) – V2′ cos(30°)
Vy=–V2 sin(60°) + V2′ sin(30°)

And finally for the third wheel:

Vx=–V3 sin(30°) + V3′ cos(30°)
Vy=V3 cos(30°) + V3′ sin(30°)

These set of 6 unknowns (V1, V2, V3 and the three primed velocities) and 6 equations has exactly one solution:

V1=Vx
V2=–Vx / 2 – Sqrt(3)/2 Vy
V3=–Vx / 2 + Sqrt(3)/2 Vy

Where Sqrt(3) is just the squared root of 3.

Can we verify that this velocities indeed correspond to translational motion without rotation? Well, one can easily convince himself that V1+V2+V3=0, and since all motors are connected to equal size beams then this is indeed the requirement for no rotation. Adding a fixed angular velocity (Omega) is trivial, since that it is exactly as adding some additive factor to all three motor velocities, i.e. V1=V2=V3=Omega.

The program which implements this calculation is found here. I used the mindsensors.com PSP-Nx PS2 Controller Interface sensor and my respective NXT-G block (available here) to get three readings from the PS2 controller – the right joystick X and Y values (rescaled between -33 and +33) are used as Vx and Vy, and the rescaled left joystick X value gives the additive angular velocity. As you can see from the video here, this works great, allowing Omni to move without rotation in all directions with the other joystick rotating it on its axis.

What’s next? The above description solves the motion in an “internal coordinates system”, which is coupled to the Omni. A more elaborate program can move the robot in an “external coordinates system”, so one can move the Omni in some direction AND rotate it around its axis simultaneously. This can be done, for example, if the robot “remembers” its orientation compared to the “world” coordinates system, or uses a compass sensor and some online trigonometry to adjust its motors.