|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Holonomic Control System
For the first time our team is experimenting with holonomic drive (4 omnis placed at 45 degree angles relative to the frame) and it has fallen to me to code the movement. I have a system in place, but it came to my attention after the initial code was written that different people have different opinions as to how the joystick movements should coorelate to robot movement. As such I'm reaching out to teams who have done this in the past...how'd you guys do it?
At the moment we've got a two joystick design. One stick changes position but not orientation. The robot maintains "front" while moving in whatever direction the joystick tells it to. The second stick controls spin while maintaining position (they won't mix at the moment). This was the first control method that came to mind for me since it allows us to make use of all three degrees of freedom to the greatest extent, but our coach believes that it won't be natural after our years of straight drivetrains. The other suggested method of control is one sticck that drives much as arcade has in the past, but accompanied by a second stick for strafing to take advantage of our added range of motion. Our coach thinks this will be more natural as a transition, but I don't think it has the same potential since we won't be able to strafe will moving forward. So for teams who've been successful in the past, how did yours move? Did you find any particular strengths or weaknesses in the control system? Features you wished you'd had? Thanks in advance for the help! |
|
#2
|
||||
|
||||
|
Re: Holonomic Control System
Quote:
1) 3-axis joystick. Y controls fwd/rev, X controls strafe, Z (twist axis) controls rotation. 2) Halo. 2 2-axis joysticks. Y1 controls fwd/rev, X1 controls strafe, X2 controls rotation. 3) Arcade plus strafe. 2 2-axis joysticks. Y1 controls fwd/rev, X1 controls rotation, X2 controls strafe. Quote:
|
|
#3
|
|||||
|
|||||
|
Re: Holonomic Control System
Quote:
Solution 2 also works extremely well - especially if you've got a bunch of gamers on your team. |
|
#4
|
||||
|
||||
|
Re: Holonomic Control System
Solution 1 (3 axis) is somewhat difficult to use because you may find yourself twisting the joystick slightly during normal operation - the "twist" motion isn't too intuitive for me personally.
Solution 2 (one stick for motion one for reorientation) is my personal favorite. With all control systems, the number one rule is driver preference. What they feel best with is what they get. |
|
#5
|
||||
|
||||
|
Re: Holonomic Control System
Quote:
Since this is your first experience with holonomic, I hesitate to bring this up, but some have found that using the gyro as a fixed-angle reference to provide "field-centric" control (sometimes aka "driver-centric control") provides a superior driver experience with a quicker learning curve. |
|
#6
|
||||
|
||||
|
Re: Holonomic Control System
Quote:
|
|
#7
|
|||
|
|||
|
Re: Holonomic Control System
Quote:
Quote:
And thanks all for the responses, I've been thinking CD was down for a few days now when my Droid wouldn't access it XD. |
|
#8
|
||||
|
||||
|
Re: Holonomic Control System
Quote:
Quote:
|
|
#9
|
|||
|
|||
|
Re: Holonomic Control System
I didn't set out to re-invent the wheel, but it came to that after a small series of events. Basically, our cRio is stuck on last year's bot, so we're using the '07 robot controller and player station mounted to a piece of plywood. As such, I'm writing in C, not LabVIEW (our normal programming language at this point is Java anyway, but I assume there's a class for that as well). And I'm sure it's capable of two dimensional movement while spinning, I just haven't put forth the energy into performing those calculations yet. Good to know that there's a class waiting for me when we transition to this year's real bot though.
|
|
#10
|
||||
|
||||
|
Re: Holonomic Control System
Quote:
Code:
// 3-axis joystick interface to an omni drive
// with robot-centric driver interface
// first define your driver interface,
// in this case a 3-axis joystick:
forward = -Y; // push joystick forward to go forward
right = X; // push joystick to the right to strafe right
clockwise = Z; // twist joystick clockwise turn clockwise
// here is where you would put any special shaping of the joystick
// response curve, such as deadband or gain adjustment
// now apply the inverse kinematic tranformation
// to convert your vehicle motion command
// to 4 wheel speed commands:
front_left = forward + clockwise + right;
front_right = forward - clockwise - right;
rear_left = forward + clockwise - right;
rear_right = forward - clockwise + right;
// finally, normalize the wheel speed commands
// so that no wheel speed command exceeds magnitude of 1:
max = abs(front_left);
if (abs(front_right)>max) max = abs(front_right);
if (abs(rear_left)>max) max=abs(rear_left);
if (abs(rear_right)>max) max=abs(rear_right);
if (max>1)
{front_left/=max; front_right/=max; rear_left/=max; rear_right/=max;}
// you're done. send these four wheel commands to their respective wheels
If you want to add the gyro angle for field-centric control, it only adds a small amount of complexity: Code:
// 3-axis joystick interface to an omni drive
// with gyro (field-centric driver interface)
// first define your driver interface,
// in this case a 3-axis joystick:
forward = -Y; // push joystick forward to go forward
right = X; // push joystick to the right to strafe right
clockwise = Z; // twist joystick clockwise turn clockwise
// here is where you would put any special shaping of the joystick
// response curve, such as deadband or gain adjustment
// use the gyro angle for field-centric control
// "theta" is the gyro angle, measured CCW from the zero reference
forward' = forward*cos(theta) - right*sin(theta);
right' = forward*sin(theta) + right*cos(theta);
// now apply the inverse kinematic tranformation
// to convert your vehicle motion command
// to 4 wheel speed commands:
front_left = forward' + clockwise + right';
front_right = forward' - clockwise - right';
rear_left = forward' + clockwise - right';
rear_right = forward' - clockwise + right';
// finally, normalize the wheel speed commands
// so that no wheel speed command exceeds magnitude of 1:
max = abs(front_left);
if (abs(front_right)>max) max = abs(front_right);
if (abs(rear_left)>max) max=abs(rear_left);
if (abs(rear_right)>max) max=abs(rear_right);
if (max>1)
{front_left/=max; front_right/=max; rear_left/=max; rear_right/=max;}
// you're done. send these four wheel commands to their respective wheels
Last edited by Ether : 16-01-2011 at 13:02. |
|
#11
|
|||
|
|||
|
Re: Holonomic Control System
Ether--
According to the inverse kinematics solution (http://www.simbotics.org/files/first...irectional.pdf), The wheel speeds are also functions of the distance between the wheels and the center of the robot...the labview VI doesn't seem to account for this. Any suggestions? I'm assuming all the axis probably will need to be scaled anyway. |
|
#12
|
||||
|
||||
|
Re: Holonomic Control System
Quote:
I posted a paper (see link below) which goes into more technical detail showing how the wheel positions affect the calculations, if you are interested. It even covers cases where the wheels are not located equidistant from the chosen centerpoint. http://www.chiefdelphi.com/media/papers/download/2722 [edit] the above-referenced paper specifically deals with mecanum wheels, but the same principles can be used to analyze holonomic [/edit] Last edited by Ether : 16-01-2011 at 14:10. |
|
#13
|
||||
|
||||
|
Re: Holonomic Control System
Last year we did a kiwi drive. In order to understand the MATH behind the drive system, we did some research first, and found this whitepaper.
http://www.frcsoft.com/forums/index....ads&showcat=29 Hopefully, you'll see some value to this as well as we did. We also upload and share all of our robot code on frcsoft.com as well. Good luck this season. Chris |
|
#14
|
||||
|
||||
|
Re: Holonomic Control System
When we did it in the past (not for competition) we programmed it the first way you said, with one joystick that controls movement and the other to control rotation. This is actually very intuitive since which ever way you move the joystick, that's the direction the robot will move in. Driver's should adapt to the new control method quite easily.
|
|
#15
|
|||
|
|||
|
Re: Holonomic Control System
This year our team is going with a 3-axis joystick, with a twist handle. Logitech sells these for around $30. We got ours at best buy.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|