View Single Post
  #4   Spotlight this post!  
Unread 18-01-2011, 08:42
nealpatel nealpatel is offline
Registered User
FRC #1777
 
Join Date: Jan 2010
Location: Lenexa, KS
Posts: 8
nealpatel is an unknown quantity at this point
Re: Programming full "holonomic" for mecanums

Quote:
// 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;}
So what is the value of max? It seems you forgot a couple lines of code there.

I am assuming 1.0 but just want to make sure.

And thanks that that pdf, it was really helpful.
__________________
-------------------------------------------------
Neal Patel
Team 1777
Shawnee Mission West
Viking Robotics

e-mail: neal.patel11@yahoo.com