View Single Post
  #14   Spotlight this post!  
Unread 24-01-2010, 15:03
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Mecanum Wheels Programming

Quote:
Originally Posted by chsrobotics3283 View Post
And what other additonal things do you need to do to have mecanum wheels?
The holonomic drive vi wants three inputs: magnitude, direction, and rotation.

Magnitude is a value from 0 to 1 describing how fast you want to move.
Direction is an angle in degrees, with zero being straight ahead.
Rotation is -1 for full speed counterclockwise, +1 for full speed clockwise.

Rotation could be taken directly from a joystick axis, but magnitude and direction are a vector that you'll have to derive based on how you want your joystick control to behave.

We made our own SubVI to replace the example's Joystick Read. It uses the difference between the left and right joysticks' y axes to determine rotation. The average of the y axes and the average of the x axes go into a rectangular-to-polar coordinate conversion (the Re/Im to r/theta vi), and the angle from that conversion is further scaled and rotated to match the "0 is forward" requirement of the holonomic drive vi.
Reply With Quote