Rigging a three wheel robot drive

Hi people. I’m trying to animate a kiwi-drive, like this: https://www.youtube.com/watch?v=QNbblMEUm44 .

What I want it to do is that, if I move my robot, the wheels automatically turn as they should.

I’ve been trying to do it with a transformation constraint, having the wheels follow a transformation based on an empty which is child of the robot at the location of the wheels . Basically, just maping the location on an axis to the rotation of the wheel. But this doesn’t work, because if I move the robot, the coordinate system of the empties stay the same relative to themselves.

Do you guys have any idea how to do this? I recall I can make this by scripting it, but it must be a simpler way!!

Here’s the blend. The front wheel works okay. However, if I rotate the robot, and then move it, it stops making sense.
http://www.pasteall.org/blend/34409

You need to switch to Drivers, not transformation contrasts.

A wheel moving down its own rotation axis should rotate at “distance moved” divided by “radius of wheel”. remembering drivers work in Radian not degrees, s a wheel of 2 units diameter should do one full turn every 6.284 units the wheel moves forwards.

The other wheels, where the axle is at 30 degrees to the direction of movement will turn at “distance moved” multiplied by sin(pi / 6) divided by the radius of the wheel. For complex rotations will need to know the angle of the axle to the direction of movement to use instead of (pi / 6), which is 30 degrees.

I cannot look at this until I am back in the UK next week, but this should get you started.

Cheers. Clock.

Thank you for your answer. The problem is that there is not a direct connection between the coordinates of the robot and the rotation of the wheel. The robot might be at the exactly same position and have different rotations on its wheels, because it got there following a different path.

Yes I understand that, if you move the robot a set distance then move it back along the same path the wheels will be as they were, but if you move it a random shaped path and it ends up back were it was, the wheels will not be as they were, because they have varying sine or cosine values applied, same would be true if you rotated the robot about its centre axis. I will look at this next week for you, I am overseas just now, with limited time and limited internet.

Cheers. Clock.

This would all very easy if there ways a way to access the displacement of the wheel when the robot moves. But since it is parented to the robot, when the robot rotates, the wheel “stays in the same place”. I find it a bit absurd absurd there is no way to do this easily, but it sure seems to be the case. I’m gonna keep working on this, as unfortunately I have a deadline to meet.

Since my deadline has been extended, I’ve been trying more on this, without sucess. I found out that even a freaking simple car wheel system is complicated to do in blender, usually involving using a script to calculate the lenght of the path we want the car to travel. I find it mindbogling that there isn’t a simple way to do this already in a program that was made for animators in 2015. Freaking 2015.

You seem to be defeated by your own logic here, if I might make so bold. If the wheel is parented to the robot, then you know where the robot is therefore you know how far the robot has moved in either X, Y, Z or any combinations of those. Since the wheel turns one revolution for each pi (you can use “pi” in a Driver) multiplied by the diameter of the wheel, it’s a simple driver that will determine the revolution of the wheel from the movement of the robot. So if the robot moves 6.184 units and the wheel is 2 units in diameter, it turns one whole turn (2 * pi radians as you must work in radians with drivers). If the robot moves 3 units in X and 4 in Y, then it has moved 5 in total along its straight path (Pythagorus’ theorem - perhaps you should have paid attention in school maths lessons after all), from this you can derive any movement from the X Location, Y location and Z location of the robot, and thus the movement of the wheel, then put in your driver the radius of the wheel and “pi” and you have your rotation.

BTW determining the rotation of a wheel over a complex path or terrain IS NOT a simple exercise, never has been and never will be, but with some basic maths and tactical use of drivers, it can be made as easy as possible. You might also experiment with a simple Transform constraint, whereby the rotation is determined by the X, Y and Z movements with appropriate values for the amount of rotation produced by each axis of movement. It’s not as good as a driver, but it will get you FREAKIN’ started!

Cheers, Clock.

Mate, thing is I’ve done all that and more, and math is not a problem for me as you seem to imply. That’s all very fine and dandy, but when you rotate the robot over the z axis AND move it, that’s when suddenly it’s not so simple anymore.

I do not recall implying maths was a problem for you, however, I maintain my point - it’s not easy and never will be.

Just this remark mate “Pythagorus’ theorem - perhaps you should have paid attention in school maths lessons after all”.

I believe it could be pretty easy if there was a tool that calculated the displacement of a wheel over an arbitrary axis that rotated as the wheel orientation changed.

Thank you very much for the link, I’ll check into it!

Sorry - that was a joke!

I think this is similar to the “car going around curve” problem. It has something to do with blender having no obvious way of getting back deltas (change in distance or rotation) between frames. Everything is fine and dandy for calculating movement in a straight line, but as soon as that vector changes, the measured distance in one direction isn’t of much use.

For calculating roll on a typical wheeled vehicle one good “hack” is to use a path for animation, and then find a script or plugin to calculate path distance and therefore it’s also possible calculate distance along a path and how far the wheel should turn. However for this specific problem even that may not work, as the angle of the wheels can change in relation to the path. (Robot with this drive could turn while also making a “strafing” type side-skew movement.)

Seems like a challenging thing to figure out, but it’s a bit beyond me. :s