![]() |
Holonomic Drive Mathmatics Discussion
Have we all heard of holomonic drives here? If not let me expound... A holomonic drive uses things called "omniwheels" which are sort of like normal wheels, but with rollers mounted along the wheel which allow it to move perpendicular to the plane of the wheel. If you mount four of these with one pair perpendicular to the other. This allows motion in any direction from any starting position.
Now comes the interesting part, how on earth do you control this darn thing?! Sure you can move in any direction, but this would confuse any mortal driver. So I had the "brilliant" idea of using a gyro to give the robot absolute direction, that is when you push the stick away and it goes away, and vice versa, but in uncomplicating the drivers' job I have complicated my own. Now not only must the joystick inputs be scaled and realigned, but now they must be modified by the gyro's output, too. Oi. So here are some rudimentary equations... true y input = (cos(angle from origin) * original y input) + (sin(angle from origin + 90) * original x input) true x input = (cos(angle from origin + 90) * original x input) + (sin(angle from origin) * original y input) You can see my dillema, especially after you add the z axis, though it should be a good deal simpler... PLEASE ADVISE! :ahh: |
Re: Holomonic Drive mathmatics discussion
I developed a simple kiwi drive (wheels mounted at 45 degree angles) code for a prototype; let’s see if I remember it correctly. I used code very similar to the default 1 joystick code for translational (no spinning) movement. You can put your angle adjusted p1_x and p1_y axis into the translational code. Obviously, the motors have to be linked diagonally.
LF/---\RF ....| | LR\---/RR LF - left front motor LR - left rear motor RF - right front motor RR - right rear motor Code:
RF = LR = Limit_Mix(2000 + p1_y + p1_x - 127);Still it is pretty simple and much like the default code. You need a spin joystick (p2_x). Now left and right sides are pretty much linked. Code:
RF = Limit_Mix(2000 + RF + p2_x - 127); |
Re: Holomonic Drive mathmatics discussion
Another thought I had when thinking about controlling this type of drive system using a gyro to note rotation would be a button on the OI to "Reset" the gyro to zero or something if it got out of whack.
You drive the robot so it faces the correct rotation for zero, for example, and the hit the "Reset" button and it knows that is supposed to be zero again. Also, I was thinking that if you just used a pot for rotation and a joystick for movement, and instead of using gyros for absolute movement, you still have a front, you could do really cool thinks like effortlessly drive in a perfect circle. You would just turn the pot to rotate a little, and then drive left or right. As the robot drives left or right, it will rotate and cause you to drive in a circle. Thought that might be kind've cool. We would also have a foot switch or something to "Disable Rotation" so you could quickly stop the rotation and drive normally. Good luck. |
Re: Holomonic Drive mathmatics discussion
Quote:
|
Re: Holomonic Drive mathmatics discussion
A pretty good decription is available in the article titled "Closed Loop Motion Control for Mobile Robots" by Rich LeGrand. You can buy it for $1.50 here:
http://www.circuitcellar.com/magazine/169toc.htm Includes all of the kinematics equations you need for a four-wheel holonomic robot. |
Re: Holomonic Drive mathmatics discussion
Quote:
|
Re: Holomonic Drive mathmatics discussion
Im not the programmer for our team, but we have had holonomic robots the last 2 years. We have found the best way is to have one joystick sort of the strafe joystick. push the stick forward and it makes the bot drive to the front, and pretty much it goes where ever you move the stick. Then another stick the controls the rotation. We have been devolping a system using a gyro to help correct for slippage. SPAM had a system last year that they could push the stick away from the driver and tbe bot would go away from you.
|
Re: Holomonic Drive mathmatics discussion
wow. I wanted to know how teams did this as I saw a few at GLR with 4 omni wheels that rotated...We used them on the front of the robot and 2 drive wheels in the back and it works out well..except omni wheels crack and break after rough use (competition)...so to anyone who uses them, watch them closely for cracking and sperating...and good luck :D
|
Re: Holomonic Drive mathmatics discussion
Quote:
That was what we called "steadySPAM", here's how it worked: steadySPAM: Given the joystick X and Y, 1) find the joystick angle of rotation, theta 2) find the joystick magnitude Given the robot angular orientation psi, subtract it from theta. From this new theta' and the magnitude, find a new joystick X and Y Use the new joystick X and Y to determine the inputs for the motors. so: ...given joyx, joyy and robot angular orientation wrt the field, theta. 1) First, I'd flip the joystick x-axis, since it hurts my head to have values increasing to the left, then, move the origin to 0,0: joyy1 = joyy-127 joyx1 = (255-joyxx)-127 Next, get the joystick angle of rotation: note: ...must trap divide by zero if joyy = 127 and joyx = 127, then joytheta = 0 // neutral else if joyy = 127, then if joyx <= 127, then joytheta = 90 // right else joytheta = -90 // left else joytheta = arctan(joyx1/joyy1) and the magnitude: joyspeed = sqrt(joyy1*joyy1 + joyx1*joyx1) You can get the robot psi by using a yaw rate sensor and integrating. We defined theta and psi similar to, but not quite like a compass. Straight up field is 0deg. Rotating to the right the angle changes from 0 to 180 deg. Rotating to the left the angle changes from 0 to -180deg. Subtract psi from theta, joytheta' = joytheta - psi The new joystick x and y are: joyx' = 255 - (joyspeed*sin(joytheta')+127) joyy' = joyspeed*cos(joytheta')+127 (Use these to calculate the motor outputs. You can use the default code mixing equation, but we included an additional 45deg rotation on top of that.) However, using robotaddicts equations, you can do something similar and avoid an arctan and a square root: ...given joyx, joyy and robot angular orientation wrt the field, theta. 1) First, adjust the joystick axes: joyy1 = joyy-127 joyx1 = (255-joyxx)-127 2) Next rotate the joystick axes into the orientation of the robot. joyy2 = joyy1*cos(theta) + joyx1*sin(theta) joyx2 = joyx1*cos(theta) - joyy1*sin(theta) Now, get back to a typical joystick set of axes: joyy' = joyy2+127 joyx' = 255- (joyx2+127) This took care of translation. For rotation, we had a separate stick and applied it similar to "The Lucas" Thanks, Eric |
Re: Holomonic Drive mathmatics discussion
One quick comment that I would have is to also make a back-up drive system, which drives whatso-ever direction from the point of view of the robot. Your drivers I hope played enough video games to get this figured out (easily).
Just in case.... (and because your drivers actually might like this better, and because your absolute positioning system is going to drift, and it will be a hassle for drivers to figure out when to reset. etc.) |
Re: Holomonic Drive mathmatics discussion
Quote:
|
Re: Holomonic Drive mathmatics discussion
This drive system is so weird to program. We tried it with a normal robot this year, but didn't have enough time to finish. If you write your own code for finding the magnitude and direction of the joystick, avoid using arctan and square root functions at all costs (or make your own versions of them). We wrote our own square root function, but found out a little too late that an arctan2() call chews up 12% of your code space.
|
Re: Holomonic Drive mathmatics discussion
Quote:
Eric |
Re: Holomonic Drive mathmatics discussion
Quote:
I tried simulating a 3 wheel holonomic base, and it was virtually (no pun intended) uncontrollable without some sort of PID. I guess 4 wheels shouldn't be quite as bad though. |
Re: Holomonic Drive mathmatics discussion
Quote:
|
| All times are GMT -5. The time now is 07:46. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi