# Omnibot

Drive in preprogrammed paths.

This is probably my oldest robot. I was waiting to post it until it did something interesting. Right now it can follow preprogrammed paths. In the past I've had it remote control with RC gear from a helicopter. I plan to add a gyro and other sensors to make complex movements more predicable.

Omni Bot Math

One of the strange things about these omni wheels is the the way they need to slow down as the angle between the direction of travel and the direction the wheel is rolling increases. The greater the angle, the slower the wheel needs to turn without causing the robot to rotate. A wheel at 90 degrees to the direction of travel needs to stop in order for it not to rotate the robot.

The amount of slowing can be expressed in the following equation:

SpeedOfWheel = SpeedOfRobot * cos(angleOfWheelFromDirectionOfTravel)

If you use zero degrees for the angle, you see the speed of the wheel and the speed of the robot are the same. At ninety degrees, the formula accurately predicts the need for zero speed of the wheel.

A kind of bazaar effect of this is, it is possible to increase the speed of the robot by aligning the wheels away from the direction of travel.

The relationship described in the equation quickly breaks down if used to predict robot speed. Rearranging the above equation, one gets:

SpeedOfRobot = SpeedOfWheel / cos(angleOfWheelFromDirectionOfTravel)

The above equation does hold reasonably true for relatively shallow angles but when the wheels are at large angles to the direction of travel, the force of friction soon plays a large role to limit the speed of the robot. If not for friction, a robot could be driven at very high speeds just by angling the wheels away from the direction of travel. At reasonable angles, the speed of the robot does increase in a very noticeable way. You can see how the wheels need to slow down as they point away from the direction of travel in both of the attached videos. I used the above equation to compute the wheel speeds.

While many of my robots have been inspired by OddBot's robots (or designed by OddBot as with my Rover 5 robots), I built this robot before OddBot's recent creation of his Scamper robot. My inability to convince OddBot of this counter intuitive relationship between robot speed and angle of wheels made me want to document the some of the mathematics behind controlling these type of robots.

No Really, The Math is Correct!

It took several carefully controlled experiments with wheel speed vs angle of wheels to convince myself the above equations are reasonable models for omni wheeled robot behavior.

I plan to make a video, in the near future, which will hopefully make this counter intuitive property of omni wheels more intuitive.

Future Plans

I also plan to add sensors to allow the robot to navigate autonomously and to better control its ability to rotate while traveling in a desired path.

I think it would be fun to come up with some sort of choreography using this omni bot and the my Mecanum wheeled robot.

Construction

As you can see, the base of the robot is just a piece of 1/8" plywood. I used a Propeller Proto Board as the controller for the robot.

The wheels are made by Vex. Unfortunately they come in packs of two wheels so in order to purchase three wheels, I had to buy to packages of the Vex omni 'wheels. Since I didn't want just one extra wheel, I ended up purchasing three sets of wheels so I had enough to make a second three wheeled robot.

While I purchased the 4' wheels, Vex now makes some pretty cool 2.75" omni wheels. I have some of the smaller wheels waiting to be added to a deserving robot.

I think it was my desire to get the Vex wheels quickly incorporated into a robot that made me decide to use Dynamixel AX-12+ actuators as the drive motors. I didn't want to permanently alter the Vex wheels so I made some adapter hubs from plywood and nylon bolts.

I keep intending to rebuild this robot with less expensive (and hopefully faster) motors. I think there are many applications where the relatively expensive Dynamixel servos are worth their price, I don't think using them to drive wheels is one of those worthwhile applications.

Here's a picture of the bottom of the robot showing the three expensive motors.

As I mentioned earlier, this is one of my first robots I ever built (the only one previous to this was a BOE-Bot). I still think this is a fun bot and it deserves to have better sensors and to have its looks spruced up a bit.

Maybe some NeoPixel LEDs would jazz up the looks abit.

Code

I'm not sure if this will be useful to anyone, but here's the method to calculate the wheels speeds based on direction of travel, speed of travel and how fast the robot should spin while traveling.

```PUB FSetSpeeds(fDirection, fMagnitude, fRotation) | localIndex, fLocalSpeed[3], {
} localSpeed[3], rotation, maxWheel, minWheel
'' fDirection, fMagnitude and rotation need to be floating point numbers.

fLocalSpeed[0] := FMath.fMul(fMagnitude, {
} FMath.Cos(fDirection))
fLocalSpeed[1] := FMath.fMul(fMagnitude, {
} FMath.Cos(FMath.fSub(fDirection, f120r)))
fLocalSpeed[2] := FMath.fMul(fMagnitude, {
targetAngle := FMath.FRound(FMath.degrees(fDirection))

rotation := FMath.FRound(fRotation)

MultiRound(@localSpeed, @fLocalSpeed, 3)
FindFastestSlowest(@localSpeed, @maxWheel)

if localSpeed[maxWheel] > ||localSpeed[minWheel] and localSpeed[maxWheel] > MAX_SPEED ' over limit high
elseif localSpeed[minWheel] < MIN_SPEED  ' over limit low
else

MultiRound(@localSpeed, @fLocalSpeed, 3)

AssembleSpeedPacket(localSpeed[0], localSpeed[1], localSpeed[2])

```

## Comment viewing options

I finally got around to making a video about the relationship between the angle of the wheels to direction of travel and the speed the wheels need to be turning to compensate for the angle.

I posted the video in with this tip/walkthrough.

Nice! Now just to make it spin while doing a circle and finish off with a tail wag ;) I've tried spinning and moving forward like that by hand. Feels like pirouetting flip. But no crash at the end!

I'll have to pass on the tail wag since it presently doesn't have one but I'm pretty sure I could make it drive in a circle while rotating.

Spinning while driving straight was just a matter of trial and error to find the right combination of rotational speed to add to go with how fast the robot was changing its direction of travel.

While I found a combination that allowed the robot to travel straight while spinning on carpet, then I tried the robot on a hard surface, the course the robot took was far from straight.

What I really need to do is follow your lead and add a gyro to the robot. A gyro should make all sorts of fun things possible (I think I already said this in a comment on your robot page).

I agree. Being able to set a rotational rate is pretty sweet. I moved the gyro to my Rover 5 base now and it's been a bit of a pain to get working with new code. My 2 wheel code just isn't working the way I want. I'm thinking of putting a Futaba 401 on there to experiment with and get some ideas. I'd also like to experiment with heading hold vs non heading hold. But I might play with the encoders a little first. I've never read from an r/c device, gyro or reciever. Another adventure though :)

If you don't thank me then your robot should. It sure looks like it deserves to up and running about exterminating humans having fun.

I really like the look of your robot. I keep hoping to figure out what to use as a sort of shell for my omni bot.

You ought to make a page for your robot and and describe the problems you're having. If you post your code, someone might be able to identify the cause of your glitches.

Duane, you have shamed me into going back to work on my omnibot which has been "on hold" for about 12 months.

Basically I have to sort out the sound card plus identify a "random" glitch in the navigation.

I do not know wether to thank you or not!

I have the smaller version of those VEX omniwheels (2.75") for a future project I haven't gotten to yet. I really love the quality of them. I also bought some square stock to use as a shaft, but I really like your idea of bolting a hub to it. I'm going to steal borrow that idea, as I was worried about wearing out the square hole with metal against plastic. Nice bot also, you keep tempting me to try a Propellor.  :)

If I were to do this again, I wouldn't worry so much about marring the wheels.

I used the hub because the Dynamixel motors didn't lend themselves to adding an axle easily.

When I use these wheels with different motors, I'll probably drill out the square hole to make room for whatever axle I'm using. (Though I do like how the hubs look.)

I am concerned about how to add some sort of set screw. The Mecanum wheels had room to allow me to drill through the radius of the wheel but I can't think of a good way of adding a set screw to these omni wheels of either size.

If I had square stock to use as an axle, I think I'd used it.

And you should try the Propeller. It's liberating (and challenging) to have multiple processors working together. I think the Propeller adds an extra dose of fun to a robotics hobby.