View Single Post
  #14   Spotlight this post!  
Unread 07-01-2015, 22:22
Mecanum Wheel's Avatar
Mecanum Wheel Mecanum Wheel is offline
It's spelled mecanum
AKA: Bengt Ilon
no team
Team Role: Mechanical
 
Join Date: Jan 2015
Rookie Year: 2004
Location: Sweden
Posts: 17
Mecanum Wheel has a reputation beyond reputeMecanum Wheel has a reputation beyond reputeMecanum Wheel has a reputation beyond reputeMecanum Wheel has a reputation beyond reputeMecanum Wheel has a reputation beyond reputeMecanum Wheel has a reputation beyond reputeMecanum Wheel has a reputation beyond reputeMecanum Wheel has a reputation beyond reputeMecanum Wheel has a reputation beyond reputeMecanum Wheel has a reputation beyond reputeMecanum Wheel has a reputation beyond repute
Re: Mechanum with XBox Controller

Quote:
Originally Posted by LFRobotics View Post
As of now our team has the XBox controller working using ArcadeDrive. But we now want to use mechanum wheels.. I have an okay understanding of how to do this with a joystick using x, y, and twist but how do I do it with an XBox controller. I don't even know how I would begin to structure the code.

ANY help would be GREATLY appreciated! THANKS!
Quote:
Originally Posted by lynca View Post
What size mechanum wheels and what gearbox ratio ?
Quote:
Originally Posted by Ethan_P View Post
for mechanum wheels, our team also uses a Xbox controller. We have the right joystick axis mapped to the linear movement of the robot, and the the left joystick x axis mapped to the rotation.
Here's a simplified version of our code:

//FLMotor = Front Left Motor
//FRMotor = Front Right Motor
//BLMotor = Back Left Motor
//BRMotor = Back Right Motor
//x = right joystick, x axis
//y = right joystick, y axis
//yaw = left joystick, x axis

FLMotor = y + x + yaw
FRMotor = y - x - yaw
BLMotor = y - x + yaw
BRMotor = y + x - yaw

The values will have to be limited, other-wise it will go beyond the accepted values (-1 to 1). Make sure the wheels are set up properly, and good luck!
Hey LF, Andrew, and Ethan! Just for future reference, it's spelled mecanum. It's an easy mistake to make. Good luck this season!
Reply With Quote